You are not logged in.

#1 2018-03-08 05:20:15

v2vm
Member
Registered: 2018-03-03
Posts: 4

[Solved] ThinkPad T440: Mouse cannot wake up the PC from suspend

Update:
It's caused by a BIOS setting after all!

In BIOS -> USB, there's a setting to "enable USB 3.0 support", options being Auto, Enabled, or Disabled.
It was set to be AUTO or Enabled. Now if I switch it to Disabled, wakeup from suspend by mouse is back to work.
The downside is that USB 3.0 will be gone, which is okay for this laptop, because its 2 USB ports will be constantly occupied by a mouse and a keyboard (as an office workstation hooked to an external monitor).

For now I'll consider this problem solved.

I'll experiment with changing the BIOS USB 3.0 setting to AUTO/Enabled and playing with the "Linux Foundation 2.0 root hub" shown under lsusb.


------- Original Post ----------

Hi,

A friend of mine has a ThinkPad T440 with Antergos (please bare with me, it's not about Antergos), its wireless mouse used to be able to wake T440 from sleep, roughly/maybe after an (overdue huge) update in mid February, the mouse stopped being able to wake up the system. He asked me for help.

I offered him to install real Arch, because Antergos has weird config files hidden here and there, making it hard to diagnose.

So here's what I tried:

a. In BIOS, USB Ports are set to be "always ON" and able to "charge other devices", also with "Enable USB 3.0" being "Auto" (v.s. Enabled/Disabled).
b. A quick try of Xubuntu and Linux Mint xfce, neither worked.
c. Tried Win10, and damn it, the mouse wakes up this T440 beautifully. So the laptop/mouse/BIOS should be good.
d. I gave him like 2 minutes of speach about how bad Antergos/Manjaro can be, and installed Arch the Arch way, with systemd and Xfce.
e. Tried the usual way I would set up a mouse to wake up on Arch, described down below, but it still did not work on this T440, face lost.
f. Tried swapping mouses from other Arch computers, but none of them worked on this T440, even though they did work on my Arch desktop/laptop.
g. Tried the mouse from T440 on my own Arch desktop/laptop, and it worked beautifully, so again, the mouse is good.
h. Currently there's only systemd that controls power, no acpid/tlp/powertop installed, as suggested here, but I gave them a try, none worked.
i. Tried both linux and linux-lts kernels, neither worked.

And here's how I had tried to set up the mouse to wake up the computer from suspend.
The method below works reliably on my own Arch desktop/laptop.

$lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Note the ID is 046d:c52f, for the Logitech mouse, at Bus 002, Dev 002.

$lsusb -t
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M

Here, Bus 2 Dev 2 is at Bus 2 Port 1 (2-1).

Enabling the USB to wakeup:

# echo enabled > /sys/bus/usb/devices/2-1/power/wakeup
# echo enabled > /sys/bus/usb/devices/2/power/wakeup

To make it consistent across boot, editing /etc/rc.local and adding these:

echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb3/power/wakeup
exit 0

Then editing /etc/udev/rules.d/90-wireless-mouse-wakeup.rules, and adding these with "046d:c52f":

SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"

Then reboot, after which, I get:

$ grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-1/power/wakeup:enabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:enabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
 $ cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
LID	  S4	*enabled   platform:PNP0C0D:00
SLPB	  S3	*enabled   platform:PNP0C0E:00
IGBE	  S4	*enabled   pci:0000:00:19.0
EXP2	  S4	*disabled  pci:0000:00:1c.1
XHCI	  S3	*enabled   pci:0000:00:14.0
EHC1	  S3	*enabled   pci:0000:00:1d.0 

Still, if I suspend with xfce4-session-logout (the xfce logout button), moving or clicking the mouse couldn't wake up this T440 (but Win10 can).

What else should I try?

Thank you very much!

Last edited by v2vm (2018-03-09 04:44:09)

Offline

#2 2018-03-08 23:24:07

v2vm
Member
Registered: 2018-03-03
Posts: 4

Re: [Solved] ThinkPad T440: Mouse cannot wake up the PC from suspend

The arch wiki has this section:
https://wiki.archlinux.org/index.php/ud … USB_device

I tried it:

$ lsusb | grep Logitech
Bus 002 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver

$ grep c52f /sys/bus/usb/devices/*/idProduct
/sys/bus/usb/devices/2-1/idProduct:c52f

$ sudo nano /etc/udev/rules.d/90-wireless-mouse-wakeup.rules
ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52f", ATTR{power/wakeup}="enabled", ATTR{driver/2-1/power/wakeup}="enabled"

Saved, rebooted, still not working.
Also, this cannot be persistent, because sometimes after reboot, the mouse changes from /sys/bus/usb/devices/2-1 to 1-1, 1-2, or 2-2.

Two more observations:
1. During sleep, the USB ports can power/charge other devices, so the USB ports are indeed active.
2. I tried blacklisting the USB mouse from autosuspending using the method described on wiki

Editing /etc/udev/rules.d/80-blacklist-usb.rules with this:

# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c52f", GOTO="power_usb_rules_end"

Did not work.

Last edited by v2vm (2018-03-09 01:11:33)

Offline

#3 2018-03-09 03:52:07

v2vm
Member
Registered: 2018-03-03
Posts: 4

Re: [Solved] ThinkPad T440: Mouse cannot wake up the PC from suspend

As and example:
At 19:39: I suspended the system,
For 30s: I'd been moving and clicking the mouse around with nothing happening;
At 19:40: I had to press the power button to bring it back.

Below are some journalctl logs, with NetworkManger and nm-applet lines removed.

$ journalctl --since 19:39
-- Logs begin at Wed 2018-03-07 15:39:07 PST, end at Thu 2018-03-08 19:40:31 PST. --
19:39:04 t440 kernel: wlp3s0: deauthenticating from e0:3f:49:0c:ba:f8 by local choice (Reason: 3=DEAUTH_LEAVING)
19:39:04 t440 kernel: wlp3s0: failed to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-22)
19:39:04 t440 kernel: wlp3s0: failed to remove key (2, ff:ff:ff:ff:ff:ff) from hardware (-22)
19:39:04 t440 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
19:39:04 t440 dbus-daemon[378]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.1' (uid=0 pid=381 comm="/usr/bin/NetworkManager --no-daemon ")
19:39:04 t440 systemd[1]: Starting Network Manager Script Dispatcher Service...
19:39:04 t440 dbus-daemon[378]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
19:39:04 t440 systemd[1]: Started Network Manager Script Dispatcher Service.
19:39:04 t440 systemd[1]: Reached target Sleep.
19:39:04 t440 systemd[1]: Starting Suspend...
19:39:04 t440 systemd-sleep[1717]: Suspending system...
19:39:04 t440 kernel: PM: suspend entry (deep)
19:40:24 t440 kernel: PM: Syncing filesystems ... done.
19:40:24 t440 kernel: Freezing user space processes ... (elapsed 0.051 seconds) done.
19:40:24 t440 kernel: OOM killer disabled.
19:40:24 t440 kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
19:40:24 t440 kernel: Suspending console(s) (use no_console_suspend to debug)
19:40:24 t440 kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
19:40:24 t440 kernel: sd 0:0:0:0: [sda] Stopping disk
19:40:24 t440 kernel: e1000e: EEE TX LPI TIMER: 00000011
19:40:24 t440 kernel: ACPI: Preparing to enter system sleep state S3
19:40:24 t440 kernel: ACPI: EC: event blocked
19:40:24 t440 kernel: ACPI: EC: EC stopped
19:40:24 t440 kernel: PM: Saving platform NVS memory
19:40:24 t440 kernel: Disabling non-boot CPUs ...
19:40:24 t440 kernel: smpboot: CPU 1 is now offline
19:40:24 t440 kernel: smpboot: CPU 2 is now offline
19:40:24 t440 kernel: smpboot: CPU 3 is now offline
19:40:24 t440 kernel: ACPI: Low-level resume complete
19:40:24 t440 kernel: ACPI: EC: EC started
19:40:24 t440 kernel: PM: Restoring platform NVS memory
19:40:24 t440 kernel: Enabling non-boot CPUs ...
19:40:24 t440 kernel: x86: Booting SMP configuration:
19:40:24 t440 kernel: smpboot: Booting Node 0 Processor 1 APIC 0x1
19:40:24 t440 kernel:  cache: parent cpu1 should not be sleeping
19:40:24 t440 kernel: CPU1 is up
19:40:24 t440 kernel: smpboot: Booting Node 0 Processor 2 APIC 0x2
19:40:24 t440 kernel:  cache: parent cpu2 should not be sleeping
19:40:24 t440 kernel: CPU2 is up
19:40:24 t440 kernel: smpboot: Booting Node 0 Processor 3 APIC 0x3
19:40:24 t440 kernel:  cache: parent cpu3 should not be sleeping
19:40:24 t440 kernel: CPU3 is up
19:40:24 t440 kernel: ACPI: Waking up from system sleep state S3
19:40:24 t440 kernel: usb usb1: root hub lost power or was reset
19:40:24 t440 kernel: usb usb2: root hub lost power or was reset
19:40:24 t440 kernel: ACPI: EC: event unblocked
19:40:24 t440 kernel: sd 0:0:0:0: [sda] Starting disk
19:40:24 t440 kernel: usb 3-1: reset high-speed USB device number 2 using ehci-pci
19:40:24 t440 kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
19:40:24 t440 kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
19:40:24 t440 kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
19:40:24 t440 kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
19:40:24 t440 kernel: ata1.00: ACPI cmd ef/10:09:00:00:00:a0 (SET FEATURES) succeeded
19:40:24 t440 kernel: ata1.00: supports DRM functions and may not be fully accessible
19:40:24 t440 kernel: ata1.00: disabling queued TRIM support
19:40:24 t440 kernel: ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
19:40:24 t440 kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
19:40:24 t440 kernel: ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
19:40:24 t440 kernel: ata1.00: ACPI cmd ef/10:09:00:00:00:a0 (SET FEATURES) succeeded
19:40:24 t440 kernel: ata1.00: supports DRM functions and may not be fully accessible
19:40:24 t440 kernel: ata1.00: disabling queued TRIM support
19:40:24 t440 kernel: ata1.00: configured for UDMA/133
19:40:24 t440 kernel: usb 1-1: reset full-speed USB device number 2 using xhci_hcd
19:40:24 t440 kernel: acpi LNXPOWER:02: Turning OFF
19:40:24 t440 kernel: OOM killer enabled.
19:40:24 t440 kernel: Restarting tasks ... done.
19:40:24 t440 systemd-sleep[1717]: System resumed.
19:40:24 t440 systemd[1]: Started Suspend.
19:40:24 t440 systemd[1]: sleep.target: Unit not needed anymore. Stopping.
19:40:24 t440 systemd[1]: Stopped target Sleep.
19:40:24 t440 systemd[1]: Reached target Suspend.
19:40:24 t440 systemd[1]: suspend.target: Unit not needed anymore. Stopping.
19:40:24 t440 systemd[1]: Stopped target Suspend.
19:40:24 t440 systemd-logind[380]: Operation 'sleep' finished.
19:40:24 t440 kernel: PM: suspend exit
19:40:24 t440 kernel: e1000e: enp0s25 NIC Link is Down
19:40:24 t440 kernel: IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
19:40:25 t440 kernel: IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
19:40:25 t440 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
19:40:25 t440 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
19:40:25 t440 kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
19:40:28 t440 kernel: wlp3s0: authenticate with e0:3f:49:0c:ba:fc
19:40:28 t440 kernel: wlp3s0: send auth to e0:3f:49:0c:ba:fc (try 1/3)
19:40:28 t440 kernel: wlp3s0: authenticated
19:40:28 t440 kernel: wlp3s0: associate with e0:3f:49:0c:ba:fc (try 1/3)
19:40:28 t440 kernel: wlp3s0: RX AssocResp from e0:3f:49:0c:ba:fc (capab=0x11 status=0 aid=2)
19:40:28 t440 kernel: wlp3s0: associated
19:40:28 t440 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
19:40:30 t440 systemd-udevd[1804]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
19:40:31 t440 dbus-daemon[378]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.1' (uid=0 pid=381 comm="/usr/bin/NetworkManager --no-daemon ")
19:40:31 t440 systemd[1]: Starting Network Manager Script Dispatcher Service...
19:40:31 t440 dbus-daemon[378]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
19:40:31 t440 systemd[1]: Started Network Manager Script Dispatcher Service.

Offline

Board footer

Powered by FluxBB