I've checked Wake up from suspend using wireless USB keyboard or mouse (for any Linux Distro) ; its answer appears to already be applied on my PC: the string "enabled
" is written to the file /sys/bus/usb/devices/<device>/power/wakeup
.
$ grep . /sys/bus/usb/devices/*/product
/sys/bus/usb/devices/1-12/product:Integrated_Webcam_HD
/sys/bus/usb/devices/1-2/product:USB Receiver
/sys/bus/usb/devices/usb1/product:xHCI Host Controller
/sys/bus/usb/devices/usb2/product:xHCI Host Controller
$ grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-2/power/wakeup:enabled
/sys/bus/usb/devices/1-4/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
It looks like usb device 1-2
is my Logitech usb receiver, and its wakeup
file already has the string "enabled
". But none of 1) moving my mouse, 2) clicking mouse buttons, or 3) pressing keyboard buttons wakes Ubuntu from sleep -- only lifting the laptop lid does.
What gives? What else can be done to enable wake-from-sleep by wireless mouse/keyboard?
If relevant:
$ uname -a
Linux linuxbox 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Mouse: Logitech Performance MX
Keyboard: Logitech K800
Connected by wireless dongle to usb port.