Press "Enter" to skip to content

Enabling USB Keyboard and Mouse to Wake-up Ubuntu from Suspension

4

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:

/sys/bus/usb/devices/1-1.3/product

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 su
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:

 

 

 

  1. lanufabi lanufabi

    Hey, I tried your howto, but my notebook wakes up despite for all usb ports wakeup is disabled (only for current session, not persinstant afer reboot):
    # grep . /sys/bus/usb/devices/*/power/wakeup
    /sys/bus/usb/devices/1-2/power/wakeup:disabled
    /sys/bus/usb/devices/1-9/power/wakeup:disabled
    /sys/bus/usb/devices/usb1/power/wakeup:disabled
    /sys/bus/usb/devices/usb2/power/wakeup:disabled

    When I suspend I can wakeup via USB wired mouse and then,
    # grep . /sys/bus/usb/devices/*/power/wakeup
    shows following:
    /sys/bus/usb/devices/1-9/power/wakeup:enabled

    Do you have an idea how to fix it?

  2. Amir ZIa Amir ZIa

    I am just wondering, would this work for Void Linux ?

    • jolahde jolahde

      Unfortunately I don’t know..

  3. kiers kiers

    i get bash: permission denied (even if i sudo) during
    echo enabled > /sys/bus/usb/devices/ __ /power/wakeup:disabled

Leave a Reply

Your email address will not be published. Required fields are marked *