[mythtv-users] Suspend to RAM -- Which MB to buy?

Paul Bender pebender at san.rr.com
Thu Oct 25 03:23:17 UTC 2007


A JM wrote:
> Paul / Group,
> 
> Can you enlighten me on what "support wake from S3 using USB" means... 
> I'm extremely intriuged by how you were able to get your front end to 
> sleep and wake using an MCE remote.
> 
> AJM,

Many modern motherboards support wake from S3 (suspend to RAM) on USB. A 
USB interface on a motherboard that supports this functionality can be 
configured using a jumper and/or BIOS setting to enable the 
functionality. The jumper/setting keeps power applied to the USB 
interface so that the USB device can remain powered. Both ASUS 
motherboards that I have use a jumper to enable wake from S3 on USB.

In addition, to enabling the functionality on the motherboard, you need 
to enable the functionality in the kernel. To do this, you need to 
compile the kernel with CONFIG_USB_SUSPEND=y. After that you need to 
enable the functionality at runtime by enabling it in /proc/acpi/wakeup. 
I do this in MiniMyth during init using the attached script function. 
This script searches for USB attached LIRC receivers and enables wakeup 
on those USB interfaces.

Finally, you need a USB device that is appropriate for waking the 
computer. For example, the MCE receiver will trigger wake on USB when 
the MCE remote's PC power button is pressed.

Using LIRC and irexec, you use the same power button on the remote to 
call a sleep script with the following in your lircrc file:

begin
     prog = irexec
     button = KEY_POWER
     config = /usr/bin/sleep.sh
end

where KEY_POWER is the name of the power button in the lircd.conf file 
and /usr/bin/sleep.sh is the sleep script.

In the sleep script you will want the line

/bin/echo 3 > /proc/acpi/sleep

in order to send the computer into S3 sleep. You may also wish to do 
other things in the script before sending the computer into S3 sleep. 
For instance, checking for and killing running instances of MPlayer or 
Xine and return MythTV to the main menu. You can use pidof to locate 
running instances of MPlayer and Xine and kill to shut them down. If you 
have enabled NetworkRemote on your frontend, then you can use the 
following to send return MythTV to the main menu

nc localhost 6546 << EOF
jump mainmenu
EOF

I am using the 2.6.23 kernel. I had problems with earlier kernels, but 
this one appears to work well. In addition, I am using LIRC 0.8.3pre1.

I hope that helps get you started.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wakeup_enable.sh.gz
Type: application/x-gzip
Size: 444 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20071024/7dfab90f/attachment.bin 


More information about the mythtv-users mailing list