mike choy wrote:
Hi Team
I wonder if its time to revisit ACPI for doing scheduled wakeups. This
looks much more elegant to me,
and seems to have made real progress in 2.6.14 kernels. This will off
course need a Mother board and BIOS that supports the Real Time Clock
alarm function
but as this is exposed via the OS, then this looks much safer than
poking directly into NVRAM.
( most BIOS have alarms that go upto 1 month ahead, some older ones
also only have 1 day ahead)!
I am using SUSE 10.0 but would be interested if other distros now have
good ACPI support
Here is a quick link to the ACPI documentation from Novell, and the
acpi4linux home page
http://www.novell.com/documentation/suse10/index.html?page=/documentation/suse10/adminguide/data/sec_pmanage_acpi.html
http://acpi.sourceforge.net/
Here are the results for my system
Read the RTC alarm clock
cat /proc/acpi
cat /proc/acpi/alarm
2005-12-00 10:11:33
Now check we can write a value back into the BIOS
Login as root
#echo 2005-12-31 10:30:00 >/proc/acpi/alarm
Now check it worked
#cat /proc/acpi
2005-12-31 10:30:00
#shutdown -h now
Note you will NOT see this change the wake up time in the BIOS
And wait for the system to spin up.
Now going away to see how to integrate to Myth
Mike C
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Heres update with Mythtv integration, seems to work, just waiting for it
to wake up against various schedules now.
Now test MythTV setup
=================
In Mythtv-setup ->Shutdown/Wakeup Options
Startup command : Leave blank
Block shutdown before client connected : Checked
Idle timeout(secs) :10s (while I am testing)
Max wait for recordings(min) :15 mins (while I am testing)
Startup before rec(secs): :120
Wakeup time format :yyyy-MM-dd:hh:mm:ss
setwakeuptime command :sudo /usr/bin/mythsettime $time
( dont forget to schedule a recording or $time will be blank)
Server halt command :sudo /usr/sbin/mythshutdown
Pre Shutdown check-command: :exit 0
Now create (as Root) the mythsettime and mythshutdown scripts in /usr/sbin
mythsettime (chmod this to 755)
======================================
sudo echo $1 > /home/mythtv/myth.time
sudo echo $1 > /proc/acpi/alarm
mythshutdown (chmod this to 755)
======================================
sudo /sbin/halt -p
Add the following to the /etc/sudoers file (this gives permissions for above to
run as root)
============================
mythtv All=(ALL) NOPASSWD:
/bin/echo,/sbin/halt,/usr/sbin/mythsettime,/usr/sbin/mythsettime
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users