Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio stuttering in many games in Gamescope w/ 6700XT #851

Open
rayrayrayraydog opened this issue Mar 5, 2024 · 95 comments
Open

Audio stuttering in many games in Gamescope w/ 6700XT #851

rayrayrayraydog opened this issue Mar 5, 2024 · 95 comments

Comments

@rayrayrayraydog
Copy link

rayrayrayraydog commented Mar 5, 2024

Describe the bug

I have been using bazzite since before Fedora 39 with this system, and I'm not sure when, but in the last few months the system has developed frequent audio stutters when running games. A number of users with 6700XT's have described similar issues -- in my case the audio just cuts out without any static for just a moment and does so very frequently in many games. Some games are impacted more than others. The stuttering is much more frequent when running games via Gamescope vs. launching them from the desktop. I also run the Kodi Flatpak through Steam in Gamescope and it doesn't ever have any audio stutter.

A few badly impacted games:

  • What the Golf
  • Crazy Taxi
  • PowerWash Simulator

What did you expect to happen?

Audio stuttering should not be an issue with this hardware in these lightweight games. I am using the HDMI audio output of the GPU.
I have tried some fixes from some threads in Discord with no noticeable change:

  • Ensure I'm using a proper 4K 2.1 capable HDMI cable. I'm using this but I've tried a few: https://www.amazon.com/gp/product/B09MQLP33J
  • Rule out amplifier as the cause -- stutter occurs via directly connected TV speakers and via TC->optical link to amp
  • Force Gen4 PCIe in BIOS
  • Add PULSE_LATENCY_MSEC=50 in each game's startup args in Steam
  • Checked /sys/module/snd_hda_intel/parameters/power_save_controller and /sys/module/snd_hda_intel/parameters/power_save settings (N and 10 respectively). Setting to N and 0 didn't change anything.

Output of rpm-ostree status

root@gameboi:/home/rayray# rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:22d963175ca12c3f19e5b6997f2fb7a273dc3451076d3459f950e6e4b3d54561
                  Version: 39.20240302.0 (2024-03-03T02:14:15Z)
          LayeredPackages: fstrcmp libcec libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator
                           tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:22d963175ca12c3f19e5b6997f2fb7a273dc3451076d3459f950e6e4b3d54561
                  Version: 39.20240302.0 (2024-03-03T02:14:15Z)
          LayeredPackages: fstrcmp libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml
                           x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf'

Hardware

System is a custom HTPC running bazzite-deck:

  • CPU: AMD Ryzen 5 5600
  • RAM: F4-3200C16D-32GVK G.Skill Ripjaws 16GBx2
  • Motherboard: B550M PG Riptide
  • Storage: NVMe Intel 670p Series M.2 2280 2TB
  • GPU: Sapphire 11306-05-20G Pulse AMD Radeon RX 6700 XT OC
  • PCIe Bluetooth Adapter: AX1800 PCI-E WiFi Card MT7921 (wi-fi not in use, only for BT)
  • USB-C Network adapter (0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN) to avoid issues with integrated NIC

Extra information or context

No response

@rayrayrayraydog
Copy link
Author

Update: I found another source online saying that AMD fTPM could be contributing to audio stutter. Tried disabling this with no change.

@AmazingMrBrock
Copy link

Also having audio stuttering in the games I'm playing, Dark souls remastered and death stranding.

Bazzite install is fresh on an 3600x/7600xt system.

@rayrayrayraydog
Copy link
Author

I tried using a USB sound card instead of the GPU's HDMI audio, and with that there is no stuttering. https://www.amazon.com/dp/B0B9H53KD9 So definitely something going on with the GPU / snd_hda_intel module. A solution that doesn't require additional hardware is ideal so I will keep testing this as the system receives updates.

@Akruidenberg
Copy link

Akruidenberg commented Mar 15, 2024

I have the same problem. With chimeraos, i dont have this issue.

Ryzen 7600
Rx 7800 xt

@nayrxoc
Copy link

nayrxoc commented Mar 16, 2024

I also have this issue under any load (games, compute)
cpu: r5 3600
gpu: rx5700
ram: 32gb 3600mhz

@HikariKnight
Copy link
Member

Check if it is a scheduler bug
sudo systemctl disable com.system76.Scheduler.service and reboot to reset everything the scheduler has done.
if you still experience stuttering please re-enable the system76-scheduler again (swap out disable with enable --now)

no matter the result though, please report back here. Thanks

@Akruidenberg
Copy link

@HikariKnight did some testing, but the problem still exist. The same with system76 disabled.

@KyleGospo
Copy link
Member

KyleGospo commented Mar 18, 2024

If you're using HDMI audio, this is unfortunately a known issue with one of the various HDR patches. I suspect this will be resolved shortly with the launch of Fedora 40 and kernel 6.8 and will update this issue as builds of that come online.

@Akruidenberg
Copy link

I do playing over hdmi, but not HDR. I have a hdr tv, but it will flickering when enabled.

@rayrayrayraydog
Copy link
Author

If you're using HDMI audio, this is unfortunately a known issue with one of the various HDR patches. I suspect this will be resolved shortly with the launch of Fedora 40 and kernel 6.8 and will update this issue as builds of that come online.

I don't play with HDR enabled. Should that matter?

@HikariKnight
Copy link
Member

@HikariKnight did some testing, but the problem still exist. The same with system76 disabled.

thanks for testing, i have had some cases where the scheduler was causing some audio issues on my threadripper under some cpu loads so was worth checking :)
Kyle already mentioned the cause though

@nayrxoc
Copy link

nayrxoc commented Mar 23, 2024

hey just to check back in on this, I tried doing the system76 idea to no avail and looked around the internet for this issue in pipewire
what fixed it for me was increasing default.clock.min-quantum in pipewire.conf from 64 to 1024 as described in this https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#configuration-file-pipewireconf

don't know if this is the same reason as others, but in my instance this helped :3

@rayrayrayraydog
Copy link
Author

default.clock.min-quantum

I've searched through all the pipewire.conf files I can find on my system ... they all seem to set this to 1024 already. Where did you update it exactly?

@nayrxoc
Copy link

nayrxoc commented Mar 24, 2024

default.clock.min-quantum

I've searched through all the pipewire.conf files I can find on my system ... they all seem to set this to 1024 already. Where did you update it exactly?

the link I sent has instructions for where it is
"The PipeWire configuration template file is located in /usr/share/pipewire/pipewire.conf. You can copy and edit the file to /etc/pipewire/ or ~/.config/pipewire/pipewire.conf"
That file won't exist so you will have to make it, for me I even had to make /.config/pipewire itself

if its already 1024 for you, it may be a separate issue then though

@Akruidenberg
Copy link

Strange enough, i have also stutters when using a bluetooth headphone.

@KyleGospo
Copy link
Member

If you could update and try again I would appreciate it. May be fixed in the latest build.

@rayrayrayraydog
Copy link
Author

rayrayrayraydog commented Mar 24, 2024

If you could update and try again I would appreciate it. May be fixed in the latest build.

Just gave it a whirl. There is a definite improvement now, but the issue is still there. In What the Golf the stuttering is much less frequent, enough that I had to play for a few minutes to hear it happen two or three times. In PowerWash Simulator though it still happens pretty frequently, especially when holding down the trigger and getting a lot of noise from the sprayer.

I had also tried the pipewire.conf changes earlier (copied /usr/share/pipewire/pipewire.conf to /etc/pipewire/pipewire.conf|~/.config/pipewire/pipewire.conf, and set default.clock.min-quantum on line 32 to 1024 and rebooted). I didn't notice any significant change with this one.

rayray@gameboi:~$ sudo rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:79d763a11d2c16957bfb18cc1129bc9ec62b23909ad37f42ce94996eeacb00e9
                  Version: 39.20240323.0 (2024-03-24T06:07:55Z)
          LayeredPackages: fstrcmp libcec libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:79d763a11d2c16957bfb18cc1129bc9ec62b23909ad37f42ce94996eeacb00e9
                  Version: 39.20240323.0 (2024-03-24T06:07:55Z)
          LayeredPackages: fstrcmp libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:0a2204f5a96e9eb14affec41d09cf6035777626d190bfaabb9de48c954aca0f5
                  Version: 39.20240311.0 (2024-03-12T08:05:37Z)
          LayeredPackages: fstrcmp libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 
                   Pinned: yes

@Akruidenberg
Copy link

Is this fixed with version 2.5.0?

@rayrayrayraydog
Copy link
Author

My machine pulled down a Fedora 40 image today so I tried this again, same result. There is still audio stuttering in the games I listed.

rayray@gameboi:~$ neofetch
                                            rayray@gameboi
     %%%%%%====%%%%%%%%%%                
   %%%%%%%%    %%%%%%%%%%%%%%             󱋩  bazzite-deck:main 
  %%%%%%%%%    %%%%%%%%%%%%%%%%           󰣛  Fedora Linux 40 (Kinoite) x86_64
  %%%%%%%%%    %%%%%%%%%%%%%%%###           Linux 6.8.7-301.fsync.fc40.x86_64
  %%%%%%%%%    %%%%%%%%%%%%%######        󰅐  4 mins
  ==                  =======######      
  ==                  =========#####      󰾰  B550M PG Riptide
  %%%%%%%%%    %%%%%%%####======#####     󰻠  AMD Ryzen 5 5600 (12) @ 4.47 GHz
  %%%%%%%%%    %%%%%#######=====#####     󰍛  AMD Radeon RX 6700 XT
  %%%%%%%%%    %%%#########=====#####       4.31 GiB / 31.26 GiB (14%)
  %%%%%%%%%    %%##########=====#####       1.02 TiB / 1.86 TiB (55%) - btrfs [Read-only]
  %%%%%%%%%====###########=====######     󰍹  3840x2160 @ 60Hz [External]
   %%%%%%%%====#########======######      󰖺  ASRock LED Controller
    %%%%%%%=====#####========######      
     %%%%###===============#######          bash 5.2.26
      %#######==========#########           /dev/pts/0
        #######################           󰏖  2661 (rpm), 54 (flatpak-system), 24 (flatpak-user)
          ###################            
              ###########                  ● ● ● ● ● ● ● ● 
rayray@gameboi:~$ 
rayray@gameboi:~$ 
rayray@gameboi:~$ sudo rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:a08c542ed755d55ce02d062f7bc43e1cba6c7e44f16b6db05c67f2de63755af2
                  Version: main (2024-04-24T17:03:19Z)
          LayeredPackages: fstrcmp libmicrohttpd monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:f87d5dd11724f35cf8f47a1d22e38777d22160412737ad8d8a288fe23758eb1d
                  Version: 39.20240419.0 (2024-04-19T17:09:55Z)
          LayeredPackages: fstrcmp libcec libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml
                           x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:0a2204f5a96e9eb14affec41d09cf6035777626d190bfaabb9de48c954aca0f5
                  Version: 39.20240311.0 (2024-03-12T08:05:37Z)
          LayeredPackages: fstrcmp libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml
                           x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 
                   Pinned: yes
rayray@gameboi:~$ uname -a
Linux gameboi 6.8.7-301.fsync.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 23 17:32:01 UTC 2024 x86_64 GNU/Linux

@Akruidenberg
Copy link

@rayrayrayraydog Thanks. I will stay with chimeraos.

@rayrayrayraydog
Copy link
Author

It would be great to hear from any other users that had the issue as well. It's possible that I've modified something, somewhere that is allowing this to continue happening and I've also layered several packages. I may try reinstalling from scratch to see if it continues with a fresh system.

@adms-hu
Copy link

adms-hu commented Apr 29, 2024

I have the same issue with Red Dead Redemption 2. I also ended up using an USB soundcard (Creative sound blaster HD) which is a great workaround. I used the motherboards audio directly which also produced crackling, and my airpods pro never crackle but skips as you described. However I only tried out this game and Tomb Romb Raider 2013. TR did not have any issues but I played only 30 minutes with that. I'll try more and come back with more infos.

RDR2 also tends to stutter and crackle on Windows too.

My other issue with 6700XT is Blender not showing up HIP rendering. If you've got some time @rayrayrayraydog can you please try it out? Probably we have similar systems.

@rayrayrayraydog
Copy link
Author

Tried again with today's update in Power Wash Simulator. No change yet.

rayray@gameboi:~$ rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:c375c636bb771c9978170087e2e0b1731ac7748ea0f34a84a42ba37b1386abfc
                  Version: 40.20240501.0 (2024-05-02T07:13:49Z)
          LayeredPackages: fstrcmp libcec libmicrohttpd monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:c375c636bb771c9978170087e2e0b1731ac7748ea0f34a84a42ba37b1386abfc
                  Version: 40.20240501.0 (2024-05-02T07:13:49Z)
          LayeredPackages: fstrcmp libmicrohttpd monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:0a2204f5a96e9eb14affec41d09cf6035777626d190bfaabb9de48c954aca0f5
                  Version: 39.20240311.0 (2024-03-12T08:05:37Z)
          LayeredPackages: fstrcmp libmicrohttpd libnfs lirc-libs monitor-edid pcre-cpp perl-Switch shairplay-libs strace terminator tinyxml x2goserver
                Initramfs: '-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf' 
                   Pinned: yes

@adms-hu
Copy link

adms-hu commented May 3, 2024

Since I had issues with HIP rendering too so I tried out ChimeraOS as an alternative. No crackling at all. Bazzite have much more goodies pre-installed I assume one of those causing this. I don't even have Decky now, but I plan to install that later. Does HIP work for you?

@lukasgierth
Copy link

lukasgierth commented May 3, 2024

Wanna report the same thing with a RX6600, happened with:

  • What the Golf
  • Rogue Legacy 2

@KyleGospo

If you're using HDMI audio, this is unfortunately a known issue with one of the various HDR patches. I suspect this will be resolved shortly with the launch of Fedora 40 and kernel 6.8 and will update this issue as builds of that come online.

Can you link the root issue bug/discussion for this?

Edit: And yes, this seems to be the issue for me with the HDMI audio driver. Put a Fiio E10k USB DAC between my box and the receiver: No audio problems

@al12gamer
Copy link

Here to report the same thing happening with a Ryzen 5 3600 and RX5700XT.
In ChimeraOS this was never an issue.
Every game I've played I've noticed this in: see S31bz on Steam for examples

@al12gamer
Copy link

Hmm Diablo IV and Risk of Rain Returns seem to suffer less

@al12gamer
Copy link

Update here. Diablo IV only has crackling every so often, but Rocket League, Risk of Rain Returns, Fall Guys (proton ge) and the various other games I tend to play with friends from time to time seem to still be suffering crackling.
When the Diablo IV crackling happens, sometimes the audio to the sound bar will just completely stop for a few seconds and then come back. Matt H mentioned here that I should grab more logs for this, so I will the next time I run my Steam Machine that previously worked flawlessly with ChimeraOS.
Anything I should look out for in the logs, specifically? @KyleGospo

@jonnypanic
Copy link

jonnypanic commented May 29, 2024

I have this issue too using a 6750xt, with hdmi out to my 4KTV in game mode.

Hi-Fi Rush has skipping audio, it really kills the fun.
Haven't tried desktop, or my monitor, or other audio outputs, or many other games yet. Will investigate when I have time.

Edit:

Yeah, it only happens on TV with hdmi audio. In many games. Switching audio stops the stuttering.

@al12gamer
Copy link

Would just like to note this is still happening both on a GPD Win Mini 7840U running Bazzite as well as the following living room "Steam Machine" outputting audio over HDMI from a 5700XT:
https://pcpartpicker.com/list/2x28hk

@HikariKnight
Copy link
Member

kernel 6.11 is in testing now, if any of you want to test that as it should have the fix for this from upstream.

@ArnauS197
Copy link

ArnauS197 commented Oct 17, 2024

In my case at this point im trying to search for an alternative audio connection, i dont wanna swap baazzite, I like it, but its frustrating.

Its very strange because it isnt consistent. I have some strange theory, if I have my PC turned on and booted for like 6 hours when I play via HDMI it does not stutter, but if I do a reboot, it starts stuttering. Veeeeery strange.

My last 5 days with both 6.9 and 6.11 kernels seems to confirm this theory, but idk at this point, im out of ideas

@rayrayrayraydog
Copy link
Author

I upgraded my machine to 41 today and the stuttering is still there. If it helps, here is a short video of PowerWash Simulator where you can hear the stutter in the first few seconds: https://www.youtube.com/watch?v=SrC-QA7GLUc

@ArnauS197
Copy link

Yep, exactly the same for me. I think its a little bit better? But same issue, and only happens with Bazzite.

@Nadonate
Copy link

Nadonate commented Nov 4, 2024

I also recently updated to 41 and the audio dropping/stuttering has returned ☹️ - I tested a few games last night, and it seemed consistent across all of them.

I came across this at r/AMDhelp:

https://www.reddit.com/r/AMDHelp/s/3euamc97Uh

The post is aging, but there are quite a few recent comments. Some of the noticeable similarities, besides the audio stuttering:

  • 6000 & 7000 series GPUs
  • Using HDMI audio
  • Issue resolves when card is tasked to perform

According to the thread, it may be power related? Some users suggested the HDMI connection may be lost when the card tries to conserve power...

@sigmatize
Copy link

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.

I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

@rayrayrayraydog
Copy link
Author

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.

I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

I will give this a try today. Did this make the card louder?

@Nadonate
Copy link

Nadonate commented Nov 4, 2024

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.

I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

Unfortunately, there is no lact.rpm for 41 yet ☹️

@ArnauS197
Copy link

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.

I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

Hi, do you mean in BIOS settings? Thanks

@Nadonate
Copy link

Nadonate commented Nov 5, 2024

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.

I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

Hi, do you mean in BIOS settings? Thanks

No. LACT is an AMD GPU configuration application:

https://github.com/ilya-zlobintsev/LACT

@rayrayrayraydog
Copy link
Author

I guess we're waiting for the LACT rpm for F41? The ujust script didn't manage to install ilt.

@ArnauS197
Copy link

They released it yesterday for f41 https://github.com/ilya-zlobintsev/LACT/releases/

@ArnauS197
Copy link

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.

I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

Sorry, first time using LACT, is this the correct configuration?

Image

@Nadonate
Copy link

Nadonate commented Nov 6, 2024

What worked for me on various linux distributions, including Bazzite/Fedora, was changing a setting in LACT. Under OC -> Performance -> Performance Level, changing the setting from "Automatic" to "Highest Clocks" and rebooting fixed it.
I am running a 6700XT outputting through 4k HDMI. I suspect there is a power saving policy somewhere that is too aggressive.

Sorry, first time using LACT, is this the correct configuration?

Image

Make sure the correct GPU is slected using the drop down menu in the top left. You may than have to enable overclocking by pressing the button pictured in your screencapture.

@Nadonate
Copy link

Nadonate commented Nov 6, 2024

After rebasing to 40 and getting the same symptoms, regardless of GPU clock or power settings, I think I've found a solution.

I considered the issue was with the HDMI connection being 'dropped' or lost. Based on this post at r/pipwire I thought it may be possible to force the connection to stay alive through pipewire/wireplumber.

I made a wireplumber lua config to disable the timeout/suspend of the HDMI audio output node. I tried several games last night, and today and have had no audio dropping, or stuttering. Please give this a try and see if it helps!

  1. Determine your primary HDMI audio sink. Open a terminal and enter wpctl status - your audio sink description will be listed with a sink-number proceeding it
  2. Inspect the sink number to get the node ID, enter wpctl inspect <sink-number>. In the resulting list, copy down the node.name (my node name is alsa_output.pci-0000_03_00.1.hdmi-surround71-extra3)
  3. Create a lua config file - sudo nano /etc/wireplumber/main.lua.d/50-suspend.lua contents of the config file:
rule = {
  matches = {
    {
      { "node.name", "equals", "<your sink node ID found in step #2>" },
    },
  },
  apply_properties = {
    ["session.suspend-timeout-seconds"] = 0,
  },
}

table.insert(alsa_monitor.rules, rule)

(be sure to customize the file by inserting your audio node ID in the correct place)

  1. Reload pipewire/wireplumber: systemctl --user daemon-reload && systemctl --user restart wireplumber pipewire

This is a global config. I assume you could create a user config by creating the necessary directories in .config

(just to be clear, I went back to stable-41)

@ArnauS197
Copy link

Hi,

Thank you very much!! I copied the configuration according to my node, I will report my experience in a couple of sessions.

@Akruidenberg
Copy link

Hi,

Thank you very much!! I copied the configuration according to my node, I will report my experience in a couple of sessions.

Any news?

@Nadonate
Copy link

Nadonate commented Dec 5, 2024

After rebasing to 40 and getting the same symptoms, regardless of GPU clock or power settings, I think I've found a solution.

I considered the issue was with the HDMI connection being 'dropped' or lost. Based on this post at r/pipwire I thought it may be possible to force the connection to stay alive through pipewire/wireplumber.

I made a wireplumber lua config to disable the timeout/suspend of the HDMI audio output node. I tried several games last night, and today and have had no audio dropping, or stuttering. Please give this a try and see if it helps!

  1. Determine your primary HDMI audio sink. Open a terminal and enter wpctl status - your audio sink description will be listed with a sink-number proceeding it
  2. Inspect the sink number to get the node ID, enter wpctl inspect <sink-number>. In the resulting list, copy down the node.name (my node name is alsa_output.pci-0000_03_00.1.hdmi-surround71-extra3)
  3. Create a lua config file - sudo nano /etc/wireplumber/main.lua.d/50-suspend.lua contents of the config file:
rule = {
  matches = {
    {
      { "node.name", "equals", "<your sink node ID found in step #2>" },
    },
  },
  apply_properties = {
    ["session.suspend-timeout-seconds"] = 0,
  },
}

table.insert(alsa_monitor.rules, rule)

(be sure to customize the file by inserting your audio node ID in the correct place)

  1. Reload pipewire/wireplumber: systemctl --user daemon-reload && systemctl --user restart wireplumber pipewire

This is a global config. I assume you could create a user config by creating the necessary directories in .config

(just to be clear, I went back to stable-41)

a note on this..

Since wireplumber .5 lua scripts are no longer used, config files are now SPA-JSON format.

The manual migration procedure is provided here:

https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/migration.html

I edited my scripts and location, I can provide an example if anyone needs it...

Not 💯 sure this is the fix. I haven't had any major issues since, I would be curious to see if this helps anyone else...

@Koeleskab
Copy link

Since wireplumber .5 lua scripts are no longer used, config files are now SPA-JSON format.

The manual migration procedure is provided here:

https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/migration.html

I edited my scripts and location, I can provide an example if anyone needs it...

Not 💯 sure this is the fix. I haven't had any major issues since, I would be curious to see if this helps anyone else...

I'd be very thankful for an example. Having this issue right now and it'd be great to have yours as a reference.

@rayrayrayraydog
Copy link
Author

rayrayrayraydog commented Dec 5, 2024

This is what I ended up with. Going to give it a try later today.

rayray@gameboi:~/.config/wireplumber/wireplumber.conf.d$ cat 51-suspend-fix.conf 
monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_output.pci-0000_07_00.1.hdmi-stereo"
      }
    ]
    actions = {
      update-props = {
        session.suspend-timeout-seconds = 0
      }
    }
  }
]

