LinHES Forums http://forum.linhes.org/ |
|
HOWTO: ACPI Wakeup auto shutdown/startup for recordings http://forum.linhes.org/viewtopic.php?f=11&t=17366 |
Page 2 of 2 |
Author: | Girkers [ Mon Aug 09, 2010 4:08 pm ] |
Post subject: | |
I was having trouble with this issue so I posted a thread in the LinHES section as it pertains to version R6, http://mysettopbox.tv/phpBB2/viewtopic.php?t=21240 relates. In there I got a very simple answer from brfransen Quote: Those settings look correct but to make sure you can run the mythwelcome-config.py. That should make the settings correct.
It took a couple of goes to get it to work as I was running the command as the wrong user. You need to run the command as the mythtv user and I haven't had to touch my settings what so ever. A side note is that when I installed R6.03 I told the system to start Mythwecolme so I believe that step may still need to be done, but the configuration itself is now all scripted. |
Author: | wulf [ Mon Oct 18, 2010 1:08 am ] |
Post subject: | |
nicom wrote: The only differences I can see are the quotation marks which were inserted when I cut and paste via this windows machine. I should have checked a bit closer.
I noticed in your version you still have a quotation mark at the end of the Pre-shutdown Check Command which should not be there. and the paths of the mythwelcome-set-alarm is different: Code: sudo sh -c “/usr/LH/bin/mythwelcome-set-alarm.sh $time”
and I m not shure why its not working... Ill try it step by step again... |
Author: | heilig [ Tue Oct 19, 2010 1:01 am ] |
Post subject: | |
wulf wrote: nicom wrote: The only differences I can see are the quotation marks which were inserted when I cut and paste via this windows machine. I should have checked a bit closer. I noticed in your version you still have a quotation mark at the end of the Pre-shutdown Check Command which should not be there. Happend to me, as well: I pasted the path to mythwelcome-set-alarm.sh to the input text box and the script never got called. After I typed the entire command manually it worked. No copy-paste, just typed Code: sudo sh -c “/usr/LH/bin/mythwelcome-set-alarm.sh $time” in the configuration text box. One thing which might help in debugging: add a line in mythwelcome-set-alarm.sh Code: sudo nano /usr/LH/bin/mythwelcome-set-alarm.sh like this:Code: echo `date`: $0 called with argument: $1 >> /home/mythtv/mythwelcome-settime.log
Using this I quickly found that mythwelcome-set-alarm.sh did not get called correctly and I could make the change in mythwelcome --setup. (although mythwelcome-set-alarm.sh already has logging capabilities, but I found this to be simpler to diagnose) Jens |
Author: | wulf [ Wed Oct 20, 2010 12:34 am ] |
Post subject: | |
OK, i will check that. But do I get it right, if I ran Code: sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh $time"
I should see the new wakeuptime in the Bios, right? |
Author: | heilig [ Thu Oct 21, 2010 11:59 pm ] |
Post subject: | |
wulf wrote: But do I get it right, if I ran Code: sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh $time" I should see the new wakeuptime in the Bios, right? To be honest, I have no idea if the time set by the script is the same that is visible in the BIOS. Probably yes, but I never checked. However, to make this work the variable $time must contain the time you plan to wake up. $time is set by mythtv, it is NOT universally available in the shell. Try to run mythwelcome-test-wakeup.sh and you should see the wakeup time set to 5(?) minutes in the future in the BIOS. or run Code: sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh `date +%s`"
to set the wakeuptime in the BIOS to the current time good luck! Jens |
Author: | wulf [ Tue Oct 26, 2010 10:40 am ] |
Post subject: | |
OK thats strange now! At the beginning I checked Code: mythwelcome-test-wakeup.sh and it woke up my box flawless. but now it doesn anymore! If I try the Code: mythwelcome-set-alarm.sh it simply says that it doesnt have permissions for some things:Code: mythwelcome-set-alarm.sh
/usr/LH/bin/mythwelcome-set-alarm.sh: line 21: /sys/class/rtc/rtc0/wakealarm: Keine Berechtigung /usr/LH/bin/mythwelcome-set-alarm.sh: line 22: /sys/class/rtc/rtc0/wakealarm: Keine Berechtigung /usr/LH/bin/mythwelcome-set-alarm.sh: line 23: /var/log/wake_alarm: Keine Berechtigung why does that happen? |
Author: | wulf [ Fri Nov 05, 2010 9:31 am ] |
Post subject: | |
OK, one last question: Code: sudo mythwelcome-test-wakeup.sh
cleanly wakes up the machine after 4 min. but if I mark something for recording and shut down the machine it doesnt wake up? So what? |
Author: | knappster [ Fri Nov 05, 2010 9:49 pm ] |
Post subject: | |
wulf wrote: OK, one last question: Code: sudo mythwelcome-test-wakeup.sh cleanly wakes up the machine after 4 min. but if I mark something for recording and shut down the machine it doesnt wake up? So what? Hi wulf... not sure where your problem lies, but here are my settings... it was setup in 6.01 and I haven't had to touch it since upgrading to 6.03. I am copying and pasting the commands from vnc so there shouldn't be any typos. MythShutdown/Mythwelcome Settings (mythwelcome --setup) Command to Set Wakeup Time: Code: sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh $time" Wakeup time format: Code: time_t nvram-wakeup Restart Command: Code: Command to reboot: Code: sudo /sbin/reboot Command to shutdown: Code: sudo /sbin/poweroff Command to run Xterm: Code: xterm Command to run to start the Frontend: Code: /usr/LH/bin/mythfrontend-start Shutdown/Wakeup Options (Page 5 of General from Mythbackend setup) Startup Command: Code: Block Shutdown before client connected Code: Idle shutdown timeout (secs): Code: 300 Max. wait for recording (min): Code: 120 Startup before rec. (secs): Code: 600 Wakeup time format: Code: yyyy-MM-ddThh:mm:ss Command to set Wakeup Time: Code: /usr/bin/mythshutdown --setwakeup $time Server halt command: Code: /usr/bin/mythshutdown --shutdown Pre Shutdown check-command: Code: /usr/bin/mythshutdown --check The relevant part of my /usr/LH/bin/mythwelcome-set-alarm.sh code is: Code: echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm
echo $1 > /sys/class/rtc/rtc0/wakealarm #this writes your alarm cat /proc/driver/rtc > /var/log/wake_alarm Hopefully this helps. |
Author: | heilig [ Sun Nov 07, 2010 4:07 pm ] |
Post subject: | |
wulf wrote: OK, one last question: Code: sudo mythwelcome-test-wakeup.sh cleanly wakes up the machine after 4 min. but if I mark something for recording and shut down the machine it doesnt wake up? So what? Be Persistent! Bleib Hartnaeckig! It can be made to work as the example with mythwelcome-test-wakeup.sh shows. Did you try the debugging line in mythwelcome-set-alarm.sh I recommended a few posts above? You could also add the line Code: echo user ist: $USER >> /home/mythtv/mythwelcome-settime.log
to show if the script is run as root. The error "Keine Berechtigung" ("no permission") happens because mythwelcome-set-alarm.sh must be run as root. For me it all started working after I completely erased the line 'sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh $time"' in the "Command to Set Wakeup Time" field in mythwelcome --setup and re-entered it by typing it in completely. (I had pasted it before, and somehow this had screwed it up). Try the debugging hints given in this thread and report back with the results. Good Luck! Jens |
Author: | turpie [ Sun Nov 07, 2010 5:44 pm ] |
Post subject: | |
wulf wrote: OK, one last question:
Code: sudo mythwelcome-test-wakeup.sh cleanly wakes up the machine after 4 min. but if I mark something for recording and shut down the machine it doesnt wake up? So what? How did you shutdown the maching? On my setup (KM5.5) I have to let MythWelcome perform the shutdown. If I do the shutdown any other way the wakeup time isn't set. |
Author: | wulf [ Mon Nov 08, 2010 8:05 am ] |
Post subject: | |
turpie wrote: How did you shutdown the maching?
On my setup (KM5.5) I have to let MythWelcome perform the shutdown. If I do the shutdown any other way the wakeup time isn't set. Well thats how it is supposed to be! and gib THX to knappster, the showing of his config helped to find the last error. Through something my Wakeup time format wasnt set to time_t So it just works now! |
Author: | knappster [ Mon Nov 08, 2010 7:54 pm ] |
Post subject: | |
I've been there before wulf. Glad I could help |
Page 2 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |