Skip to contentSkip to conversation

New: Shutdown successful but machine does not power off

Bug 216243 [email protected] 1 participant 5 messages Jul 12, 2022 – Jul 20, 2022 USB

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=216243

               URL: http://bbs.archlinux.org/viewtopic.php?id=277872
            Bug ID: 216243
           Summary: Shutdown successful but machine does not power off
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.18.8, 5.18.9, 5.18.10
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: USB
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
        Regression: No

Created attachment 301404
--> https://bugzilla.kernel.org/attachment.cgi?id=301404&action=edit
journalctl -b -1 --no-pager > log.txt

Laptop will not power off with kernel 5.18.8 and above.

Kernel 5.18.10 with 9245c6c1f0095d1e9d7862253680cb1e53e65e76 reverted works as expected.

-----------------

$ git bisect good
9245c6c1f0095d1e9d7862253680cb1e53e65e76 is the first bad commit
commit 9245c6c1f0095d1e9d7862253680cb1e53e65e76
Author: Mathias Nyman <[email protected]>
Date:   Thu Jun 23 14:19:43 2022 +0300

xhci: turn off port power in shutdown

commit 83810f84ecf11dfc5a9414a8b762c3501b328185 upstream.

If ports are not turned off in shutdown then runtime suspended self-powered USB devices may survive in U3 link state over S5.

During subsequent boot, if firmware sends an IPC command to program the port in DISCONNECT state, it will time out, causing significant delay in the boot time.

Turning off roothub port power is also recommended in xhci specification 4.19.4 "Port Power" in the additional note.

Link:
https://lore.kernel.org/r/[email protected]

 drivers/usb/host/xhci-hub.c |  2 +-
 drivers/usb/host/xhci.c     | 15 +++++++++++++--
 drivers/usb/host/xhci.h     |  2 ++
 3 files changed, 16 insertions(+), 3 deletions(-)
$ git bisect log
git bisect start
# bad: [2437f53721bcd154d50224acee23e7dbb8d8c62b] Linux 5.18.8
git bisect bad 2437f53721bcd154d50224acee23e7dbb8d8c62b
# good: [7afbac05cb1c95e286ce97a40ee1c9f1791446c7] Linux 5.18.7
git bisect good 7afbac05cb1c95e286ce97a40ee1c9f1791446c7
# good: [296692f5fe5965ee8e2f3690abe18815ee8c0d48] regmap-irq: Fix offset/index
mismatch in read_sub_irq_data()
git bisect good 296692f5fe5965ee8e2f3690abe18815ee8c0d48
# bad: [d0368d4b1e294dd7ed7e1e678e8c95c906dab338] iio: accel: mma8452: ignore
the return value of reset operation
git bisect bad d0368d4b1e294dd7ed7e1e678e8c95c906dab338
# good: [27702e63d2baa759e07084cccac60a00818b5848] s390/crash: add missing
iterator advance in copy_oldmem_page()
git bisect good 27702e63d2baa759e07084cccac60a00818b5848
# bad: [d5c672ce67b450889ce7721ebfe7b62905d36a06] btrfs: fix race between
reflinking and ordered extent completion
git bisect bad d5c672ce67b450889ce7721ebfe7b62905d36a06
# bad: [d95ac8b920de1d39525fadc408ce675697626ca6] usb: gadget: uvc: fix list
double add in uvcg_video_pump
git bisect bad d95ac8b920de1d39525fadc408ce675697626ca6
# bad: [9245c6c1f0095d1e9d7862253680cb1e53e65e76] xhci: turn off port power in
shutdown
git bisect bad 9245c6c1f0095d1e9d7862253680cb1e53e65e76
# good: [0e72cea60cb8b6791a194e04cf0abdd57780cd13] s390/crash: make
copy_oldmem_page() return number of bytes copied
git bisect good 0e72cea60cb8b6791a194e04cf0abdd57780cd13
# first bad commit: [9245c6c1f0095d1e9d7862253680cb1e53e65e76] xhci: turn off
port power in shutdown
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 216243] Shutdown successful but machine does not power off

https://bugzilla.kernel.org/show_bug.cgi?id=216243

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from [email protected] ---
Would you mind sharing a new log with xhci dynamic debug enabled as is described here [1]?

Enable the debug output first, then try to reproduce the issue, and finally collect the log file.

[1]
https://lore.kernel.org/linux-usb/[email protected]/T/#m011e17c6eedcf0e8fafbedf60caed1c2e8c7579f

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 216243] Shutdown successful but machine does not power off

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216243

--- Comment #2 from [email protected] ---
Sure, I will try, but one question first: once dynamic debug is enabled, and I get the log, how do I disable it? Is it reset at reboot?
________________________________
From: [email protected] <[email protected]>
Sent: Wednesday, July 20, 2022 4:24:45 AM
To: Bruce Minaker <[email protected]>
Subject: [Bug 216243] Shutdown successful but machine does not power off

https://bugzilla.kernel.org/show_bug.cgi?id=216243

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from [email protected] ---
Would you mind sharing a new log with xhci dynamic debug enabled as is described here [1]?

Enable the debug output first, then try to reproduce the issue, and finally collect the log file.

[1]
https://lore.kernel.org/linux-usb/[email protected]/T/#m011e17c6eedcf0e8fafbedf60caed1c2e8c7579f

--
You may reply to this email to add a comment.

You are receiving this mail because:
You reported the bug.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 216243] Shutdown successful but machine does not power off

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216243

--- Comment #3 from [email protected] ---
Created attachment 301464
--> https://bugzilla.kernel.org/attachment.cgi?id=301464&action=edit
dynamic debug on, journalctl -b -1 --no-pager > log.txt

update to latest kernel 5.18.12-arch1-1

echo 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control reboot (machine fails to power off)

journalctl -b -1 --no-pager > log.txt

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 216243] Shutdown successful but machine does not power off

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216243

--- Comment #4 from [email protected] ---
(In reply to bminaker from comment #2)

Quoted 2 lines

Sure, I will try, but one question first: once dynamic debug is enabled, and I get the log, how do I disable it? Is it reset at reboot?

Yes, rebooting will turn off dynamic debug output.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.