@Koeleskab
Copy link

I tried that conf with my node name. didn't seem to work.

@AnthonySoler
Copy link

After rebasing to 40 and getting the same symptoms, regardless of GPU clock or power settings, I think I've found a solution.
I considered the issue was with the HDMI connection being 'dropped' or lost. Based on this post at r/pipwire I thought it may be possible to force the connection to stay alive through pipewire/wireplumber.
I made a wireplumber lua config to disable the timeout/suspend of the HDMI audio output node. I tried several games last night, and today and have had no audio dropping, or stuttering. Please give this a try and see if it helps!

  1. Determine your primary HDMI audio sink. Open a terminal and enter wpctl status - your audio sink description will be listed with a sink-number proceeding it
  2. Inspect the sink number to get the node ID, enter wpctl inspect <sink-number>. In the resulting list, copy down the node.name (my node name is alsa_output.pci-0000_03_00.1.hdmi-surround71-extra3)
  3. Create a lua config file - sudo nano /etc/wireplumber/main.lua.d/50-suspend.lua contents of the config file:
rule = {
  matches = {
    {
      { "node.name", "equals", "<your sink node ID found in step #2>" },
    },
  },
  apply_properties = {
    ["session.suspend-timeout-seconds"] = 0,
  },
}

table.insert(alsa_monitor.rules, rule)

(be sure to customize the file by inserting your audio node ID in the correct place)

  1. Reload pipewire/wireplumber: systemctl --user daemon-reload && systemctl --user restart wireplumber pipewire

This is a global config. I assume you could create a user config by creating the necessary directories in .config
(just to be clear, I went back to stable-41)

a note on this..

Since wireplumber .5 lua scripts are no longer used, config files are now SPA-JSON format.

The manual migration procedure is provided here:

https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/migration.html

I edited my scripts and location, I can provide an example if anyone needs it...

Not 💯 sure this is the fix. I haven't had any major issues since, I would be curious to see if this helps anyone else...

This is what I ended up with. Going to give it a try later today.

rayray@gameboi:~/.config/wireplumber/wireplumber.conf.d$ cat 51-suspend-fix.conf 
monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_output.pci-0000_07_00.1.hdmi-stereo"
      }
    ]
    actions = {
      update-props = {
        session.suspend-timeout-seconds = 0
      }
    }
  }
]

Hello,
I tried the fix explained in these comments and I did not experience any audio problems during a 3-hour-long session of Banishers: Ghost of New Eden.

Steps I followed:

  • Step 1 & 2 from @Nadonate
  • Created the ~/.config/wireplumber/wireplumber.conf.d folder
  • Created a file called suspend-fix.conf with the content provided by @rayrayrayraydog (of course, I edited the device.name to put the one retrieved during step 2).
  • Restarted the PC

I hope I won't have any problems in the future 🤞.

Thank you,

@ArnauS197
Copy link

Hi,

I've done the same as @AnthonySoler, I'll try it tonight, with RE4 Remake, it stutter as soon as I play 5-15 minutes, let's see if we have luck this time.

Thanks :)

@al12gamer
Copy link

Perhaps the team can implement these fixes, as audio should just work

@ArnauS197
Copy link

Hi,

I've done the same as @AnthonySoler, I'll try it tonight, with RE4 Remake, it stutter as soon as I play 5-15 minutes, let's see if we have luck this time.

Thanks :)

Two hours yesterday at RE4 Remake, 0 stuttering, lets see the next days but this seems promising for sure.

@ArnauS197
Copy link

Update: it failed again with Persona 5, in fact, I think now it stutters more than before. Its very sad this dont got fixed in more than a year I have bazzite installed

@AnthonySoler
Copy link

