After having a new all-in-one type of computer with Bluetooth keyboard and mouse set, I faced the problem that Ubuntu could not be waken up from suspension by using the keyboard nor the mouse. After searching for a solution for some ten minutes, I decided to make some notes after finding the best solution to fix this. My article is based on this thread.
Let’s first check the status of USB devices:
I my case it is the 1-1.3 device which is the keyboard and mouse set, more precisely named as HP Wireless Keyboard Mouse Kit. This can be found out by looking at the following file:
Now we would like to enable all the ports.
echo enabled > /sys/bus/usb/devices/1-1.3/power/wakeup
echo enabled > /sys/bus/usb/devices/1-1.4/power/wakeup
echo enabled > /sys/bus/usb/devices/1-1/power/wakeup
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
Make sure that works well for you. After that we want to make the script executed after every reboot.
sudo nano /etc/rc.local
Copy paste all the code rows which begin echo enabled.. to the file before exit 0.
Exit with “ctrl+X” and save with “yes”.
Now you should be able to wake up your computer by using a keyboard or a mouse. And the status of usb ports should be set as enabled after every reboot. In my case, looks like this: