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.

Leave a comment

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