Author Topic: [Testers?] Suspend/Resume MDs....  (Read 23574 times)

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« 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: [Select]
#!/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: [Select]
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

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« Reply #46 on: March 12, 2009, 08:58:17 pm »
can you post your /usr/pluto/bin/resume.sh?

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« Reply #47 on: March 12, 2009, 09:37:16 pm »
Here it is:
Code: [Select]
#!/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

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« 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!

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« 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

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« 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

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« Reply #51 on: March 14, 2009, 01:38:22 am »
i would imagine that you would see the message in DCERouter.log...

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« Reply #52 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.

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: [Testers?] Suspend/Resume MDs....
« Reply #53 on: April 14, 2009, 05: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: [Select]
#!/bin/bash

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