ACPI Wakeup

From MythTV Official Wiki
Revision as of 22:31, 15 February 2006 by Mikec (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Many MythTV users leave their backend (recording) servers running 24X7 and only power their front ends on and off. Being of a green disposition I wanted to avoid this, as even the best computers consume a reasonable amount of electricity just sitting there.

There are various options available under Linux to wake your machine up from a sleep state.

Nvram wakeup

The normal way of getting MythTV to power up the machine on a recording schedule is to use nvram-wakeup. However I was not very happy with this as direct poking of the systems Non Volatile RAM seems very dangerous to me, plus it involves a lot of messing around with custom kernels etc. Plus it just did not work for my ECS Mother Board.

Advanced Configuration and Power Interface (ACPI)

The PC Industry have been moving from the older APM power managment specification to the newer ACPI specification. ACPI for Linux is under heavy development but is already quite useable with the 2.6 kernel.

I have chosen to go with using ACPI to have my MythTV box wakeup while I am away , record a programme and then power itself back down. You will find the ACPI features for your machine exposed as a collection of files and directories in /proc/acpi. For instance /proc/acpi/alarm is a file that corresponds to the Real Time Clock wakeup function on your machine.

Binary IO System (BIOS)

You will need to have a motherboard that supports both ACPI and a Real Time Clock Alarm Functions in the BIOS. Dont forget to enable this in the BIOS. You will find a tab similar to "Advanced Power management".

Testing ACPI Wakeup Works

Here are the commands to check that you have ACPI working.

$powersave -S

Check that you have the alarm function in /proc/acpi/alarm. This prints out the RTC Alarm clock from the BIOS.

$cat /proc/acpi/alarm
 2005-**-29 10:10:04

Check that you can write a new time to the RTC Clock Alarm (you will need to be Root) Format is YYYY-MM-DD HH:MM:SS

#echo "2005-12-29 10:10:04" >/proc/acpi/alarm

Check that it was written, shut down and wait for it to wakeup.

#cat /proc/acpi/alarm
 2005-*12-29 10:10:04 
#shutdown -h now

(note you may not see the change in the bios, but it should still work)

Now go to your MythBackend Configuration and setup wakeup and shutdown

--Mikec 22:31, 15 February 2006 (UTC)