LinuxMCE Forums
June 19, 2013, 05:22:46 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
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
 
   Home   Help Search Chat Login Register  
Pages: 1 2 3 [4]
  Print  
Author Topic: [Testers?] Suspend/Resume MDs....  (Read 5614 times)
sambuca
Guru
****
Posts: 422


View Profile
« Reply #45 on: March 12, 2009, 08:41:22 pm »

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.
Code:
#!/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:
Code:
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
Logged
colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #46 on: March 12, 2009, 08:58:17 pm »

can you post your /usr/pluto/bin/resume.sh?
Logged
sambuca
Guru
****
Posts: 422


View Profile
« Reply #47 on: March 12, 2009, 09:37:16 pm »

Here it is:
Code:
#!/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
Logged
colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #48 on: March 12, 2009, 10:23:00 pm »

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!
Logged
sambuca
Guru
****
Posts: 422


View Profile
« Reply #49 on: March 13, 2009, 08:34:24 am »


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
Logged
sambuca
Guru
****
Posts: 422


View Profile
« Reply #50 on: March 13, 2009, 11:20:52 pm »

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
Logged
colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #51 on: March 14, 2009, 01:38:22 am »

i would imagine that you would see the message in DCERouter.log...
Logged
donpaul
Guru
****
Posts: 300


View Profile
« Reply #52 on: April 14, 2009, 02:33:40 pm »

Works great on my MD with onboard sound, but the MD with Audigy (Coax Digital) card loses sound when it resumes.
Logged
donpaul
Guru
****
Posts: 300


View Profile
« Reply #53 on: April 14, 2009, 04:20:31 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
Code:
#!/bin/bash

case "$1" in
    resume|thaw)
        modprobe snd_ca0106
     ;;
     suspend|hibernate)
        modprobe -r snd_ca0106
    ;;
esac
exit $?
Logged
Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!