News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

[Testers?] Suspend/Resume MDs....

Started by colinjones, March 03, 2009, 06:10:35 AM

Previous topic - Next topic

sambuca

colinjones,

I actually did almost nothing. I only added a file /etc/pm/sleep.d/01lmce which is the  pm-utils equivalent of /etc/hibernate/scriptlets.d/lmce. A little different syntax.
#!/bin/bash

. /usr/lib/pm-utils/functions

RETVAL=0
case "$1" in
        hibernate|suspend)
                /usr/pluto/bin/suspend.sh
                RETVAL=$?
                ;;
        thaw|resume)
                /usr/pluto/bin/resume.sh
                ;;
        *)
                ;;
esac

exit $RETVAL


Other than that, I just installed the pm-utils package. Running pm-suspend suspends it to ram, and it resumed successfully afterwards. Keep in mind that I already had uswsusp and hibernate installed. I think pm-utils recommends hibernate.

Pm-suspend actually logs everything to /var/log/pm-suspend.log, so the "Waiting for device..." message is found there.

I changed one line in the suspend script:
echo "Waiting for $RegCount devices to shutdown ($Devices)"
adding the ($Devices) part, and suspended.
It turns out that it is the MythTV_Player that takes the most time to shut down.

I was thinking of adding a description to the wiki suspend article.

br,
sambuca

colinjones

can you post your /usr/pluto/bin/resume.sh?

sambuca

Here it is:
#!/bin/bash

/usr/bin/screen -d -m -S "LMCE Launch Manager" /usr/pluto/bin/lmce_launch_manager.sh


Basically just a variant of how the other devices are started.

br,
sambuca

colinjones

thx... hmmm... when I first ran pm-suspend, I hadn't set exec permissions on the script, but it seemed to work (albeit obviously didn't run my shutdown script), as for the first time when i hit power it resumed and I could use the MD ... although it seemed to be not responding as quickly as usual. Then I added the resume script and set both with exec permissions. Now it doesn't seem to work! Either way the screen doesn't come back on any more, even if I use --quirk-dpms-on or xset dpms force on from the command line. Sometimes the command line comes back, but at the moment it doesn't seem to be... oh well... will have a play with it again later!

sambuca


Will it suspend and resume reliably when not running the lmce suspend/resume scripts?
Also check /var/log/pm-suspend.log for any clues.

br,
sambuca

sambuca

Hi

I looked into the issue with Myth shutdown times. In the log files there is an almost 20 second pause between the previous device shutdown and the MythTV_Player shutdown. But I cannot find any clue as to why.
I was trying to find out when each device receives the command, but I couldn't find anything in the logs. Do I need to enable some other log levels, perhaps?

sambuca

colinjones

i would imagine that you would see the message in DCERouter.log...

donpaul

Works great on my MD with onboard sound, but the MD with Audigy (Coax Digital) card loses sound when it resumes.

donpaul

Quote from: donpaul on April 14, 2009, 03:33:40 PM
Works great on my MD with onboard sound, but the MD with Audigy (Coax Digital) card loses sound when it resumes.

Solution: Unload sound card module on suspend, and load module on resume. Adding the module to blacklisted-modules didn't seem to work so I created a script:

/etc/pm/sleep.d/99sound
#!/bin/bash

case "$1" in
    resume|thaw)
        modprobe snd_ca0106
     ;;
     suspend|hibernate)
        modprobe -r snd_ca0106
    ;;
esac
exit $?