hei all maybe others are interested as well in how to suspend/resume a standalone freevo box. after some hours of investigations, I found a more or less proper solution... here are my experiences:
- my box is an new installed gutsy/amd64 and I use the acpi-support script /etc/acpi/sleep.sh which works well if the X server is running (if not, the console stay black and X will no longer start after resume and I have not yet found why) - what I need: I will be able to suspend the box by pressing the power button and also with the freevo shutdown mechanism. 1) the easyest would probably be to run /etc/acpi/sleep.sh in the background and just to continue after resume: -> one problem for me is that the lirc_imon kernel module is not yet able to survive (on the other hand, lirc_serial is!). -> another problem is that if I press the power button in the moment freevo is streaming something frm a NFS mounted share or even internet radio, the resume is not properly done (whyever). 2) another solution would be to stop freevo+lirc, then run /etc/acpi/sleep.sh and then restart lirc+freevo after resume. -> the first problem on my system is, that suspend/resume do not work if the X server is not running (X no more starts, whyever). -> another problem is, that stopping freevo out of freevo kills also all children of it, thus the killing script is killed as well and nobody can continue... (ok, I probably found a solution for that: forking a script with the atd mechanism, the new script is then a child of the atd and no longer of the freevo process) 3) my proposed (and tested) solution is, to start freevo out of .xinitrc such that if freevo (and not X) is ended, the while loop restarts freevo after suspend/resume while X is still running... starting freevo at bootup with startx: ************ /etc/rc.local ********************* ... su -l -c "startx 2> /dev/null" exit 0 ********************************************** startx runs .xinitrc as child of the X server: ************ /root/.xinitrc ********************* xset s noblank xset s off xset -dpms /etc/freevo/freevo.xinit ********************************************** ************ /etc/freevo/freevo.xinit ********** #!/bin/bash sigexit=/etc/freevo/freevo.exit sigsleep=/etc/freevo/freevo.sleep while ! ( rm $sigexit 2> /dev/null ); do # sudpend/resume if asked if ( rm $sigsleep 2> /dev/null ); then echo " - ...sleeping..." /etc/acpi/sleep.sh echo " + ...awaking..." fi # start lirc and setup alsa /etc/lirc/lirc.start (could also be done with /etc/init.d/lirc start) /etc/alsa/alsa.setup (assure default alsamixer settings) # start freevo echo " + Starting freevo" ( /usr/bin/freevo > /dev/null ) 2> /dev/null touch $sigsleep # stop lirc (could also be done with /etc/init.d/lirc stop) /etc/lirc/lirc.stop # stop lirc /etc/lirc/lirc.stop done echo " - Exiting freevo xinit loop" exit 0; ********************************************** at the end of this script, X will exit as well pressing the power button will just kill freevo: ************ /etc/acpi/powerbtn.sh ********** ... # If all else failed, just initiate a plain shutdown. #/sbin/shutdown -h now "Power button pressed" kill `cat /var/run/freevo-0.pid` ********************************************** in freevos local_conf.py nothing special is needed, just an normal freevo end: SHUTDOWN_SYS_ENABLE = 0 that's all. maybe someone is interested in it? is there another (better) solution (working) out there? I am very interested! or is this just not a need? or would it be interesting to add it to a wiki somewhere? Andreas ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Freevo-users mailing list Freevo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-users