Bug 206791 - Lenovo C940 - Freeze on reboot when connecting/disconnecting USB-C charger
Summary: Lenovo C940 - Freeze on reboot when connecting/disconnecting USB-C charger
Status: NEEDINFO
Alias: None
Product: Drivers
Classification: Unclassified
Component: IOMMU (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Lu Baolu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-08 21:32 UTC by A
Modified: 2020-11-19 03:45 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.4, 5.5, 5.6-rc4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Dmesg when disconnecting power, rebooting and freeze. (101.50 KB, text/plain)
2020-03-08 21:32 UTC, A
Details
Journalctl when disconnecting power usb-c, rebooting and freeze. (549.98 KB, text/plain)
2020-03-08 21:32 UTC, A
Details
Interrupts counters (2.51 KB, application/zip)
2020-07-15 18:35 UTC, A
Details

Description A 2020-03-08 21:32:10 UTC
Created attachment 287833 [details]
Dmesg when disconnecting power, rebooting and freeze.

Hello,

I have a Lenovo C940 with Manjaro, tested with kernels 5.4, 5.5 and 5.6-rc4. If I reboot/shutdown the laptop after connecting/disconnecting the usb-c charger it "may" leads to system freeze during reboot after OS shutdown.
This is not a systematic bug, when it happens, the OS cleanly shutdown, the screen becomes black but with backlight still on and freeze. Sysreq keys do not work at this stage. Nothing else is connected to the laptop. I need to force shutdown by keeping the power button pushed for a few seconds.
When powering on back the laptop, if I do not plug/unplug anything on the usb-c power port, bug will most probably occur again at the next reboot. The only systematic way to be able to keep the laptop rebooting correctly is to plug back the power usb-c when the laptop is off.
I joined the dmesg/system journal logs after a first clean boot, with power disconnection and then a reboot with freeze. Under Windows all seems to work fine.
Also, this is not happening 100% of the time. I may have several successful reboots while having connected/disconnected usb-c. Most of the time, only repeating a connection/disconnection is enough to get the bug. I tried also with a usb-c dock and same bug appeared.
Not sure how to get more logs from kernel after journal daemon is turned off by the OS.

I welcome any suggestions to narrow down this bug. Thanks for the help.
Comment 1 A 2020-03-08 21:32:51 UTC
Created attachment 287835 [details]
Journalctl when disconnecting power usb-c, rebooting and freeze.
Comment 2 Zhang Rui 2020-06-29 14:03:07 UTC
we know that it could causes an interrupts storm.
please try
1. grep . /sys/firmware/acpi/interrupts > interrupt-before-1; sleep 10; grep . /sys/firmware/acpi/interrupts > interrupt-after-1
2. connect/disconnect the USB-C Charger
3. grep . /sys/firmware/acpi/interrupts > interrupt-before-2; sleep 10; grep . /sys/firmware/acpi/interrupts > interrupt-after-2

it is probably an interrupt storm has occurred and it freezes the reboot process.
Comment 3 A 2020-07-15 18:35:40 UTC
Created attachment 290303 [details]
Interrupts counters

cd /sys/firmware/acpi/interrupts/
 grep . * > /tmp/interrupt-before-1; sleep 10; grep . * > /tmp/interrupt-after-1
 grep . * > /tmp/interrupt-before-2; sleep 10; grep . * > /tmp/interrupt-after-2
Comment 4 A 2020-07-15 18:37:11 UTC
(In reply to Zhang Rui from comment #2)
> we know that it could causes an interrupts storm.
> please try
> 1. grep . /sys/firmware/acpi/interrupts > interrupt-before-1; sleep 10; grep
> . /sys/firmware/acpi/interrupts > interrupt-after-1
> 2. connect/disconnect the USB-C Charger
> 3. grep . /sys/firmware/acpi/interrupts > interrupt-before-2; sleep 10; grep
> . /sys/firmware/acpi/interrupts > interrupt-after-2
> 
> it is probably an interrupt storm has occurred and it freezes the reboot
> process.

Thanks for your feedback, I joined the results for your command. It has been executed under Fedora 32 with Kernel 5.7.8-200.fc32.x86_64.
Comment 5 A 2020-07-26 13:16:50 UTC
Finally I was able to avoid the freeze by adding intel_iommu=off to Grub. Disabling the VT-d option in the Bios works too. 
This seems related to: https://bugzilla.kernel.org/show_bug.cgi?id=206571

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