Hope someone can help me here. Doesn’t matter what DE I use, but every time I resume my computer from suspend/sleep mode, my sound is either gone or it plays back crackly. Driving me crazy.
I tried messing with alsamixer, but had no luck.
Any help would be appreciated.
Thanks
Hello,
Can you give the output of inxi -Fz
?
Here’s the output…
[guido@EndeavourOS ~]$ inxi -Fz
System:
Kernel: 6.2.7-arch1-1 arch: x86_64 bits: 64 Desktop: KDE Plasma v: 5.27.3
Distro: EndeavourOS
Machine:
Type: Desktop System: EVGA product: N/A v: N/A serial: <superuser required>
Mobo: EVGA model: 151-HE-E999 v: 1.0 serial: <superuser required>
UEFI: American Megatrends v: 2.09 date: 06/28/2019
CPU:
Info: 6-core model: Intel Core i7-5820K bits: 64 type: MT MCP cache:
L2: 1.5 MiB
Speed (MHz): avg: 1566 min/max: 1200/3000 cores: 1: 3000 2: 3000 3: 1200
4: 2000 5: 1200 6: 1200 7: 1200 8: 1200 9: 1200 10: 1200 11: 1200 12: 1200
Graphics:
Device-1: NVIDIA GM200 [GeForce GTX 980 Ti] driver: nvidia v: 525.89.02
Display: x11 server: X.Org v: 21.1.7 driver: X: loaded: nvidia
gpu: nvidia,nvidia-nvswitch resolution: 2560x1440~120Hz
API: OpenGL v: 4.6.0 NVIDIA 525.89.02 renderer: NVIDIA GeForce GTX 980
Ti/PCIe/SSE2
Audio:
Device-1: Intel C610/X99 series HD Audio driver: snd_hda_intel
Device-2: NVIDIA GM200 High Definition Audio driver: snd_hda_intel
Sound API: ALSA v: k6.2.7-arch1-1 running: yes
Sound Server-1: PipeWire v: 0.3.67 running: yes
Network:
Device-1: Intel Ethernet I217-LM driver: e1000e
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel I210 Gigabit Network driver: igb
IF: enp5s0 state: down mac: <filter>
Drives:
Local Storage: total: 953.88 GiB used: 7 GiB (0.7%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 950 PRO 512GB
size: 476.94 GiB
ID-2: /dev/sda vendor: SanDisk model: SDSSDH3512G size: 476.94 GiB
Partition:
ID-1: / size: 459.94 GiB used: 7 GiB (1.5%) fs: btrfs dev: /dev/nvme0n1p3
ID-2: /boot/efi size: 1022 MiB used: 608 KiB (0.1%) fs: vfat
dev: /dev/nvme0n1p1
ID-3: /home size: 459.94 GiB used: 7 GiB (1.5%) fs: btrfs
dev: /dev/nvme0n1p3
ID-4: /var/log size: 459.94 GiB used: 7 GiB (1.5%) fs: btrfs
dev: /dev/nvme0n1p3
Swap:
ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%)
dev: /dev/nvme0n1p2
Sensors:
System Temperatures: cpu: 31.0 C mobo: N/A gpu: nvidia temp: 40 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 267 Uptime: 2h 48m Memory: 31.28 GiB used: 2.14 GiB (6.8%)
Shell: Bash inxi: 3.3.25
Somebody in the Ubuntu forum had the same problem with the same driver that you are using:
Summary:
Could you try if the following is helping after sleep/suspend:
Check the Audio device ID with:
lspci | grep Audio
(note: Audio with capital A)
for you, as you have two audio devices, it will probably return two lines looking somewhat like this:
00:00.0 Audio device: Intel C610/X99 series HD Audio
the 00:00.0 is my spacer for your device ID.
check the ID with
ls /sys/bus/pci/devices/ | grep 00:00.0
00:00.0 to be replaced with your ID. As you might get two devices, you might want to do it for both. The command should return the exact ID in the format 0000:00:00.0.
Then you have to gain root rights with
su
note: sudo was at least on my machine not sufficient that’s why I had to use su
Next: Disconnecting the device(s) from the driver with:
# echo 1 > /sys/bus/pci/devices/0000:00:1f.3/remove
you might need to run that for both of your devices
Now the crickling sound should be gone and sound should be not working at all.
and rescan:
# echo 1 > /sys/bus/pci/rescan
Now sound should work again.
If that works, you can read in the link how to make this workaround persistent. But let’s first see if that has the desired effect.
I don’t know how old your PC is, but since you also have nvidia sound, it might be interesting for you as well to read about sof-firmware: https://www.sofproject.org/ The sof-firmware package is available on Arch
From the Arch Wiki (https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture):
ALSA firmware
The alsa-firmware package contains firmware that may be required for certain sound cards (e.g. Creative SB0400 Audigy2).
sof-firmware and/or alsa-ucm-conf are required for some newer laptop models (mainly since 2019) because they implement their drivers with firmware provided by the Sound Open Firmware project.
So when I do grep on my devices it shows that it’s a directory.
[guido@EndeavourOS ~]$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation C610/X99 series chipset HD Audio Controller (rev 05)
01:00.1 Audio device: NVIDIA Corporation GM200 High Definition Audio (rev a1)
[guido@EndeavourOS ~]$ /sys/bus/pci/devices/ | grep 00:1b.0
bash: /sys/bus/pci/devices/: Is a directory
[guido@EndeavourOS ~]$ /sys/bus/pci/devices/ | grep 01:00.1
bash: /sys/bus/pci/devices/: Is a directory
you are lacking the ls
-command in the beginning. Indeed the coloring in purple kind of makes it disappear in the forum
ah ok. That was my bad. Totally missed that.
Should I do this while sound is not working or doesn’t matter?
At the moment it’s working. I can put it to sleep and get it to not work,
If you try it now, the sound driver will just be disconnected and connected again. So, basically sound will go off after the first echo-command and should go back on after the second one.
So, it would make sense to try it after suspend/sleep, when the problem is present. you also could first try the echo-commands with the intel device and if that was not helping you could do the same with the nvidia-device. That way you can also figure out what device should be active at that time.
I believe it should be the intel devise. I don’t know where the nvidia device is coming from. My only guess it’s from the video card. Unless it’s on my MB which I’m not aware of.
It’s a sound chip on the gpu (Nvidia GM200).
So, yes, I think it would make sense to suspend/sleep and wake up again to get the problem and see if it helps if you run the two commands for the Intel audio.
And if it doesn’t work: for the Nvidia device as well.
This is weird. Removing intel device and re-scanning did nothing. When I remove the nvidia driver, but do not re-scan and leave the intel, I get the cracking/buzzing sound.
I have to start cooking dinner now. I will try later if you have any other suggestions.
Thanks
Okay, just post the outcome. Was that test now after suspend or under normal circumstances?
If it was after suspend: Was the problem gone after rescanning the Nvidia device?
Oh, and: enjoy your dinner
Edit: If the disconnection of the nvidia audio causes the same issue that you have after suspend, then it might be that the problem is that the driver doesn’t connect to the Nvidia device after waking up. If that assumption is correct, running
su
and
# echo 1 > /sys/bus/pci/rescan
should do the trick.
Yes, I’ve suspended, resumed and had no sound. Then I ran the commands above.
If I re-scanned for nvidia device, the audio doesn’t work. If I leave nvidia device disconnected I get the crackling/buzzing sound effect as I do coming out of suspend.
I do disable the nvidia device in Audio Settings. Should I leave it enabled?
Do you have sound without it? Does it work just on Intel after suspend without problems?
At least for testing it’s a good idea to disable it
Edit: Another idea: can you try to disconnect the Intel device after suspend and check if you have then sound before rescan? (with enabled Nvidia sound)
Yes I do have sound without it, but only when I first start my computer or rebooting. If it goes to suspend mode then I lose sound. Nvidia Device never worked for me and so I always disable it. In alsamixer when selecting Nvidia Device it only shows spdif settings which I never use.
I’ve tried disconnecting Intel device with Nvidia enabled and no sound.
Okay, can you check if the Intel device is still listed in
lspci | grep Audio
after a suspend, when you don’t have sound or crackling sound?
[guido@EndeavourOS ~]$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation C610/X99 series chipset HD Audio Controller (rev 05)
01:00.1 Audio device: NVIDIA Corporation GM200 High Definition Audio (rev a1)e here
When I resume from suspend I have no sound at all, but if I go into Audio Settings and change Profile setting to another profile and back to the default profile, I get the crackly/buzzing sound.
Okay, I found in the mint forum some information about this problem. Weirdly the forists there came to the conclusion that it’s related to a problem with Nvidia hybrid video. So far I can’t really relate to that… theoretically, if due to the hybrid switching the access to the GPU is switched and if that function results in problems after suspend it sounds at least not totally far fetched.
But: One recommendation was to switch kernels and see if it changes the situation. So, you could try next to install linux-lts, boot the lts-kernel and see if that is affecting the issue.