Wake Ubuntu with USB mouse or keyboard

I tend to suspend my Ubuntu machine quite a bit. A three second wakeup is a lot faster than a 30 second boot and I can keep my windows open while the machine is asleep without using much more power than a fully shut down computer.

Instead of having to reach for a power button on my computer’s case, I have set up Ubuntu to come out of suspend mode when I press any key on my keyboard.

After some research, I found I could issue this command:

sudo sh -c 'echo "USBE" > /proc/acpi/wakeup'

I have seen some people use USB0 instead of USB0, but since it was not listed under wakeup devices by acpi, I used USBE. You can judge for yourself as to which you should use.

There you have it. Your machine should wake up when you press a key, given your keyboard is USB.

Join the Conversation

1 Comment

  1. but still didn t work. Perhaps it s because the keyboard and mouse are connected indirectly – wirelessly to a dongle which resides on the screen? Screen is connected via USB to the laptop. AlikElzin-kilaka Mar 21 ’18 at 20:42

Leave a comment

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