Audio artifacts when runed flatpak programs

Report Bugs, Issues and non- package Requests
Message
Author
User avatar
VINRARUS
Posts: 15
Joined: Thu Jan 02, 2025 12:09 pm

Audio artifacts when runed flatpak programs

#1 Post by VINRARUS »

My motherboard use audiochip Realtek ALC1220A (SupremeFX S1220A)

Code: Select all

$ inxi -A 
Audio:
  Device-1: Intel Alder Lake-S HD Audio driver: snd_hda_intel
  Device-2: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel
  API: ALSA v: k6.1.0-30-amd64 status: kernel-api
  Server-1: PipeWire v: 1.0.0 status: active
Sound normal work (etc youtybe in firefox), but when started flatpak steam whatever game with audio efects I detect audio artifacts (short breaks in the sound stream).

In internet I finded this advice (/usr/share/wireplumber/main.lua.d/50-alsa-config.lua):

Code: Select all

 ["vm.node.defaults"] = {
    ["api.alsa.period-size"] =128,
    ["api.alsa.headroom"] = 1024,
  },
}
But this only reduced the frequency of the problem, but did not completely solve it.
How fix audio problem (on opensuse these problems did not exist)?
shell master Image

User avatar
CharlesV
Global Moderator
Posts: 7345
Joined: Sun Jul 07, 2019 5:11 pm

Re: Audio artifacts when runed flatpak programs

#2 Post by CharlesV »

Please post your QSI. ( MX Menu, Quick System Info, Copy for Forum, Paste here )
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
VINRARUS
Posts: 15
Joined: Thu Jan 02, 2025 12:09 pm

Re: Audio artifacts when runed flatpak programs

#3 Post by VINRARUS »

CharlesV wrote: Sat Jan 25, 2025 6:28 pm Please post your QSI. ( MX Menu, Quick System Info, Copy for Forum, Paste here )
:anicat:

Code: Select all

System:
  Kernel: 6.1.0-30-amd64 [6.1.124-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.1.0-30-amd64 root=UUID=<filter> ro rootflags=subvol=@
    splash quiet
  Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM Distro: MX-23.5_KDE_x64 Libretto
    September 15 2024 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: ROG STRIX B660-G GAMING WIFI v: Rev 1.xx serial: <superuser required>
    BIOS: American Megatrends v: 1203 date: 03/04/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: discharging
CPU:
  Info: model: 12th Gen Intel Core i5-12400F bits: 64 type: MCP arch: Alder Lake gen: core 12
    level: v3 note: check built: 2021+ process: Intel 7 (10nm ESF) family: 6 model-id: 0x97 (151)
    stepping: 5 microcode: 0x37
  Topology: cpus: 1x cores: 6 smt: disabled cache: L1: 480 KiB desc: d-6x48 KiB; i-6x32 KiB
    L2: 7.5 MiB desc: 6x1.2 MiB L3: 18 MiB desc: 1x18 MiB
  Speed (MHz): avg: 800 min/max: 800/5600 scaling: driver: intel_pstate governor: powersave
    cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 bogomips: 29952
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional; RSB filling;
    PBRSB-eIBRS: SW sequence; BHI: BHI_DIS_S
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] vendor: Sapphire
    driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie:
    gen: 4 speed: 16 GT/s lanes: 16 ports: active: DP-1 empty: DP-2,DP-3,HDMI-A-1 bus-ID: 03:00.0
    chip-ID: 1002:73df class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 compositor: kwin_x11 driver: X:
    loaded: amdgpu unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00") s-diag: 777mm (30.58")
  Monitor-1: DP-1 mapped: DisplayPort-0 model: Samsung LS27A600N serial: <filter> built: 2023
    res: 2560x1440 hz: 75 dpi: 109 gamma: 1.2 size: 597x337mm (23.5x13.27") diag: 686mm (27")
    ratio: 16:9 modes: max: 2560x1440 min: 720x400
  API: OpenGL v: 4.6 Mesa 24.2.2-1~mx23ahs renderer: AMD Radeon RX 6700 XT (radeonsi navi22 LLVM
    15.0.6 DRM 3.49 6.1.0-30-amd64) direct-render: Yes
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3 chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie: gen: 4
    speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab28 class-ID: 0403
  API: ALSA v: k6.1.0-30-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 1 port: N/A bus-ID: 07:00.0 chip-ID: 8086:15f3 class-ID: 0200
  IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 5.25 TiB used: 4.03 TiB (76.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: MEMPEK1J016GAL size: 13.41 GiB
    block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD serial: <filter>
    rev: K4110420 temp: 46.9 C
  ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: SK Hynix model: HFM512GD3JX013N size: 476.94 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 41000C20 temp: 36.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Hitachi model: HDT725025VLA380 size: 232.89 GiB block-size:
    physical: 512 B logical: 512 B speed: 3.0 Gb/s type: N/A serial: <filter> rev: A7EA scheme: MBR
  ID-4: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 4B6Q
    scheme: GPT
  ID-5: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST4000VN008-2DR166 size: 3.64 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5980 serial: <filter>
    rev: SC60 scheme: GPT
Partition:
  ID-1: / raw-size: 390.62 GiB size: 390.62 GiB (100.00%) used: 23.48 GiB (6.0%) fs: btrfs
    dev: /dev/nvme1n1p2 maj-min: 259:3
  ID-2: /home raw-size: 900 GiB size: 900 GiB (100.00%) used: 781.02 GiB (86.8%) fs: btrfs
    dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 13.41 GiB used: 444 MiB (3.2%) priority: -2
    dev: /dev/nvme0n1 maj-min: 259:0
Sensors:
  System Temperatures: cpu: 38.0 C mobo: 36.0 C gpu: amdgpu temp: 53.0 C mem: 54.0 C
  Fan Speeds (RPM): fan-1: 744 fan-2: 755 fan-4: 1040 fan-6: 1398 fan-7: 0 gpu: amdgpu fan: 0
Repos:
  Packages: 2579 pm: dpkg pkgs: 2561 libs: 1367 tools: apt,apt-get,aptitude,nala pm: rpm pkgs: 0
    pm: flatpak pkgs: 18
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://nl.mxrepo.com/mx/repo/ bookworm main non-free
    2: deb http://nl.mxrepo.com/mx/repo/ bookworm ahs
Info:
  Processes: 326 Uptime: 9h 40m wakeups: 27 Memory: 31.16 GiB used: 6.12 GiB (19.6%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
shell master Image

User avatar
VINRARUS
Posts: 15
Joined: Thu Jan 02, 2025 12:09 pm

Re: Audio artifacts when runed flatpak programs

#4 Post by VINRARUS »

How restart PipeWire in MX without reboot OS or DE? :anifish:
VINRARUS wrote: Sat Jan 25, 2025 11:10 am Sound normal work (etc youtybe in firefox), but when started flatpak steam whatever game with audio efects I detect audio artifacts (short breaks in the sound stream).
And how more intensive game sounds, he make more often sound breaks.
shell master Image

User avatar
CharlesV
Global Moderator
Posts: 7345
Joined: Sun Jul 07, 2019 5:11 pm

Re: Audio artifacts when runed flatpak programs

#5 Post by CharlesV »

The easiest method to restart pipewire I know of is as follows: ( Takes approx 5 seconds )

Code: Select all

pkill pipewire; pkill pipewire-pulse; pkill wireplumber; pipewire-start

*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
VINRARUS
Posts: 15
Joined: Thu Jan 02, 2025 12:09 pm

Re: Audio artifacts when runed flatpak programs

#6 Post by VINRARUS »

Today my audio system is crashed.
Before hibernate audio work ok.
After hibernate audio not work, and I dont see any audio device in DE.
dmesg say:

Code: Select all

...
[51208.465815] OOM killer enabled.
[51208.465816] Restarting tasks ... done.
[51208.472516] random: crng reseeded on system resumption
[51208.472558] PM: suspend exit
[51210.081744] igc 0000:07:00.0 eth0: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
[51210.657309] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[51210.657320] ata5.00: Entering active power mode
[51210.717068] ata5.00: configured for UDMA/133
[51213.061227] ata8: link is slow to respond, please be patient (ready=0)
[51213.545304] ata8: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[51213.545315] ata8.00: Entering active power mode
[51213.570327] ata8.00: configured for UDMA/133
[51216.453736] igc 0000:07:00.0 eth0: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
[51216.453819] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[52172.809075] pipewire[3722]: segfault at 7f18d43ef020 ip 00007f18d45482d6 sp 00007f18cf7fcfe0 error 4 in libspa-audioconvert.so[7f18d4520000+4b000] likely on CPU 0 (core 0, socket 0)
[52172.809083] Code: 83 e1 08 49 c1 e0 05 88 4c 24 08 31 c9 4d 01 e0 0f 1f 40 00 49 8b 80 50 01 00 00 48 8b 70 10 48 01 ce 4c 8b 7e 20 44 8b 6e 14 <41> 8b 17 45 8b 77 04 41 39 d5 0f 82 d2 06 00 00 44 89 e8 89 d7 29
[52833.312949] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
Restart pipewire helped restore audio system without reboot. :bongodrums:
shell master Image

User avatar
j2mcgreg
Global Moderator
Posts: 6813
Joined: Tue Oct 23, 2007 12:04 pm

Re: Audio artifacts when runed flatpak programs

#7 Post by j2mcgreg »

Seeing the difficulties you are having with on board sound, it might be worth you while to add in a discreet card like this one instead:
https://www.amazon.ca/Creative-Sound-Bl ... d_source=1
I checked your motherboard specs and you should have a few open PCIe slots available.
HP 15; ryzen 3 5300U APU; 500 Gb SSD; 8GB ram
HP 17; ryzen 3 3200; 500 GB SSD; 12 GB ram
Idea Center 3; 12 gen i5; 256 GB ssd;

In Linux, newer isn't always better. The best solution is the one that works.

Nokkaelaein
Posts: 302
Joined: Fri Jul 17, 2020 10:32 am

Re: Audio artifacts when runed flatpak programs

#8 Post by Nokkaelaein »

I recommend trying a Liquorix kernel. If you are having dropouts in buffered streams like playing audio (in other words, having underruns of the buffer) while the computer does something else, and these dropouts happen as the system load increases the way you described, Liquorix kernels are exactly the thing to try.

Another thing to try is the threadirqs boot parameter, which assigns threads to interrupt handlers. If you go that route, you might also want to set a high priority specifically to those threads that are for the interrupts of your onboard audio interface: https://codeberg.org/autostatic/rtcirqus ... Note that this is not MX Linux specific stuff, supported in the repos or anything like that. So if you go beyond trying just the kernel switch, you'll need to be at least somewhat comfortable with system tinkering like this, and it's your own responsibility :). In any case, combining tweaks like these, dropouts can realistically be mitigated. This cannot be guaranteed, obviously, but there's a realistic chance it'll work at least clearly better.

User avatar
VINRARUS
Posts: 15
Joined: Thu Jan 02, 2025 12:09 pm

Re: Audio artifacts when runed flatpak programs

#9 Post by VINRARUS »

j2mcgreg wrote: Wed Feb 05, 2025 4:13 pm Seeing the difficulties you are having with on board sound, it might be worth you while to add in a discreet card like this one instead:
https://www.amazon.ca/Creative-Sound-Bl ... d_source=1
I checked your motherboard specs and you should have a few open PCIe slots available.
I've been used this PC with a OpenSUSE slowroll for six months and haven't had any problems like this, so it's not a hardware problem.

On MX for example, the network has fallen off several times before, but I haven't isolated this problem yet.

Also, sometimes everything freezes when updating OS components.
Nokkaelaein wrote: Wed Feb 05, 2025 4:43 pm I recommend trying a Liquorix kernel. If you are having dropouts in buffered streams like playing audio (in other words, having underruns of the buffer) while the computer does something else, and these dropouts happen as the system load increases the way you described, Liquorix kernels are exactly the thing to try.
MX have standart soft for choise other kernel?
Nokkaelaein wrote: Wed Feb 05, 2025 4:43 pm Another thing to try is the threadirqs boot parameter, which assigns threads to interrupt handlers. If you go that route, you might also want to set a high priority specifically to those threads that are for the interrupts of your onboard audio interface: https://codeberg.org/autostatic/rtcirqus ... Note that this is not MX Linux specific stuff, supported in the repos or anything like that. So if you go beyond trying just the kernel switch, you'll need to be at least somewhat comfortable with system tinkering like this, and it's your own responsibility :). In any case, combining tweaks like these, dropouts can realistically be mitigated. This cannot be guaranteed, obviously, but there's a realistic chance it'll work at least clearly better.
OK, I will try this.
shell master Image

User avatar
VINRARUS
Posts: 15
Joined: Thu Jan 02, 2025 12:09 pm

Re: Audio artifacts when runed flatpak programs

#10 Post by VINRARUS »

Nokkaelaein wrote: Wed Feb 05, 2025 4:43 pm MX have standart soft for choise other kernel?
Yes, grub choise after boot.
Nokkaelaein wrote: Wed Feb 05, 2025 4:43 pm I recommend trying a Liquorix kernel. If you are having dropouts in buffered streams like playing audio (in other words, having underruns of the buffer) while the computer does something else, and these dropouts happen as the system load increases the way you described, Liquorix kernels are exactly the thing to try.
Thanks for the advice! Another kernel really solved the sound problems. :singing: Also, the system freezes during the update seem to have disappeared. :singingred:
I was thinking about trying a different kernel, but I haven't decided which one is better. It's strange that the Debian kernel has such problems, I thought it worked perfectly from Debian.


But a new problem has arisen: now the network card always disconnects when exiting hibernation, so I have to reboot the OS to restore the Internet connection. :bricksfall:
I see exists MX with Liquorix (but why not with KDE?), so how fix this problem?
shell master Image

Post Reply

Return to “Bugs and Non-Package Requests Forum”