Amdgpu sound cracking/popping/cutting problem [a very weird fix]

Hello,

I had a very weird sound problem and I manage to find a fix for it. Actually it’s a weird fix for a weird problem. I would like to know what you think of it and if I should open a bug somewhere.

The problem : Sound heavily pop, crack and cut while streaming video or music but happen less frequently when playing games.

The fix I found : I installed corectrl and use it to raise the minimum gpu clock frequency.

The graphic card is a Radeon 6750 XT and the default min/max values are 500mhz and 2664mhz.

  • While the min value is set to 2000mhz, I notice the problem is way less severe, but still there.
  • While both min and max at 2664mhz, the problem is gone when streaming, but start to appear while in games.
  • While min is at 2564mhz, streaming is fine, gaming almost never crack.

I finished with min value equal to 2464mhz (200mhz under max value) and the sound issue is gone everywhere!

What’s your thought about it? A bug in the drivers/kernel? A package I should install? A config to change?

Thank you very much! :slight_smile:

Praise the sun! :sunny:

2 Likes

My hardware info’s in case it could be useful : https://0x0.st/Hrm-.txt

I’m not so sure this is the way to fix this issue. I have a Ryzen 5800X and an AMD 6750 XT and it’s not built yet with a B550 MSI Tomahawk motherboard also. I honestly do not expect this issue at all. I would be very surprised. Currently I’m running a 3800X with AMD RX590 and X570 MSI Gaming board.

You should read through this guide from Manjaro as it might be helpful? :man_shrugging:

I sure hope you won’t have the issue with your new build! It droves me crazy for days! Do you plan to pass your audio through HDMI?

I agree with you, it feels wrong to fix it this way (I’m fine with it tho). But it’s the only thing that have worked for me so far. I’ve already read the link you posted and nothing worked. I honestly tried everything, wireplumber/pipewire/pulseaudio/alsa config didn’t work. Tried vanilla Arch and distros not based on Arch and the problem was still present. Problem not present on windows tho. Tried different kernel as well.

My guess is that the audio chip on the graphic card is somehow linked to the frequency of the GPU and when the GPU fall in power saving mode, it become unable to handle sound properly. This would explain why It worked mostly well in demanding game but poorly when streaming videos or music.

Please, let me know if you ends up having the issue or not and if you do, tell me how you manage to fix it!

I hope you enjoy your new build! I enjoy mine a lot! :smiley:

Currently my 3800X works really really well with AMD RX590 and X570 MSI Gaming Plus board running EndeavourOS Kde Plasma. I’m looking forward to the new one some day. I still need to purchase 1 or 2 nvme drives, memory, power supply & case.

My plan is to use the Western Digital SN850X 1 TB as it is extremely fast Pci-e 4.0 with read speeds of 7300 Mb/s and write speeds of 6300 Mb/s. Then on the Pci-e 3.0 port I intend to use the SN770 with read speeds of 5000 Mb/s and write speeds of 4000 Mb/s. I have an overclocked Asus 6750 TX Gpu and the MSI Tomahawk B550 motherboard. I’ll probably use 32 GB memory again although it’s overkill. I think I’ll use the 850 Watt power supply on this one. I do have a really high end Cpu fan & heatsink with dual 140mm fans. Currently i am using HDMI but my sound is going out to speakers from the onboard audio out. I know the sound works on my Raspberry Pi 400 which is hooked up to the same monitor and the sound somehow gets back through to the speakers which are hooked to the desktop even when it’s tuned off. I can’t figure out how that works but it must be going back through the other Hdmi cable that is hooked to the desktop as i have one Hdmi hooked to the Pi400 and one Hdmi hooked to the desktop. When i run the Pi 400 the desktop is off but sound still comes through the speakers. It’s weird that it actually works that way. :man_shrugging:

I have some news to report.

I decided to seek for a better solution than raising the minimum GPU clock frequency since this solution is definitely weird and I noticed that some minor artifact were still present even if it was way much better.

I’m pretty sure I found the culprit now. It would be Resizable BAR. I deactivated corectrl, went into the BIOS and then load optimized default, reboot and test. Sound was perfect! I enabled settings one by one and test until I was left only with Resizable BAR to test. I enabled it and then the artifact were back with it.

