You are not logged in.

#1 2022-01-23 14:37:09

Jastix
Member
Registered: 2022-01-23
Posts: 8

Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

Hello. I'm using linux for quite a short while, so I don't know how to solve this issue.
I updated the system a few days ago, and the issue, which i will describe below begun to happen:
After the system resumes from suspension, I have no sound at all, and in addition to this, if I try to listen some music, parole player just hangs. If I try to restart the system, than it takes like 5-10 minutes to restart, because the system tries to stop "pulseaudio" and "gsettings-helper" with no success. If I try to open "Volume control", than it just shows "Establishing connection to pulseaudio, please wait" forever.
I tried a lot of solutions, which I could find searching just in google and here.

Some of them:

[jastix@XorS Documents]$ pulseaudio -k
[jastix@XorS Documents]$ pulseaudio -D
E: [pulseaudio] main.c: Daemon startup failed.

Removing configuration files from .config tmp and .pulse like wiki advises didn't help either, same as reinstalling pulseaudio and pavucontrol.
If I try to use for example "pacmd list-sinks", than

[jastix@XorS Documents]$ pacmd list-sinks
Daemon not responding.

If I try to restart it with "systemctl --user restart pulseaudio.service" than it just hangs with no effect, and after about 20 minutes of waiting gives the output

Job for pulseaudio.service failed because the control process exited with error code.
See "systemctl --user status pulseaudio.service" and "journalctl --user -xeu pulseaudio.service" for details.

Journalctl after the command from above gives this https://pastebin.com/iRpDuWmp

Sadly initially I didn't look for all errors in journalctl, and was just looking only for pulseaudio output.
There is an error after resume "snd-usb-audio 3-2:1.0: resume error -22". So if I unplug my usb headset (logitech) and only then suspend and resume the system, everything works fine. After start or reboot everything also works fine even if the usb headset is plugged in. But if the headset is plugged in and I suspend and resume the computer, than the issue happens in 100% of cases.
I didn't find much information about exactly this issue, only one 12 years old topic on other forum, which I'm not sure if still relevant.

Offline

#2 2022-01-23 21:03:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,846

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

Likely a regression in the kernel, which kernel did you update to and which kernel were you on before?

If you have that the best way to figure this out is doing a kernel bisection which is likely going to be a lengthy process, or finding an already reported bug about this issue on the kernel bugzilla or so.

Offline

#3 2022-01-23 21:24:46

Jastix
Member
Registered: 2022-01-23
Posts: 8

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

V1del wrote:

Likely a regression in the kernel, which kernel did you update to and which kernel were you on before?

Before I had 5.15.12-arch1-1 and now it's 5.16.2-arch1-1.

V1del wrote:

If you have that the best way to figure this out is doing a kernel bisection which is likely going to be a lengthy process

