Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Monday, September 5, 2011

Enable wakeup from suspend with usb keyboard or mouse in Linux Ubuntu

This guide is exactly what you need :)

In short;
1.) Enable it in your bios
2.) echo DEVNAME > /proc/acpi/wakeup
3.) Correct DEVNAME is found using the following script:

grep "USB.*pci" /proc/acpi/wakeup | cut -d ':' -f 2- | while read aaa; do find /dev/.udev -name "*$aaa*" -print -exec grep "$aaa" /proc/acpi/wakeup \; -exec echo \; ; done
4.) Add cmd(2.)) to /etc/init.d/wakeup


Your wakeup file should look something like this:

#!/bin/sh
# Set /proc/acpi/wakeup to allow devices to wake system
# sudo sh -c "echo USBX > /proc/acpi/wakeup"
echo USB4 > /proc/acpi/wakeup


5.) Enable wakeup to boot at startup:
update-rc.d wakeup defaults
6.) Done...


Ubuntu natty with xbmc dharma won't shut down from menu

Solved this by editing /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla

and replacing it with the following. Just make sure "xbmc", marked red, is the correct user...

[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
ResultAny=yes
ResultInactive=no
ResultActive=yes

Thanks to
http://wiki.xbmc.org/index.php?title=Ubuntu_Suspend_/_Wake