After rebasing to 40 and getting the same symptoms, regardless of GPU clock or power settings, I think I've found a solution.
I considered the issue was with the HDMI connection being 'dropped' or lost. Based on this post at r/pipwire I thought it may be possible to force the connection to stay alive through pipewire/wireplumber.
I made a wireplumber lua config to disable the timeout/suspend of the HDMI audio output node. I tried several games last night, and today and have had no audio dropping, or stuttering. Please give this a try and see if it helps!

  1. Determine your primary HDMI audio sink. Open a terminal and enter wpctl status - your audio sink description will be listed with a sink-number proceeding it
  2. Inspect the sink number to get the node ID, enter wpctl inspect <sink-number>. In the resulting list, copy down the node.name (my node name is alsa_output.pci-0000_03_00.1.hdmi-surround71-extra3)
  3. Create a lua config file - sudo nano /etc/wireplumber/main.lua.d/50-suspend.lua contents of the config file:
rule = {
  matches = {
    {
      { "node.name", "equals", "<your sink node ID found in step #2>" },
    },
  },
  apply_properties = {
    ["session.suspend-timeout-seconds"] = 0,
  },
}

table.insert(alsa_monitor.rules, rule)

(be sure to customize the file by inserting your audio node ID in the correct place)

  1. Reload pipewire/wireplumber: systemctl --user daemon-reload && systemctl --user restart wireplumber pipewire

This is a global config. I assume you could create a user config by creating the necessary directories in .config
(just to be clear, I went back to stable-41)

a note on this..
Since wireplumber .5 lua scripts are no longer used, config files are now SPA-JSON format.
The manual migration procedure is provided here:
https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/migration.html
I edited my scripts and location, I can provide an example if anyone needs it...
Not 💯 sure this is the fix. I haven't had any major issues since, I would be curious to see if this helps anyone else...

This is what I ended up with. Going to give it a try later today.

rayray@gameboi:~/.config/wireplumber/wireplumber.conf.d$ cat 51-suspend-fix.conf 
monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "alsa_output.pci-0000_07_00.1.hdmi-stereo"
      }
    ]
    actions = {
      update-props = {
        session.suspend-timeout-seconds = 0
      }
    }
  }
]

Hello, I tried the fix explained in these comments and I did not experience any audio problems during a 3-hour-long session of Banishers: Ghost of New Eden.

Steps I followed:

  • Step 1 & 2 from @Nadonate
  • Created the ~/.config/wireplumber/wireplumber.conf.d folder
  • Created a file called suspend-fix.conf with the content provided by @rayrayrayraydog (of course, I edited the device.name to put the one retrieved during step 2).
  • Restarted the PC

I hope I won't have any problems in the future 🤞.

Thank you,

Unfortunately, I wanted to play today and the issue is here again with even more audio stutter than before. Very weird behavior...

@ArnauS197
Copy link

Yep, its even worse than before.

@peterjburgess
Copy link

I just installed Bazzite and am getting this badly in MGS2 (haven't tried much with other games yet). Weirdly, having the FPS counter displayed massively improves (although doesn't completely fix) the issue, and takes it from unplayable to just slightly annoying.

I'm running a 6650xt, HDMI out to an AV receiver to my 4K TV, and Bazzite 41 for what it's worth. I will try some of the suggestions and follow some of the links in this thread and report back if I find anything helps.

@attilakillin
Copy link

I’m using plain Fedora 41 KDE, so sorry for butting my nose in here, but this thread is really high on the search results page for this issue, and I hope to help at least some people.

I had the same problem for three months now since buying an RX 6750XT, and have tried many many things, keeping the GPU pinned to the highest frequency, using a plain HDMI cable or an active DP to HDMI one, using various output audio options (stereo, 5.1, 7.1 surround), modifying the Wireplumber config with suspend timeout 0 or a larger alsa headroom, and a few other things and nothing has worked.

In the end I found this reddit thread yesterday, that doesn’t even mention AMD, which said to add preempt=full to the kernel arguments in GRUB, and that it solved many issues for the OP there.

And guess what, it worked for me as well - for the first time in three months, today I could just boot up my desktop and play something, and the audio never once cut out.
I tested three games through two reboots, so it’s sadly nowhere near enough proof yet, but it seems promising, I’ll keep listening next week to see if it’s really a complete solution or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests