Linux - Frodo - No sound after resume from suspend

  Thread Rating:
  • 3 Votes - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DrDavidBanner Offline
Junior Member
Posts: 5
Joined: Jun 2013
Reputation: 0
Post: #166
Hi

Sorry, this is the content of the link, and what I am trying to create: -

Put this to /etc/pm/sleep.d/000-resume-audio
chmod +x /etc/pm/sleep.d/000-resume-audio

Code:
#!/bin/sh
USER=xbmctest
case "$1" in
resume)
# that defines the default primary output
(sleep 10; \
OUTPUT=`su -c "xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'" $USER`; \
su -c "xrandr -display :0 --output $OUTPUT --off" $USER; \
sleep 1; \
su -c "xrandr -display :0 --output $OUTPUT --auto" $USERWink&
;;
esac
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #167
This might help you:
http://openelec.tv/forum/68-audio/55789-...t=48#67720
find quote
DrDavidBanner Offline
Junior Member
Posts: 5
Joined: Jun 2013
Reputation: 0
Post: #168
Hi fritsch,

thanks for the reply, I did do this, all seemed to work. I still have the problem though, no audio after a resume

thanks
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #169
Not sure if it worked, put your

/var/log/pm.log and /var/messages

to a pastebin near you, e.g. xbmclogs.com
find quote
DrDavidBanner Offline
Junior Member
Posts: 5
Joined: Jun 2013
Reputation: 0
Post: #170
Will do, at work just now, I may not be able to get it on until tomorrow night, but I'll post back once done

Thanks for your help
find quote
DrDavidBanner Offline
Junior Member
Posts: 5
Joined: Jun 2013
Reputation: 0
Post: #171
OK so this looks like the hook is working: -

/etc/pm/sleep.d/00_addon-sleep resume suspend: success.
Tue Jun 18 18:02:17 UTC 2013: Finished.
Sending action: Notification(Automatic update service:,New update available: 3.0.6 - please update manually,20000)
openelec:~ #

I still have a problem though, if my AMP is set to "TV\SKY" when I power the TV on (this also powers up the XBMC since I have a CEC adaptor) then switch to XBMC I have no sound, it does now come back when I suspend the XBMC and bring it back on again, this is better than before since the wife can at least press the standby button on the TV remote twice!

Please bear with me, I am VERY new to linux

thanks in advance
find quote
ChickenLicken Offline
Junior Member
Posts: 17
Joined: Dec 2010
Reputation: 0
Location: Melbourne - Australia
Post: #172
(2013-03-27 01:30)fritsch Wrote:  Put this to /etc/pm/sleep.d/000-resume-audio
chmod +x /etc/pm/sleep.d/000-resume-audio

Code:
#!/bin/sh
USER=xbmctest
case "$1" in
  resume)
    # that defines the default primary output
    (sleep 10; \
    OUTPUT=`su -c "xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'" $USER`; \
    su -c "xrandr -display :0 --output $OUTPUT --off" $USER; \
    sleep 1; \
    su -c "xrandr -display :0 --output $OUTPUT --auto" $USER;)&
  ;;
esac

replace the first xbmctest with your username, e.g. USER=hans

Some notes, the 00-filename is important here, cause on resume the order is inversed, so 00 can make sure that everything is already up and running. On suspend you would call it 80-something.

Hi Fritsch,

Thanks for this script...this problem has been annoying me for one year! (Gentoo user here). I tried upgrading to new kernels, changing nvidia drivers....you name it!

I cut down the sleep time in the script down to 1 second and the screen blanking is now not seen as the tv monitor and amp are still powering on...thus it makes it *look* a bit cleaner than it actually is....good enough for me!

fyi i tried your other suggestion too....ie generating the edid.bin file via nidia-xconfig and updating xorg.conf to point to it (mine was using DP-2)...but to my surprise, it doesn't work....any suggestions to why this is?

btw i have a samsung tv and onkyo tx-sr578 amp...when the amp powers on, it defaults to the tv input, whereas my audio comes in via the cable/sat input via an optical connection...so unless i intervene i have video with the audio pointing to the wrong input. i have a workaround on my harmony one remote to reset it to cable/sat after 15 seconds or so as it keeps defaulting back to the tv input if i to switch it before 15 seconds...would you have any idea why the amp defaults to the incorrect audio input? (thus i have video but no audio)...is there anyway to stop it doing this? it is a handshake problem? sound is disabled on the tv and is configured to use the amp so im not sure why it does this. it would be nice to solve this issue too as it would save me 15 seconds or so when resuming.

but im happy to live with this script - thx again Smile

cheers
(This post was last modified: 2013-08-03 10:12 by ChickenLicken.)
find quote
Post Reply