I guess it doesn't worth the time for a function which I use very occasionally (suspend/resume).
I also have a few backups made with timeshift (tbh I never tried to restore from this, but I hope it's not hard), so maybe I'll use it.

V1del wrote:

or finding an already reported bug about this issue on the kernel bugzilla or so.

Thank you for the reply, I'll look there.

Offline

#4 2022-01-26 13:05:11

Strawpants
Member
Registered: 2014-02-13
Posts: 6

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

I have exactly the same problem, but I'm running pipewire-pulse, and have my usb headset attached through a docking station.
Booting with linux-lts (5.15.16) seems to fix the problem (for now), but it still looks like a bug in the kernel module snd_audio_usb.

Offline

#5 2022-01-26 13:42:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,846

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

FWIW something I'd test since it was newly introduced is whether e.g. a modprobe option to the effect of

options snd-usb-audio lowlatency=0

and rebooting/reloading the snd-usb-module would help? If it does you'd have at least isolated it to something that was newly added and is configurable.

Offline

#6 2022-01-27 15:55:29

Jastix
Member
Registered: 2022-01-23
Posts: 8

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

I typed it and then suspended the computer. All issues stay the same - "snd-usb-audio 3-2:1.0: resume error -22" in journal and no sound.

[jastix@XorS ~]$ modprobe snd_usb_audio lowlatency=0

I can only force reload the snd_usb_audio module

[root@XorS jastix]# modprobe -r snd_usb_audio
modprobe: FATAL: Module snd_usb_audio is in use.
[root@XorS jastix]# rmmod snd_usb_audio
rmmod: ERROR: Module snd_usb_audio is in use
[root@XorS jastix]# rmmod -f snd_usb_audio

But after this the usb headset was lost for the system. At least it's not in pavucontrol, neither pacmd shows it.
Though I got sound through analog speakers, which is already much better, than without reloading.

[jastix@XorS ~]$ pacmd list-sinks | grep -e 'name:' -e 'index:'
  * index: 0
	name: <alsa_output.pci-0000_24_00.3.analog-stereo>
[jastix@XorS ~]$ pacmd list-cards
2 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_22_00.1>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0xfd080000 irq 52"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:22:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:22:00.1/sound/card0"
		device.bus = "pci"
		device.vendor.id = "10de"
		device.vendor.name = "NVIDIA Corporation"
		device.product.id = "10f1"
		device.product.name = "GP106 High Definition Audio Controller"
		device.string = "0"
		device.description = "GP106 High Definition Audio Controller"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 38668, available: unknown)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-stereo-extra5: Digital Stereo (HDMI 6) Output (priority 5700, available: no)
		output:hdmi-surround-extra5: Digital Surround 5.1 (HDMI 6) Output (priority 600, available: no)
		output:hdmi-surround71-extra5: Digital Surround 7.1 (HDMI 6) Output (priority 600, available: no)
		output:hdmi-stereo-extra6: Digital Stereo (HDMI 7) Output (priority 5700, available: no)
		output:hdmi-surround-extra6: Digital Surround 5.1 (HDMI 7) Output (priority 600, available: no)
		output:hdmi-surround71-extra6: Digital Surround 7.1 (HDMI 7) Output (priority 600, available: no)
		off: Off (priority 0, available: unknown)
	active profile: <off>
	ports:
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "2481W
       "
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-5: HDMI / DisplayPort 6 (priority 5400, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-6: HDMI / DisplayPort 7 (priority 5300, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
    index: 1
	name: <alsa_card.pci-0000_24_00.3>
	driver: <module-alsa-card.c>
	owner module: 7
	properties:
		alsa.card = "1"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xfd700000 irq 54"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:24:00.3"
		sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:24:00.3/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "1457"
		device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"
		device.string = "1"
		device.description = "Family 17h (Models 00h-0fh) HD Audio Controller"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analog Stereo Input (priority 65, available: no)
		output:analog-stereo: Analog Stereo Output (priority 39268, available: unknown)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: unknown)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo>
	sinks:
		alsa_output.pci-0000_24_00.3.analog-stereo/#0: Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo
	sources:
		alsa_output.pci-0000_24_00.3.analog-stereo.monitor/#0: Monitor of Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
			properties:
				
		analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"

I tried also to restart pulseaudio, but it didn't help.
Unplugging and then plugging the headset helps though.

Last edited by Jastix (2022-01-27 16:13:58)

Offline

#7 2022-01-31 20:05:42

markstos
Member
Registered: 2011-10-20
Posts: 6

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

I reproduced this on the 5.16.4 kernel with Sway.

I'm playing sound when suspend starts through headphones plugged into a USB dock, then upon resume sound is stuck-- sound on Spotify won't play.  `sudo systemctl restart sounds.target` hangs. Trying open Gnome Sound Settings just shows a blank screen that it's trying to connect to a backend.

Then if I unplug and re-plug the headphones, sound works again.

I have pipewire-pulse installed, version "1:0.3.44-1".

If there's a way to force sound or USB devices to be reset after suspend/resume automatically, that would be great.

Offline

#8 2022-01-31 20:23:19

markstos
Member
Registered: 2011-10-20
Posts: 6

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

I downgraded the kernel  (5.16.4.arch1-1 => 5.15.12.arch1-1) and re-tested-- it works again! Sounds starts playing again immediately after resume, even before I've unlocked the screen.

There were definitely USB-related changes to the sound code in the 5.16 kernel, which I presume is related.

https://www.phoronix.com/scan.php?page= … B-Audio-LL
https://www.spinics.net/lists/kernel/msg4153281.html

I'm not where the best place to report the kernel regression is, or if I should even bother.

For now I'm going to pin my kernel version packages so they don't get automatically upgraded for a while.

Offline

#9 2022-01-31 21:47:42

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 671

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

markstos wrote:

For now I'm going to pin my kernel version packages so they don't get automatically upgraded for a while.

I've had this same problem since 5.16.1 was released on Arch so I switched to the LTS kernel (5.15.*). Happens with pulseaudio or pipewire, with or without wireplumber. I retest every time a new 5.16.* appears and then go back.

Offline

#10 2022-02-01 14:01:16

markstos
Member
Registered: 2011-10-20
Posts: 6

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

@bulletmark - Thanks for your service. Is there a place we should should reporting this kernel regression? The Linux kernel bug reporting guidelines say to contact the subsystem mailinglist but I'm not sure where to find the right list for this.

Please drop a note here when you find the regression is resolved.

Thanks!

Offline

#11 2022-02-01 23:51:49

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 671

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

markstos wrote:

Is there a place we should should reporting this kernel regression?

I also don't know where to raise a bug about this and I have not been able to find anything in my searches. Like the OP here, I get that "snd-usb-audio 3-2:1.0: resume error -22" error every time I resume. It is such a bad regression with 5.16 I can't imagine it will not be fixed quickly though. Sadly, 5.16.5 does not fix it.

Offline

#12 2022-02-02 11:14:35

fermyon
Member
Registered: 2022-02-02
Posts: 3

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

I have the same issue and reported the bug at https://bugzilla.kernel.org/show_bug.cgi?id=215561

Offline

#13 2022-02-14 12:56:43

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 671

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

This bug still exists in today's kernel 5.16.9 but one of the main kernel developers for this stuff has attached a small patch to the above bug which we have confirmed does fix the issue.

Offline

#14 2022-02-24 21:37:10

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 671

Re: Snd-usb-audio resume error. No sound after suspend, pulseaudio hangs

This bug is fixed in today's release of linux 5.16.11.

Offline

Board footer

Powered by FluxBB