What different wakeupmethods are there? I've built a few vdr boxes and I've been forced to use different motherboards and they do not all work the same. I've used nvram-wakeup on some and acpi on others when nvram-wakeup has not worked. Now I have Biostar 945GZ 775 SE with which I'm having trouble in starting on timers.
What methods are people using with VDR?
\Kartsa
Kartsa schrieb:
I'm using nvram-wakeup too, but have to reboot one time after setting the timer with nvram-wakeup. This reboot then automatically stops the system with a special shutdown entry in grub. Without the reboot the timer is just ignored...
System is Debian with Linux 2.6.22-2-amd64, VDR 1.5.14, Mainboard Gigabyte M61P-S3.
Greetings, Stefan
PS: First post after lurking for years, YESSS... ;-)
Kartsa wrote:
beside nvram-wakeup und acpi-wakeup ( simply "echo 2006-02-09 23:05:00
/proc/acpi/alarm", http://www.vdr-wiki.de/wiki/index.php/ACPI_Wakeup,
sorry you have to use babelfisch, it´s not in the engl. vdr-wiki)
you could use the WOL feature of the system the vdr sends the wakeup time to a system thats always on (linux router?) and this machine sends a WOL packet to your vdr http://www.vdr-portal.de/board/thread.php?postid=694894 (->babelfish)
or
a special home brew hardware device with it's own clock (kind of pic) witch gets it's power from standby of the power supply don't know about a running project but it people talked about something like that on www.vdr-portal.de - usually if made by someone in a small batch it will cost as much as a cheap mainboard
http://www.vdr-wiki.de/wiki/index.php/WakeUP_Projekte ("Echzeituhr:" is whats needed)
http://www.vdr-wiki.de/wiki/index.php/C%27t-VDR_-_Hardware_WakeUp
this looks like something that you could buy and is out of the box working with vdr http://www.jepsennet.de/vdr/ http://www.k-data.org/index.php?product=1
lars.blaeser@lycosxxl.de(Lars Bläser) 10.02.08 14:59
(->>babelfish)
WOL needs more standby power than the simple RTC!
You need power for LAN switch too.
The second continously running PC wastes power too.
As more componentes are involved as more can/will break.
It had never been long term successful to correct a broken software with a hardware patch.
use ACPI wakeup.
Rainer
Rainer Zocholl kirjoitti:
At the time writing I was not really asking help, just qurious what methods people use. This is why I did not put any detailed info. Maybe I should not have mentioned about problems I at that time.
Now I see that I should have added more info because I'm not yet happy with my settings. I would have used acpi and it was my first attempt but the board did not wake up.
from vdr-shutdown.sh ------------------- file=/var/lib/vdr/acpi-wakeup rm -f $file if [ ${1:-0} -gt 0 -a -e /proc/acpi/alarm ] ; then date -d "1970-01-01 UTC $1 sec -$delay min" +"%Y-%m-%d %H:%M:%S" > $file fi exec sudo /sbin/shutdown -h now --------------------
and from halt.local (this is what is instructed in vdr README.package) -------------------- #!/bin/bash wakeupfile=/var/lib/vdr/acpi-wakeup trap "rm -f $wakeupfile" EXIT if [ -s $wakeupfile -a -w /proc/acpi/alarm ] ; then echo -n "Setting ACPI wakeup for next VDR timer: " ; cat $wakeupfile cat $wakeupfile > /proc/acpi/alarm fi ------------------- But it does not wake up. And this is not a very old mb. So I assume I am doing something wrong or not doing something I should. I got it to boot up using nvram-wakeup with reboot option (after guess helper). But as said nvram should be obsolete and replaced by acpi.
On another mb (4CoreDual-Sata23) I used ------------------- newtime=$(($1 - delay*60 )) # delay minutes earlier echo $newtime > /sys/class/rtc/rtc0/wakealarm ------------------- which did the trick.
On biostar there were no /sys/class/rtc
So I tried from http://www.vdr-wiki.de/wiki/index.php/ACPI_Wakeup (as someone mentioned in this thread)
-------------- #!/bin/bash
# Startet dem Rechner nach 3 min ueber acpi neu.
min=`date "+%M"` nextmin=`expr $min + 3` nextboot=`date "+%Y-%m-%d %H:"$nextmin:00` echo $nextboot > /proc/acpi/alarm
echo "Aktuelle Zeit: "`date "+%Y-%m-%d %H:%M:%S"` echo "Starte Rechner neu um: "`cat /proc/acpi/alarm` echo "Fahre Rechner nun runter."
busybox poweroff #/usr/bin/poweroff.pl #poweroff ---------------
I can read germany but I do not understand it :). But understood that I could use that script to test acpi. Well this did not work. I did check that the time was actually written in /proc/acpi/alarm. Still not waking up.
So where do I go here? Do I use nvram-wakeup which IMHO is not good because of the reboot.
\Kartsa
On Monday 11 February 2008, Luca Olivetti wrote:
Same thing here. I don't remember what it was called in my VDR box's BIOS, but something non-obvious anyway :P
OTOH it does work now, but it doesn't take the date into account, so if there's no timer in the next 24 hours I schedule a wake-up at 21:00.
IIRC "cat /proc/acpi/alarm" always displays bogus dates for me, but wakeup does work as expected anyway.
Kartsa schrieb:
Hallo, yum MUST disable RTC-Wakeup in the BIOS of your motherboard. In my case I MUST write the wakeuptime twice:
example: ---------------------------------------------------------------------------- if [ ! -z $1 ]; then newtime=$(($1 - 60 )) # 1 minutes earlier logger "VDR-Timer: $1" logger "BIOS-Timer: $newtime" echo $(/bin/unix2iso8601 -u $newtime) >/proc/acpi/alarm echo $(/bin/unix2iso8601 -u $newtime) >/proc/acpi/alarm logger "ACPI-Read: $(cat /proc/acpi/alarm)" else logger "VDR-Timer: keine Zeitübergabe" fi ----------------------------------------------------------------------------
dhe.
Ville Skyttä kirjoitti:
Had enough with this and left it yesterday evening. On the morning it was up. It came to me that system clock is using UTC time :) So I made a new testscript. ------------------- #!/bin/bash delay=3 now=`date +%s` nexttime=`expr $now - 7200` #take back a couple of hours nextboot=`date -d "1970-01-01 UTC $nexttime sec +$delay min" +"%Y-%m-%d %H:%M:%S"` echo $nextboot > /proc/acpi/alarm echo $nextboot > /proc/acpi/alarm echo "Now "`date "+%Y-%m-%d %H:%M:%S"` echo "Start time "`cat /proc/acpi/alarm` echo "Restart in 5 sec" shutdown -h -t 5 now ------------------- After 3 minutes it was running again. But this aproach (replace now with vdr shutdown info) creates a (one hour) problem when summer time comes. Doesnt it?
Oh, and there is no bios for the board (well there is but just the one I already have).
Here is a quote from the manual: "APM Support These AWARD BIOS supports Version 1.1&1.2 of the Advanced Power Management (APM) specification. Power management features are implemented via the System Management Interrupt (SMI). Sleep and Suspend power management modes are supported. Power to the hard disk drives and video monitors can be managed by this AWARD BIOS.
ACPI Support Award ACPI BIOS support Version 1.0b of Advanced Configuration and Power interface specification (ACPI). It provides ASL code for power management and device configuration capabilities as defined in the ACPI specification, developed by Microsoft, Intel and Toshiba."
ACPI is selectable between 1.0 and 1.0b. Is there some significant difference?
\Kartsa
On Wednesday 13 February 2008, Kartsa wrote:
Quite likely. But I suppose you shouldn't need any hacks like that if the system knows that the hardware clock is in UTC (UTC=true in /etc/sysconfig/clock) and I think the shutdown support scripts from the Fedora VDR packages should also work as is in that case.
Ville Skyttä kirjoitti:
I have UTC=true and in other vdr boxes I haven't had these problems.
I've tried already halt.local but it did not not work. What I had not tried is adding a second line of "cat acpifile>/proc/acpi/wakeup" to halt.local to have the line twice (as mentioned by Detlef). If I use my testscript which uses a 2 hours old tile it seems to work but not with FC VDR package script.
Maybe there is still something I am over looking. Need to check and recheck :)
\Kartsa
There is also a concept where you set the RTC-Alarm time to a fixed value and let a script calculate what time to set the RTC to to wake up at the correct time. Then after wakeup the RTC is readjusted.
It's a bit crude and I can't recall the commen name of this concept. I havn't got it working on my system though. It works when started on the commandline no when vdr triggers it.
By Benjamin
Kartsa schrieb: