I have been banging my head against a wall for a couple days on this...I have read through several forums...etc. and nothing has worked. My machine is a Dell Optiplex 330 which originally ran Windows 10 and the wake from USB keyboard/mouse worked fine. Now, I can't seem to get my computer to wakeup from suspend with my keyboard and/or mouse no matter what I do. Any thoughts?
Asked
Active
Viewed 1.1k times
2 Answers
1
Below is a pure udev way of doing what is suggested https://askubuntu.com/a/848699/1048516.
- Become root
- Get a rough idea of where mice and keyboards are connected:
# udevadm info /dev/input/by-path/*-kbd
P: /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1/2-3.1:1.0/0003:045E:001D.0002/input/inp
ut4/event4
[...]
# udevadm info /dev/input/by-path/*-mouse | grep P:
P: /devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4:1.0/0003:046D:C03D.0001/input/input3/event3
P: /devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4:1.0/0003:046D:C03D.0001/input/input3/mouse0
- from the path, keyboard is at usb2/2-3/2-3.1 and mouse is at usb2/2-4
- Check current state of wakeup:
# grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-10/power/wakeup:disabled
/sys/bus/usb/devices/2-3.1/power/wakeup:disabled
/sys/bus/usb/devices/2-3/power/wakeup:disabled
/sys/bus/usb/devices/2-4/power/wakeup:disabled
/sys/bus/usb/devices/2-8/power/wakeup:disabled
/sys/bus/usb/devices/4-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
/sys/bus/usb/devices/usb4/power/wakeup:disabled
- Add the below to the file /etc/udev/rules.d/10-wake-computer-with-keyboard-or-mouse.rules
# /etc/udev/rules.d/10-wake-computer-with-keyboard-or-mouse.rules
# - enable wakeup on ALL USB hubs (0-99)
# e.g. ls /sys/bus/usb/devices/usb*
# - rumor is that this step may not be necessary
# on all computers
# (I couldn't figure out how to enable wake on
# only parent hub of the keyboard and mouse.)
KERNEL=="usb[0-9]|usb[0-9][0-9]", SUBSYSTEM=="usb", DRIVER=="usb", ATTR{power/wakeup}="enabled"
# enable wakeup for all keyboards
# Keyboards are HID class 3 protocol 1 devices.
SUBSYSTEM=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ATTR{../power/wakeup}="enabled"
# enable wakeup for all mice (button click, not movement)
# Mice are HID class 3 protocol 2 devices.
SUBSYSTEM=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ATTR{../power/wakeup}="enabled"
- reload and trigger udev:
# systemctl restart udev.service
# udevadm trigger
- check allowed wakeup status again:
# grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-10/power/wakeup:disabled
/sys/bus/usb/devices/2-3.1/power/wakeup:enabled
/sys/bus/usb/devices/2-3/power/wakeup:disabled
/sys/bus/usb/devices/2-4/power/wakeup:enabled
/sys/bus/usb/devices/2-8/power/wakeup:disabled
/sys/bus/usb/devices/4-1/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:enabled
/sys/bus/usb/devices/usb2/power/wakeup:enabled
/sys/bus/usb/devices/usb3/power/wakeup:enabled
/sys/bus/usb/devices/usb4/power/wakeup:enabled
- test (one of various methods)
# systemctl unmask suspend.target
# systemctl suspend
lickdragon
- 13
0
I've experienced this before albeit rarely.
Try plugging in a ps/2 keyboard and/or mouse to see if this solves your problem.
Some mobos have issues with USB ports "going to sleep".
Also, reboot, go into the BIOS and check that the USB port(s) you are using for your kybd/mouse are fully active. BIOS use different features and nomenclatures to describe this. Look for the pull down choice that is least likely to allow the USB ports to go to sleep.
jones0610
- 2,514