4

My external keyboard does not have a suspend button. Is there a way I can set up Ubuntu to use a different key (or any key for that matter) to wake the PC if it has been suspended?

6

If you run the following command, you will see a list of USB devices and if they are enabled to wake up the system.

cat /proc/acpi/wakeup

You will see a list of items such as the the one seen below.

USB0      S3    *disabled   pci:0000:00:12.0

Once you have established which device is the keyboard, let’s say USB0, run this command.

sudo su
echo USB0 > /proc/acpi/wakeup

Now, if you run the command from the start again, you should see enabled next to the device.

USB0      S3    *enabled   pci:0000:00:12.0

That worked for me, and I can wake up my desktop with any key.

Details on the wakeup codes for devices can be found here (link courtesy of Santhana Krishnan).

| improve this answer | |
  • It worked like a charm - Thank you very much. My USB keyboard was called UAR1, so I suppose chances are good that USB devices always start with a 'U', but the rest can be anything. – Jack Oct 23 '12 at 20:03
  • 5
    How do I establish which device is the keyboard? If I try "lsusb" I get a list of devices, but they have different IDs. There's no "USB0" or anything like the /proc/acpi/wakeup lists as device IDs. – jackthehipster Dec 21 '15 at 10:25
  • Note: the echo USB0 > /proc/acpi/wakeup line toggles the setting (so it will actually disable wakeup if it is already enabled...). This was tested on Ubuntu 16.04 (Xenial Xerus). – Peter Mortensen Jun 14 '19 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.