Wednesday, July 20, 2011

Wake on key press

I like to be able to wake my computer from suspend by a key press. Unfortunately my motherboard does not support this. So to do so this is what I did

First I ran this in a terminal to find my keyboard:

cat /proc/acpi/wakeup

After running that I get an output like this :

I determined my keyboard was associated to UHC1. To enable my keyboard to wake on key press I ran

echo "UHC1" > /proc/acpi/wakeup

I got lucky that it was UHC1, below shows the UHC1 is now enabled. The process is to run the echo command then suspend the computer and see if it wakes from key press. You repeat this until you find the correct device.

Now that I know what device number and key press wakes the computer. I need I make a start up script
 echo "UHC1" > /proc/acpi/wakeup

I named the script and placed it in /etc/init.d/

Then in a terminal I ran this to make the script executable

sudo chmod +x /etc/init.d/

In a terminal again to get the script to run at start up I ran

sudo update-rc.d defaults

That did it for me.

Here are the two forum post others and myself posted to get the key press working. There was an older post on another blog that help solve this, but it seems to have gone defunct.