Bug 2054803 - No sound after suspend, regression since kernel 5.16.x, still broken on latest vanilla
Summary: No sound after suspend, regression since kernel 5.16.x, still broken on lates...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 35
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-15 17:48 UTC by Stephane Travostino
Modified: 2022-02-25 08:39 UTC (History)
22 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-02-24 16:52:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stephane Travostino 2022-02-15 17:48:16 UTC
1. Please describe the problem:

After automatic suspend, sound is broken, pipewire is stuck in uninterruptible sleep, shutdown/reboot is stuck on "managing sound card state" task, needs hard poweroff or magic sysrq to reboot and restore audio

I'm using an external USB MOTU M4 audio interface.


2. What is the Version-Release number of the kernel:

Affects 5.16 and later


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

Yes, issue doesn't appear on 5.15.16


4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

Not easily, but if I suspend the PC in the evening, the next day when I resume audio is broken, and any application using audio hangs.


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

Confirmed to affect Fedora's 5.16.7 and the latest _vanilla_ kernel 5.17.0-0.rc3.20220211gitf1baf68e1383


6. Are you running any modules that not shipped with directly Fedora's kernel?:

No

---

Related pipewire issue: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2001

Related kernel bugzilla issue I've opened, with logs from suspicious stuck alsa task: https://bugzilla.kernel.org/show_bug.cgi?id=215606

Comment 1 Marek Kašík 2022-02-16 11:45:10 UTC
Hi,

I have probably the same issue.
It shows up during boot when alsactl tries to restore driver state for a soundcard.
The command "/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main nrestore /dev/snd/controlC1" freezes when accessing the "/dev/snd/controlC1" (to be specific, when it tries to close it according to strace) and it is not possible to kill it.
It is reproducible with 5.16.7 but not with 5.16.6 so it seems that this change is the cause: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=v5.16.7&id2=v5.16.6&dt=2.

I have also an external USB DAC but this happens even if it is disconnected and even if my thunderbolt dock is disconnected and only internal soundcard of the laptop is available.

Comment 2 Marek Kašík 2022-02-16 11:58:05 UTC
I'm sorry, forget about the versions I've listed there.

It was reproducible with 5.16.8 but not with 5.16.7. But it works now after several reboots. So I can not reproduce it now.

(In reply to Marek Kašík from comment #1)
> It is reproducible with 5.16.7 but not with 5.16.6 so it seems that this
> change is the cause:
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=v5.
> 16.7&id2=v5.16.6&dt=2.

So maybe it is not related to the original issue.

Comment 3 Stephane Travostino 2022-02-20 18:38:33 UTC
Fixed in the sound.git upstream, not yet merged into Linus' tree: https://bugzilla.kernel.org/show_bug.cgi?id=215561

Comment 4 Ranjan Maitra 2022-02-21 14:09:37 UTC
(In reply to Marek Kašík from comment #2)
> I'm sorry, forget about the versions I've listed there.
> 
> It was reproducible with 5.16.8 but not with 5.16.7. But it works now after
> several reboots. So I can not reproduce it now.
> 
> (In reply to Marek Kašík from comment #1)
> > It is reproducible with 5.16.7 but not with 5.16.6 so it seems that this
> > change is the cause:
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=v5.
> > 16.7&id2=v5.16.6&dt=2.
> 
> So maybe it is not related to the original issue.

For kernel 5.16.7, I can not hibernate (the system starts with the process of shutting down, with network disconnection, but then connects back up). Downgrading the kernel (I get downgraded to 5.14.10!) resolves the issue for me.

Using:

wireplumber-0.4.8-1.fc35.x86_64
pipewire-0.3.47-1.fc35.x86_64
alsa-utils-1.2.6-1.fc35.x86_64

Comment 5 Justin M. Forbes 2022-02-24 16:28:01 UTC
This should be fixed in The 5.16.11 kernels in updates-testing right now (it has the patch from the kernel.org bug).  Please test and close this bug if 5.16.11 fixes this for you.

Comment 6 Stephane Travostino 2022-02-24 16:52:25 UTC
Thanks, 5.16.11 works for me, closing.

Comment 7 Marek Kašík 2022-02-25 08:39:40 UTC
Thank you for the fix! It fixes the issue for me as well.
(I said that I am not able to reproduce it anymore but I was able to reproduce it later since it was not enough to restart the laptop it had to be turned off and on again to reproduce)


Note You need to log in before you can comment on or make changes to this bug.