Josef Moellers <josef.m...@invalid.invalid> writes:
> I'd like to find out why my system was booted: because someone hit the
> power button or whether it was woken by the on-board RTC.
Power button pressed: I do not know of a way to detect this and
strongly suspect it's impossible.
RTC: How do you set the wakeup time? Ages ago, I wrote a tool
to do this by programming RTC registers directly:
http://malloc.de/tools/wakeup_clock.c
I suspect by now you're setting via some acpi kernel function? If you
can't read back the wakeup time, you may be able to identify the RTC
registers with the above tool. Then at boot check whether you're some
seconds past the programmed time and if so do your PVR check and possibly
shutdown.
Regards,
Wolfram.