Bug 205333 - Shutdown and reboot do not work since commit "ALSA: hda: Flush interrupts on disabling"
Summary: Shutdown and reboot do not work since commit "ALSA: hda: Flush interrupts on ...
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Jaroslav Kysela
Depends on:
Reported: 2019-10-27 23:17 UTC by Jonas Witschel
Modified: 2019-11-06 18:09 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.3.4
Tree: Mainline
Regression: Yes


Description Jonas Witschel 2019-10-27 23:17:08 UTC
Since kernel 5.3.4, my system with an ASUS PRIME B350M-A mainboard does not properly shutdown or reboot any more, after a "shutdown -f"/"reboot -f" it just hangs indefinitely. Interestingly SysRq+B is still able to reboot the system (even after the shutdown/reboot got stuck), while the normal reboot system call is not.

Kernel 5.3.2 (=5.3.3) is the last version that works fine, the problem still persists with the latest 5.4-rc5.

I have bisected the problem down to

commit 175b350048345a66bbfecc59da3c1339f6133422
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Jul 20 12:33:37 2019 +0100

    ALSA: hda: Flush interrupts on disabling
    [ Upstream commit caa8422d01e983782548648e125fd617cadcec3f ]

Reverting this commit restores the normal shutdown/reboot behaviour on kernel 5.4-rc5.
Comment 1 Jonas Witschel 2019-10-27 23:42:03 UTC
The culprit appears to be the added synchronize_irq(bus->irq) in sound/hda/hdac_controller.c, removing it restores the normal behaviour. The reordering of azx_stop_chip(chip) in sound/pci/hda/hda_intel.c does not necessarily need to be reverted, at least it does not seem to have any negative effect on my system.
Comment 2 Takashi Iwai 2019-10-28 07:40:45 UTC
Thanks for the report and the analysis.

I think the whole commit is bogus, even the azx_stop_chip() calls looks suspicious although it didn't break much, so far.  (If any, we should reorder the call sequence there.)

I'm going to revert the commit.
Comment 3 Jonas Witschel 2019-11-06 18:09:19 UTC
The revert was included in kernel 5.4-rc6 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1a7f60b9df614bb36d14dc0c0bc898a31b2b506f) and backported to 4.4.199, 4.9.199, 4.14.152, 4.19.82 and 5.3.9. I tested version 5.3.9 on my system and confirm that shutdown and reboot work as expected once again. Thank you for your quick fix!

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