add these to /etc/rc.local:
echo USB0 > /proc/acpi/wakeup
irexec -d /home/<USER>/.mythtv/lircrc
<USER> : the user id you are running mythfrontend.
add these using visudo as root(must at the bottom):
<USER> ALL=NOPASSWD: /sbin/alsa, /etc/acpi/*
<USER> : the user id you are running mythfrontend.
add these to /home/<USER>/.mythtv/lircrc
begin
button = Power
prog = irexec
repeat = 0
config = sudo /etc/acpi/sleep.sh
end
<USER> : the user id you are running mythfrontend.
If you dont't use "sudo" to run sleep.sh, resume fails.
add these to /etc/acpi/resume.d/67-sound.sh:
(This step fixs the problem that resume from STR makes snd_hda_intel no sound.)
/sbin/alsa force-reload
/usr/bin/amixer -q sset Master,0 98% unmute
/usr/bin/amixer -q sset PCM,0 98% unmute
/usr/bin/amixer -q sset Front,0 98% unmute
/usr/bin/amixer -q set Headphone unmute
Reboot and that's all.
Suspend to ram is now working on my HTPC running mythbuntu.
NOTICE:
- Resume from STR not always success, sometimes hangs with only power led lights, sometimes I have to push the power button of remote control more than one time to wake up the machine.
- You have to set ACPI suspend mode to STR(S3) and something like "resume bring USB back" in bios.
迴響