Ill keep Re-BAR disabled for a while and report back if I find that it’s not the cause of the problem.

I don’t have that enabled either and i don’t see that it would be needed.

This video is 10 months old tho! Resizable Bar is way much better by now. IIRC, HUB now test with Resizable BAR on by default. ReBAR have very positive impact in Elden Ring and Horizon Zero Dawn for me.

Anyway, the Resizable Bar road is a dead end. I already know it have nothing to do with the trouble. This is crazy annoying, I try many things one by one and some time, the problem go away for 2 hours, so I’m happy and start to think I have found a solution and then the problem come back.

I will not report my progress anymore unless I’m 100% sure I’ve found the solution. I hope it will be sooner than later :frowning:

:man_facepalming:

Did you try any other OS ? W10 could be a good start, to see if its a driver issue. Also you didn’t say anything about when this problem started to happen.

If you ask me, sound more like a PSU or hardware problem. (if your 1st post is still valid)

In case you can replicate in windows, then i’m sure you can get help with people that talk about hw all day :innocent: reddit | LTT.

W10 work fine. Vanilla Arch/EndeavourOS/Nobara (based on fedora) all have the problem. Tried default Kernel and Zen as well. I’ve tested KDE and Gnome. Tried default settings in BIOS as well. This PC is one month and half old so the problem always been there on any Linux distro I’ve tried so far.

I’m pretty confident the PSU is not faulty. As of now (could always be wrong tho), hardware feels healthy. I would say I’m 99% confident about that. (I’ve run so many stress test in the first two weeks)

At the moment, I’m testing new wireplumber settings. The default config in /usr/share/wireplumber/main.lua.d/50-alsa-config.lua seem suspicious and I now think it is not compatible with my rig.

Once all comment have been removed, the config I’m testing is just this :

alsa_monitor.enabled = true

alsa_monitor.properties = {
}

alsa_monitor.rules = {
  {
    matches = /*UNCHANGED*/,
    apply_properties = {
      ["api.alsa.use-acp"] = true,
    },
  },
  {
    matches = /*UNCHANGED*/,
    apply_properties = {
      ["session.suspend-timeout-seconds"] = 0,  -- 0 disables suspend
    },
  },
}

Basically, I only set two settings in the config:

["api.alsa.use-acp"] = true,
["session.suspend-timeout-seconds"] = 0,

All other default settings have been unset.

I made this change a bit over 1 hour ago and it look good so far. But again, will the problem comeback soon? I’m I just lucky? I don’t know, I cross my finger.

Yeah, sorry about that

This problem is so painful. As soon as I’m confident the problem is gone, it comeback… it piss me off! :face_with_symbols_over_mouth:

I hear you sorry but i couldn’t help but laugh. :wink:

I have an intel a770 currently, but when I had AMD cards, I usually had to do https://askubuntu.com/questions/405071/static-and-crackling-in-my-hdmi-audio#444559

I discovered that when I boot the live iso “EndeavourOS_Cassini_22_12.iso”, the sound work great. The sound is broken ootb after a fresh install tho. Pipewire is version 0.3.63 in live env and is 0.3.65 after a fresh install.

The sound is also perfect in Manjaro in both Live and on drive, but they use pulseaudio without pipewire in both places. I also found that the sound is fine in linux Mint. I’m now 100% sure it’s not hardware nor bios config related.

It looks like a breaking change unfortunately. I’ve lost all will to keep fighting this. I think ill go with Manjaro for a while, sound is such a critical feature for a gaming/multimedia PC in a living room.

Thanks for the help everyone! It’s very appreciated that you took some of your personal time to try to help with my problem!

i had the same problem on my AMD Ryzen Notebook AND PC.

I turned off TPM and that fixed it.

I finally found the culprit, for real this time! It’s wayland! :melting_face: I don’t know how and why but sound work flawlessly under X11, but is broken when I switch over to wayland. I’ve done many back and forth between the two, there is no doubt about it. I’ve reproduced it in Manjaro as well.

It’s really sad! wayland work just so great other than that.

I found the same issue with Ubuntu 22.04. With Wayland the sound to my external monitor connected with hdmi is crackling like crazy. With X11 it’s fine.