Re: [Bug 197863] Thinkpad X240 resume dramatically slower on kernels 4.13+

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

 



Hi,

A while ago I opened bug #197863 in the kernel bugzilla:

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

Essentially, xhci_hcd on a resume from RAM takes several seconds on a
Thinkpad X240 that is equipped with a Sierra LTE modem after an
upgrade to 4.13:

On Mon, Nov 20, 2017 at 11:24:09AM +0000, bugzilla-daemon@xxxxxxxxxxxxxxxxxxx wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=197863
> 
> --- Comment #2 from Greg Kroah-Hartman (greg@xxxxxxxxx) ---
> On Mon, Nov 20, 2017 at 09:02:46AM +0000, bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
> wrote:
> > I think your speculation is right, the xhci has taken too much time for a
> > reset:
> > [   39.292052] usb 1-4: reset high-speed USB device number 2 using xhci_hcd
> > [   45.812046] usb 1-4: device descriptor read/64, error -110
> > [   46.262082] usb 1-7: reset full-speed USB device number 3 using xhci_hcd
> > I don't know if it should be reset in this case, let me switch to usb
> > component for suggestion.
> 
> All USB bugs should be sent to the linux-usb@xxxxxxxxxxxxxxx mailing
> list, and not entered into bugzilla.  Please bring this issue up there,
> if it is still a problem in the latest kernel release.

The trouble persists in 4.15.0, and wakeup keeps being fast in 4.12.X.

I have just looked at things a bit more closely, and it would seem
the changes are due to the USB subsystem blocking until the (slow)
LTE modem sends an all clear.

Here's a dmesg excerpt from 4.15.0 slow resume:


[  417.234716] ACPI: Low-level resume complete
...about 30 lines of non-USB jabber elided here...
[  419.184328] usb usb1: root hub lost power or was reset
[  419.184332] usb usb2: root hub lost power or was reset
[  419.463469] usb 3-1: reset high-speed USB device number 2 using ehci-pci
[  419.583449] usb 1-8: reset high-speed USB device number 4 using xhci_hcd
[  419.588769] psmouse serio1: synaptics: queried min coordinates: x [1232..], y [1216..]
[  419.821258] restoring control 00000000-0000-0000-0000-000000000101/0/2
[  419.913513] usb 1-4: reset high-speed USB device number 9 using xhci_hcd
...this is when the system hangs; the screen is on, but now wakeup
actions are executed until...
[  427.343486] usb 1-4: device descriptor read/64, error -110
[  427.662438] OOM killer enabled.
[  427.662440] Restarting tasks ... done.
[  427.683062] PM: suspend exit

If you look at the corresponding sequence in 4.12.2:

[   31.678001] usb 1-4: reset high-speed USB device number 2 using xhci_hcd
[   31.848202] usb 1-4: device firmware changed
[   31.988048] usb 1-7: reset full-speed USB device number 3 using xhci_hcd
[   32.159069] PM: resume of devices complete after 1170.527 msecs
[   32.159546] OOM killer enabled.
[   32.159548] Restarting tasks ... 
[   32.159650] usb 1-4: USB disconnect, device number 2
[   32.162274] done.
[   32.297920] usb 1-4: new high-speed USB device number 5 using xhci_hcd
[   32.469119] usb 1-4: New USB device found, idVendor=8087, idProduct=0716
[   32.469124] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   35.639922] usb 1-4: USB disconnect, device number 5
[   38.438173] usb 1-4: new high-speed USB device number 6 using xhci_hcd
[   38.616527] usb 1-4: New USB device found, idVendor=1199, idProduct=a001
[   38.616535] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   38.616539] usb 1-4: Product: Sierra Wireless EM7345 4G LTE
[   38.616543] usb 1-4: Manufacturer: Sierra Wireless Inc.
[   38.616545] usb 1-4: SerialNumber: 013937002544516

...it seems that the resume of the Sierra card happens
"aynchronously", if you will.  In the "slow" cases, I just notice, no
messages about the Sierra Wireless card appear in dmesg, but the
modem still works.

Now, interestingly, there are quick resumes in 4.15.0, too, now and
then.  In that case, things look pretty much like on 4.12.2.  Here's
a 4.15.0 fast resume example:

[  873.127570] usb 1-4: device firmware changed
[  873.277351] usb 1-8: reset high-speed USB device number 4 using xhci_hcd
[  873.515141] restoring control 00000000-0000-0000-0000-000000000101/0/2
[  873.583238] OOM killer enabled.
[  873.583240] Restarting tasks ... 
[  873.583339] usb 1-4: USB disconnect, device number 10
[  873.586356] done.
[  873.604420] PM: suspend exit
[  873.737283] usb 1-4: new high-speed USB device number 11 using xhci_hcd
[  880.867398] usb 1-4: device descriptor read/64, error -110
[  881.175558] usb 1-4: New USB device found, idVendor=1199, idProduct=a001
[  881.175563] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  881.175566] usb 1-4: Product: Sierra Wireless EM7345 4G LTE
[  881.175568] usb 1-4: Manufacturer: Sierra Wireless Inc.
[  881.175570] usb 1-4: SerialNumber: 013937002544516

Any guess what might be behind this?

Thanks,

              Markus

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux