Bug 1213745 - cirrus logic speaker (cs35l41-hda, sof-firmware) not working after resuming from suspend
Summary: cirrus logic speaker (cs35l41-hda, sof-firmware) not working after resuming f...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Sound (show other bugs)
Version: Current
Hardware: Other openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Takashi Iwai
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 05:01 UTC by Yuan Liu
Modified: 2024-06-25 17:52 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
dmesg output after a "fresh boot -> suspend-resume -> suspend-resume" sequence (i clicked the sound check in each time in gnome control center) (117.72 KB, text/plain)
2023-07-28 05:01 UTC, Yuan Liu
Details
freeze during second suspend (4.12 KB, text/plain)
2023-07-28 11:04 UTC, Yuan Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuan Liu 2023-07-28 05:01:19 UTC
Created attachment 868475 [details]
dmesg output after a "fresh boot -> suspend-resume -> suspend-resume" sequence (i clicked the sound check in each time in gnome control center)

Dear OpenSUSE development team,

The cirrus logic speaker on my "hp zbook fury g9" laptop (a relatively new model) will stop working after the first suspend after system boot, but will work again after second/third/... suspend, though the sound volume will get significantly lower.

By the way, when doing research on the internet I found Mr. Takashi Iwai's communication with a cirrus developer on LKML: 

https://lkml.org/lkml/2023/7/21/901

It seems that the problem will be fixed with the next kernel update, but I'm not really sure about that due to my non-technical background. And if that is so, could I ask for an rough estimation of the date for this relevant kernel update to arrive in tumbleweed?

Thanks for your time and the great work.
Comment 1 Takashi Iwai 2023-07-28 06:25:47 UTC
I'm building a test kernel with the backport of those patches on top of the current TW stable git branch.  It's being built in OBS home:tiwai:bsc1213745.
Once after the build finishes (takes an hour or so), it'll appear at
  http://download.opensuse.org/repositories/home:/tiwai:/bsc1213745/standard/
Please give it a try later.

Note that it's an unofficial build, hence you'd need to disable Secure Boot.
Comment 2 Yuan Liu 2023-07-28 08:24:02 UTC
(In reply to Takashi Iwai from comment #1)
> I'm building a test kernel with the backport of those patches on top of the
> current TW stable git branch.  It's being built in OBS home:tiwai:bsc1213745.
> Once after the build finishes (takes an hour or so), it'll appear at
>   http://download.opensuse.org/repositories/home:/tiwai:/bsc1213745/standard/
> Please give it a try later.
> 
> Note that it's an unofficial build, hence you'd need to disable Secure Boot.


I've tried the new kernel, and can confirm the problem has been fixed. Thanks!

By the way, I can see even with the new kernel, cs35l41-hda is still causing trouble for the system to successfully enter hibernation (which is another mild bug I hadn't reported). Do you by any chance know something about this related issue?
Comment 3 Yuan Liu 2023-07-28 09:49:47 UTC
It turns out that the new test kernel is not working perfectly. When I do the first suspend and resume, everything works fine, and no errors in the dmesg output. But if I suspend the system again, it would freeze, and overheat. The same pattern will repeat after forced reboot.
Comment 4 Takashi Iwai 2023-07-28 10:40:51 UTC
Is it related with this patch set?  You can check the latest kernel in OBS Kernel:stable as comparison.

If it comes from the cs35l41 patches, we should ask Cirrus people to take a look.
Comment 5 Yuan Liu 2023-07-28 11:03:38 UTC
(In reply to Takashi Iwai from comment #4)
> Is it related with this patch set?  You can check the latest kernel in OBS
> Kernel:stable as comparison.
> 
> If it comes from the cs35l41 patches, we should ask Cirrus people to take a
> look.

I believe the freeze is related to this patch. I tried the stable kernel again, the freeze during the second suspend attempt after system boot didn't happen (but of course the speaker bug came back). I'll add the error messages shown during the freeze in the attachment.
Comment 6 Yuan Liu 2023-07-28 11:04:31 UTC
Created attachment 868481 [details]
freeze during second suspend
Comment 7 Takashi Iwai 2023-07-28 11:08:33 UTC
Thanks, it looks suspicious, yes.

I'll try to ping Cirrus people.
Comment 8 Yuan Liu 2023-09-01 07:10:04 UTC
(In reply to Takashi Iwai from comment #7)
> Thanks, it looks suspicious, yes.
> 
> I'll try to ping Cirrus people.

Hi Takashi. Is the above mentioned patch ( https://lkml.org/lkml/2023/7/21/901 ) actually applied to the kernels released afterwards? 

Thanks.
Comment 9 Takashi Iwai 2023-09-01 07:28:26 UTC
Yes, it's in Linus tree for 6.6-rc1.  We'll have to fix this before 6.6 final release.
Comment 10 Takashi Iwai 2023-10-19 15:41:59 UTC
Care to check whether you still see the problem with the latest kernel in OBS Kernel:HEAD repo?
Comment 11 Yuan Liu 2023-10-19 23:52:50 UTC
(In reply to Takashi Iwai from comment #10)
> Care to check whether you still see the problem with the latest kernel in
> OBS Kernel:HEAD repo?

Thanks! I'll test it today.
Comment 12 Takashi Iwai 2023-11-15 12:46:45 UTC
Can you retest 6.7-rc1 kernel in OBS Kernel:HEAD repo?
Now all relevant patches have been merged there.
Comment 13 Yuan Liu 2023-11-15 13:17:52 UTC
(In reply to Takashi Iwai from comment #12)
> Can you retest 6.7-rc1 kernel in OBS Kernel:HEAD repo?
> Now all relevant patches have been merged there.

Wow, it works perfectly with this kernel!!!
Comment 14 Takashi Iwai 2023-11-15 13:36:31 UTC
Good to hear!
Then I'm going to backport the patches to 6.6.x kernel for TW.
(Already backported to SLE15-SP6 branch :)
Comment 15 Yuan Liu 2023-11-15 13:47:17 UTC
(In reply to Takashi Iwai from comment #14)
> Good to hear!
> Then I'm going to backport the patches to 6.6.x kernel for TW.
> (Already backported to SLE15-SP6 branch :)

Arigatou, Takashi san~~
Comment 16 Takashi Iwai 2023-11-15 14:02:13 UTC
I'm building a test kernel with backports.  It's being built (again) in OBS home:tiwai:bsc1213745 repo.  Once after the build finishes, please test it.
Once after it's verified to work, I'll merge those to stable branch.
Comment 17 Yuan Liu 2023-11-15 15:28:08 UTC
(In reply to Takashi Iwai from comment #16)
> I'm building a test kernel with backports.  It's being built (again) in OBS
> home:tiwai:bsc1213745 repo.  Once after the build finishes, please test it.
> Once after it's verified to work, I'll merge those to stable branch.

I can confirm that it works!
Comment 25 Takashi Iwai 2023-12-12 14:42:31 UTC
Now all pieces should have been merged.
Feel free to reopen if you still encounter the problem.  Thanks.