Re: xHCI immediately wakes up Asus P8Z68-V LX in S5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-12-17 at 13:28 -0800, Sarah Sharp wrote:
> On Sun, Dec 16, 2012 at 12:37:00AM +0000, Ben Hutchings wrote:
> > Since Linux 3.2.16, my desktop with an Asus P8Z68-V LX motherboard
> > always wakes up a few seconds after I shutdown.  I then have to switch
> > it off a second time.  This still occurs in Linux 3.6.9 (haven't tried
> > 3.7 yet).
> >
> > I initially bisected this to:
> > 
> > commit 13a307e1a4a10502d688ce058141bc503933214e
> > Author: Lin Ming <ming.m.lin@xxxxxxxxx>
> > Date:   Mon Nov 28 09:46:02 2011 +0800
> > 
> >     ACPICA: Fix to allow region arguments to reference other scopes
> > 
> >     commit 8931d9ea78848b073bf299594f148b83abde4a5e upstream.
> > 
> > However, that seems to be a perfectly good bug fix (the error mentioned
> > in the commit message did previously appear on this system).  I
> > therefore tried cherry-picking it onto earlier versions, and bisected
> > to:
> > 
> > commit 9777e3ce907d4cb5a513902a87ecd03b52499569
> > Author: Andiry Xu <andiry.xu@xxxxxxx>
> > Date:   Thu Oct 14 07:23:03 2010 -0700
> > 
> >     USB: xHCI: bus power management implementation
> 
> Hmm.  So if we enable PCI bus suspend for this xHCI host controller,
> then it will immediately wakeup the system on shutdown?

So it seems.

> What happens when runtime PM is enabled for the host (and any USB
> devices attached to it)?  Does the host controller stay in D3hot, or
> does it immediately pop back into D0?

It stays in D3hot.  Also, this fixes the problem.

> Can you turn on CONFIG_USB_XHCI_HCD_DEBUGGING and CONFIG_USB_DEBUG for
> your kernel and send me the dmesg?  I'm wondering if the xHCI host
> controller is either failing to complete the host suspend command, or
> perhaps failing to be halted.

This happens in S5 (soft-off), so there is no way to read dmesg
afterwards!  I just checked S3 (mem) and S4 (disk), and the system stays
properly suspended in those states.

I set sysctl kernel.printk=8 and recorded the screen during shutdown,
from which I transcribe the following:

pcieport 0000:00:1c.6: wake-up capability enabled by ACPI
xhci_hcd 0000:04:00.0: // Halt the HC
xhci_hcd 0000:04:00.0: xhci_shutdown completed - status = 1
ACPI: Preparing to enter system sleep state S5
Disabling non-boot CPUs ...
Power down.
acpi_power_off called

The first line is related to wake-on-LAN as the specified device is the
downstream port connected to the network controller.

[...]
> > No devices are connected to the xHCI.
> > 
> > 'echo disabled > /sys/bus/pci/devices/0000:04:00.0/power/wakeup' does
> > *not* work around this.
> 
> Does unloading the xHCI driver before shutdown fix this?
[...]

Yes.

Also, I tried plugging devices into the USB 3.0-capable ports.  Plugging
in a mouse fixes this.  Plugging in a super-speed SATA enclosure
doesn't.

So, as far as I can see this problem is specific to:
- Sleep in S5
- Driver loaded
- Run-time power management disabled
- No devices or super-speed device plugged in

Any of these avoid the problem:
- Sleep in S3 or S4
- Driver unloaded
- Run-time power management enabled
- Low-speed device plugged in

Ben.

-- 
Ben Hutchings
Life is like a sewer:
what you get out of it depends on what you put into it.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux