Enable WakeUp from PS2 Keyboard in Ubuntu 8.10

Enable WakeUp from PS2 Keyboard in Ubuntu 8.10

One of the annoying “missing features” I’ve struggled with under Ubuntu is that I was unable to wakeup the PC from suspend or hibernate with my keyboard. Of course, Windows just does it – tap the keyboard and the PC starts up again. I could press the power button on the front of the PC, but its down the side of the desk and not easily accessible.

I found an older post in the Ubuntu forums that had the fix for USB devices and it also works for PS2 with the simplest of changes. So follow these steps and you should be saving power and getting back to work faster.

Open a Terminal and type,

cat /proc/acpi/wakeup

Note the entries that come back and you should see a device called “PS2K” toward the top if you have a PS2 keyboard. For those with USB, it’ll be one of the USB items toward the bottom. The entry will probably also have “Disabled” on the same line, hence your problem.

To enable this entry, switch to a root session by typing,

sudo -s

and enter your password. Now type the following to update the acpi file and toggle “disabled” to “enabled”, (those with USB devices can try USB0, USB1, etc)

echo PS2K > /proc/acpi/wakeup

That should have now enabled your PS2 keyboard to wakeup your PC for this session. Give it a test by putting your machine to sleep and then tapping a key on your keyboard. Probably a good idea to save stuff first, just in case.

If you tried changing a USB device, it may take a few guesses until you find the KB. My mouse was USB0 and clicking any mouse button can also do the wakeup task.

To make this change permanant, you need to add that line to a script and run it when Ubuntu starts. So we create a file called wakeup.sh with the following contents,

echo PS2K > /proc/acpi/wakeup

Save it and from a Terminal make it executable so it runs properly as a script and not just a text file,

chmod +x wakeup.sh

Now to add it to the startup area go back to your Terminal that’s running as root. We need to copy the file to the correct location and add it to the startup processes. You’ll need to run the cp command in the same folder as where you saved your wakeup.sh file.

cp wakeup.sh /etc/init.d/wakeup.sh
update-rc.d wakeup.sh defaults

Now when you reboot, the script will run and enable your PS2 keyboard in ACPI so you can wakeup your PC.

5 Replies to “Enable WakeUp from PS2 Keyboard in Ubuntu 8.10”

  1. This is not working for me . I’ve

    root@sudha:~# cat /proc/acpi/wakeup
    Device S-state Status Sysfs node
    LID0 S3 *enabled
    HDEF S3 disabled pci:0000:00:1b.0
    PXSX S3 disabled
    PXSX S3 disabled pci:0000:06:00.0
    USB1 S3 enabled pci:0000:00:1d.0
    USB2 S3 enabled pci:0000:00:1d.1
    USB3 S3 enabled pci:0000:00:1d.2
    USB4 S3 enabled pci:0000:00:1a.0
    USB5 S3 enabled pci:0000:00:1a.1
    EHC1 S3 disabled pci:0000:00:1d.7
    EHC2 S3 disabled pci:0000:00:1a.7

    still i cant wake up using external keyboard

  2. @sudha – Do you have a PS2 keyboard or a USB one? I’m assuming USB as you have no PS2K entries? Your wakeup file doesn’t seem to have a USB0 device which I assume all machines would.
    If you sleep your machine does your mouse wakeup the machine when a button is clicked? My process at this point was just to test until I found the right device.
    Good luck.

  3. Awesome! I concur with JR it works fine on 10.04 LL (64 bit in my case). I really appreciate the effort you took to post this.

  4. Gratitude .
    Caseless pc hanging on the side of the wall from my desk. starting that thing was a problem =}
    Strange fact is that Windows had this option on default for usb devices
    Your solution is the reason i won’t go back to Windows.
    I just love the Linux community.

Leave a Reply

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