Celeb Glow
updates | March 21, 2026

How to wake Ubuntu 20.04 from sleep with wireless mouse/keyboard?

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.

3

1 Answer

  1. First, enter the command lsusb. This will show you the names of your USB devices, like this:
$ lsusb
Bus 002 Device 002: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 003: ID 413c:2010 Dell Computer Corp. Keyboard
Bus 007 Device 002: ID 413c:1003 Dell Computer Corp. Keyboard Hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  1. Find the name of the device you want to use to wake the computer (for example, Dell Computer Corp. Keyboard) and note the number next to Bus (example: Bus 007).
  2. Type sudo nano /sys/bus/usb/devices/usb7/power/wakeup replacing usb7 with the device's Bus number (without the 0's in front)
  3. Change the word disabled for enabled and save the file.
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy