Bug 280315 - no sound on stable/14 on Thinkpad T480 after suspend
Summary: no sound on stable/14 on Thinkpad T480 after suspend
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-07-16 13:47 UTC by Oleh Vinichenko
Modified: 2024-07-25 19:58 UTC (History)
2 users (show)

See Also:


Attachments
sysctl_hw_snd (745 bytes, text/plain)
2024-07-16 13:47 UTC, Oleh Vinichenko
no flags Details
sysctl_dev_pcm (920 bytes, text/plain)
2024-07-16 13:48 UTC, Oleh Vinichenko
no flags Details
sysctl_dev_hdac (344 bytes, text/plain)
2024-07-16 13:48 UTC, Oleh Vinichenko
no flags Details
cat_dev_sndstat (1.36 KB, text/plain)
2024-07-16 13:48 UTC, Oleh Vinichenko
no flags Details
cat_dev_sndstat_with_musicpd_after_suspend (1.45 KB, text/plain)
2024-07-16 13:49 UTC, Oleh Vinichenko
no flags Details
pindump (2.53 KB, text/plain)
2024-07-16 13:52 UTC, Oleh Vinichenko
no flags Details
mixer_output (287 bytes, text/plain)
2024-07-16 13:53 UTC, Oleh Vinichenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleh Vinichenko 2024-07-16 13:47:27 UTC
Created attachment 252100 [details]
sysctl_hw_snd

i have Thinkpad T480 with stable/14. I use bitperfect setup and musicpd. It works very well until notebook suspends. After that i hearing no sound at all coming from either headphones or speakers. muiscpd keeps working after suspend and music is playing but no actual sound is heard as if all outputs are muted but they are not. The only way to get sound working again is cold restart, reboot is not enough.
This behavior started after many changes to the sound system, specifically commit 8771127d75a1295dd32abd0022ff3750bc564706
Comment 1 Oleh Vinichenko 2024-07-16 13:48:10 UTC
Created attachment 252101 [details]
sysctl_dev_pcm
Comment 2 Oleh Vinichenko 2024-07-16 13:48:33 UTC
Created attachment 252102 [details]
sysctl_dev_hdac
Comment 3 Oleh Vinichenko 2024-07-16 13:48:56 UTC
Created attachment 252103 [details]
cat_dev_sndstat
Comment 4 Oleh Vinichenko 2024-07-16 13:49:38 UTC
Created attachment 252104 [details]
cat_dev_sndstat_with_musicpd_after_suspend
Comment 5 Oleh Vinichenko 2024-07-16 13:52:58 UTC
Created attachment 252105 [details]
pindump
Comment 6 Oleh Vinichenko 2024-07-16 13:53:18 UTC
Created attachment 252106 [details]
mixer_output
Comment 7 Oleh Vinichenko 2024-07-16 13:56:08 UTC
At some point what also helped instead cold start is putting following into /etc/rc.resume:
devctl reset hdac0
service sysctl restart
Now, with latest stable/14 this does not work.
Comment 8 Mark Linimon freebsd_committer freebsd_triage 2024-07-16 17:52:01 UTC
^Triage: notify committer of commit in question.
Comment 9 Christos Margiolis freebsd_committer freebsd_triage 2024-07-25 15:56:58 UTC
Hello Oleh,

There is no commit since 8771127d75a1295dd32abd0022ff3750bc564706 that touches anything suspend/resume-related. Are you sure the issue is not present prior this commit?

The only commits that could potentially trigger this could be either of the two (both earlier than the commit you mention):

1. https://cgit.freebsd.org/src/commit/?h=stable/14&id=d692c314d29a310efe875e9be05b0ccebe6b241d
2. https://cgit.freebsd.org/src/commit/?h=stable/14&id=d8d7907826cc0799d29b9ee9c23688704f619e86
Comment 10 Oleh Vinichenko 2024-07-25 16:00:51 UTC
my guess is too ambiguous regarding exact commit after which i started to experience issues. it very well may be these 2 commits. how can i test if they are to blame?
Comment 11 Christos Margiolis freebsd_committer freebsd_triage 2024-07-25 16:03:46 UTC
(In reply to Oleh Vinichenko from comment #10)

I would guess what you could do, although tedious, is to revert one commit before 8771127d75a1295dd32abd0022ff3750bc564706 first, to make sure the commits after it are not the problem. If this is indeed the case, then you can start reverting those 2 commits I linked to and see.

Of course, you'd need to recompile sound(4) each time you revert...
Comment 12 Oleh Vinichenko 2024-07-25 16:13:33 UTC
can i just build sound(4) without rebuilding whole kernel?
Comment 13 Christos Margiolis freebsd_committer freebsd_triage 2024-07-25 16:20:53 UTC
(In reply to Oleh Vinichenko from comment #12)
Yes, you can do

make -C sys/modules/sound KMODDIR=/boot/kernel
Comment 14 Oleh Vinichenko 2024-07-25 16:53:53 UTC
then, i will just revert 2 mentioned commits and test. if not these two i will start reverting commits one by one. other than that will git bisect be helpful in narrowing down possible "bad" commits, if any of them are the culprit?
Comment 15 Christos Margiolis freebsd_committer freebsd_triage 2024-07-25 19:58:25 UTC
(In reply to Oleh Vinichenko from comment #14)

I do not use git bisect that often, so I am not sure. But reverting one by one should certainly be helpful.