Bug 214045
Summary: | HDA/KBL: Resetting link during shutdown hangs the machine | ||
---|---|---|---|
Product: | Drivers | Reporter: | Imre Deak (imre.deak) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | NEW --- | ||
Severity: | normal | CC: | bugs, imre.deak, tiwai, youling257 |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 5.13-rc1 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Fix to prevent link reset
Patch1/3 for codec suspend-at-shutdown Patch2/3 for codec suspend-at-shutdown Patch3/3 for codec suspend-at-shutdown Fix to prevent link reset2 |
Description
Imre Deak
2021-08-11 17:26:22 UTC
I'm fine with your suggested patch if that's confirmed to work. My slight remaining suspect is about the leftover codec driver activity. We have the shutdown hook for each codec driver, but it's not always set up, and it might be wise to forcibly runtime-suspend at shutdown. The patch set below (consisting of 3 patches) does it. It's totally untested. Created attachment 298295 [details]
Patch1/3 for codec suspend-at-shutdown
Created attachment 298297 [details]
Patch2/3 for codec suspend-at-shutdown
Created attachment 298299 [details]
Patch3/3 for codec suspend-at-shutdown
Takashi, thanks. Youling could you please give a go to Takashi's 3 patches instead of the one from me? test 3 patches can shutdown and suspend. OK, thanks, that's a good news! Though, those patches are a bit too intrusive for 5.14 release, as it has too wide influence. So I'd like to push this for 5.15 at first, while we can take a less intrusive workaround by Imre. Do I understand correctly that Imre's patch worked for you? Yes, Imre's patch worked for me. Then Imre, could you submit a proper patch for merge? I'd merge and push for 5.14-rc7. Created attachment 298331 [details]
Fix to prevent link reset2
Takashi, ok will send it. I suppose the final correct state is still that the link needs to be reset before power-off. In that case are you going to revert later this fixup from me and would the attached patch be better with less changes?
Yes, that looks better! BTW, I'm thinking whether we might want to address it in PCI core level. Basically applying the runtime resume forcibly at PCI shutdown is utterly redundant for the devices like HD-audio that will do suspend again at its shutdown callback. Instead, those devices prefer runtime-suspended at shutdown from the beginning. It can be achieved by introducing a flag in struct pci_dev. But this needs discussion with PCI people in anyway. test kernel 5.15-rc1. failed shutdown again. test Revert "ALSA: hda: Drop workaround for a hang at shutdown again" can shutdown. the three patches not fix problem. Hrm, that's bad. Then I revert the change again. Thanks for checking. Looking at https://patchwork.freedesktop.org/series/94719/ I don't think the revert helps. Under 'known issues' in BAT: igt@core_hotunplug@unbind-rebind: fi-cfl-8700k: PASS -> INCOMPLETE (i915#4130) fi-rkl-11600: PASS -> INCOMPLETE (i915#4130) fi-cfl-8109u: PASS -> INCOMPLETE (i915#4130) (In reply to Maarten Lankhorst from comment #16) > Looking at https://patchwork.freedesktop.org/series/94719/ > I don't think the revert helps. > > Under 'known issues' in BAT: > > igt@core_hotunplug@unbind-rebind: > > fi-cfl-8700k: PASS -> INCOMPLETE (i915#4130) > > fi-rkl-11600: PASS -> INCOMPLETE (i915#4130) > > fi-cfl-8109u: PASS -> INCOMPLETE (i915#4130) OK, could you try bisection please? |