Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1612  / 3 Years ago, thu, may 6, 2021, 10:18:06

Since updating from 19.04 to 19.10, I find that moving the mouse wakes the computer from sleep. I'm using a Logitech mouse along with its Unifying receiver into a USB 3.0 port (USB 2.0 port behaves the same). This behavior is different from 19.04.



I found something similar in an old post from 2017 at Mouse movement wakes computer from suspend, can't disable it, and the output of grep --color -E '|enabled' /sys/bus/usb/devices/*/power/wakeup shows:



/sys/bus/usb/devices/1-1.3.1/power/wakeup:disabled
/sys/bus/usb/devices/1-1.3/power/wakeup:disabled
/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-1.4/power/wakeup:disabled
/sys/bus/usb/devices/2-1/power/wakeup:disabled
/sys/bus/usb/devices/2-2/power/wakeup:enabled
/sys/bus/usb/devices/3-1.4/power/wakeup:disabled
/sys/bus/usb/devices/3-1/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled


As you can see, USB device 2-2 is enabled.



and lsusb -t shows:



/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 6, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 4: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 8: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 8: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M


Should I disable it with something like this in /etc/rc.local?



# Disable
for f in /sys/bus/usb/devices/*/power/wakeup
do
echo "disabled" > $f
done


Why this different behavior, and what is the best way to disable this "new" feature in 19.10?



Update #1:



Also see...



How do I prevent mouse movement from waking up a suspended computer?



http://www.das-werkstatt.com/forum/werkstatt/viewtopic.php?f=7&t=1985



grep -i enable /proc/acpi/wakeup



EHC1      S3    *enabled   pci:0000:00:1d.0
XHC S3 *enabled pci:0000:00:14.0
PWRB S4 *enabled platform:PNP0C0C:00
LID0 S4 *enabled platform:PNP0C0D:00


shows EHC1 and XHC USB hubs (and lid and power button) enabled.



Suggested...



Add the following lines to /etc/rc.local...



echo "EHC1" > /proc/acpi/wakeup
echo "XHC" > /proc/acpi/wakeup

More From » suspend

 Answers
1

I found something similar in an old post from 2017 at Mouse movement wakes computer from suspend, can't disable it, and the output of



grep --color -E '|enabled' /sys/bus/usb/devices/*/power/wakeup



shows:



/sys/bus/usb/devices/1-1.3.1/power/wakeup:disabled
/sys/bus/usb/devices/1-1.3/power/wakeup:disabled
/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-1.4/power/wakeup:disabled
/sys/bus/usb/devices/2-1/power/wakeup:disabled
/sys/bus/usb/devices/2-2/power/wakeup:enabled
/sys/bus/usb/devices/3-1.4/power/wakeup:disabled
/sys/bus/usb/devices/3-1/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled


As you can see, USB device 2-2 is enabled. If I unplug the Logitech Unifying receiver, and plug it back in, and repeat the grep command, it now shows as disabled. This means that enabled status is only determined at boot time.



My current fix is to edit /etc/rc.local and add...



# Disable wake computer from mouse movement
for f in /sys/bus/usb/devices/*/power/wakeup
do
echo "disabled" > $f
done


just BEFORE the exit 0 found at the end of the file. This forces all USB devices to show as disabled.



Sleep still works. And the mouse movement no longer wakes from sleep.


[#4528] Friday, May 7, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
icielight

Total Points: 158
Total Questions: 92
Total Answers: 93

Location: San Marino
Member since Thu, Jun 30, 2022
2 Years ago
icielight questions
;