Author Topic: ACPI Wakeup - how is it done  (Read 1175 times)

luker

  • Guest
ACPI Wakeup - how is it done
« on: February 20, 2010, 09:39:34 AM »
Hi Experts,

I'm not considering myself an advanced user, yet. But I've been directed here from IRC's #PCLinuxOS-Support.
I need to boot my PCLinuxOS box on a time in the future (to record a tv show, for example).
http://www.mythtv.org/wiki/ACPI_Wakeup#Using_.2Fsys.2Fclass.2Frtc.2Frtc0.2Fwakealarm
tells me to write the targeted date and time to
/sys/class/rtc/rtc0/wakealarm
and look if it worked in
cat /proc/driver/rtc
but there doesn't seem to even be an entry for the targeted boot up date. The boot up time is there, however. So it doesn't seem to be entirely wrong for this system.

Has anybody tried sth like this?
How is it done?

Thanks in advance,


luker

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1318
Re: ACPI Wakeup - how is it done
« Reply #1 on: July 03, 2010, 03:20:34 PM »
Hi Luker,

just saw your post.

I use acpi wakeup on a daily basis with mythtv. Here is what I do:


On my system I need to add the boot parameter: hpet=disable

Add this to /etc/sudoers
%mythtv ALL = NOPASSWD: /sbin/halt, /sbin/shutdown, /bin/sh, /usr/share/mythtv/scripts/setwakeup, /usr/bin/mythshutdown

In mythtv-setup:
Do not block shutdown before clients are connected

Time format for wakeup: time_t
Wakeup command: sudo /usr/share/mythtv/scripts/setwakeup "$time"


Edit the way the system shut down (don't overwrite your alarm time):

/etc/init.d/halt
==> ACPITIME=`cat /proc/acpi/alarm`

[ -x /sbin/hwclock ] && action $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS

==> echo "$ACPITIME" > /proc/acpi/alarm

I also use UTC time format in the bios and system.


cheers,
MBantz