• 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
Linux Frodo - No sound after resume from suspend
If I type this into SSH then I get my sound back:
DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr --output HDMI3 --off
# followed by
DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr --output HDMI3 --auto

However, I can't seem to get the script to work. I tried creating the script in Windows (via Samba) by copying another file as a starting point and then overwriting the contents.
Any ideas?
Reply
(2013-03-20, 04:30)mattchapman Wrote: If I type this into SSH then I get my sound back:
DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr --output HDMI3 --off
# followed by
DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr --output HDMI3 --auto

However, I can't seem to get the script to work. I tried creating the script in Windows (via Samba) by copying another file as a starting point and then overwriting the contents.
Any ideas?

Try creating the script with a Linux text editor, such as nano via a ssh terminal. Also make sure the script is executable.
Reply
It seems I didn't do extensive enough testing. If the computer has been in sleep for some time, it doesn't work. I have no idea why, cause the commands do run. I added some logging to a file, and a little more delay, so I can see that it happens, but the sound doesn't come back.

Do anyone have any idea why? Is it a privilege thing?
Reply
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.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Hi

Should this issue be resolved now in XBMC V12.1 ? I am running Ubuntu 12.10 minimal with 3.8.6 kernel.

I have the same problem no sound after resume from S3 Sleep mode. At first I though the problem was that my Denon AVR had not fully powered on and that the XBMC PC was resuming too quickly. I got Logitech Support to add a 14 second delay to my activity on the Harmony remote, this now gives the AVR and HDTV plenty of time to fully turn on and be ready before the power on command is sent to the XBMC PC. However this has not resolved the problem. Like others if I suspend the XBMC PC and resume right away the sound comes back.

aplay -l when the sound is working and when the sound is not working is the same and shows 4 devices.

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

One difference I can see, is in the XBMC Settings - System - Audio. When the sound is not working the Audio Output Device and the Passthrough device are called "HDA INTEL PCH, HDMI#1" And when the sound is working the devices are called "HDA INTEL PCH, DON DENON-AVAMP ON HDMI"

I am using an Intel ITX media motherboard and in Intel i3 CPU which has on chip Intel HD2000 graphics. What would be the best fix to try and implement for my hardware?

Many thanks.
Reply
Hint: http://forum.xbmc.org/showthread.php?tid...pid1394513
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2013-04-12, 08:22)fritsch Wrote: Hint: http://forum.xbmc.org/showthread.php?tid...pid1394513

The answer is in my question?

Should I try and disable the digital SPDIF device?

I only just bought this HDMI capable Denon AVR. Previously I was using an old Sherwood AVR with no HDMI on it, so I was using the digital optical for audio from XBMC PC. No issues with losing audio after resume with that setup. But there are issues now I am using HDMI for audio.

Thanks
Reply
No.

The post above i meant. I got the link wrong. Try to turn off your TV with the xrandr command and turn it back on and see if something is coming back.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2013-04-12, 11:29)fritsch Wrote: Try to turn off your TV with the xrandr command and turn it back on and see if something is coming back.

Thanks for the reply. I am not sure how to do that, I am Googling now.
Reply
Not sure if I am doing this right but it says: output HDMI-1 not found; ignoring

Code:
xbmc@xbmc01:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

xbmc@xbmc01:~$ DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr --output HDMI-1 --off
warning: output HDMI-1 not found; ignoring
xbmc@xbmc01:~$ DISPLAY=:0 /usr/lib/xbmc/xbmc-xrandr --output HDMI-0 --off
warning: output HDMI-0 not found; ignoring

This command: speaker-test -D plughw:0,7 -c 2 works and I hear noise from the speaker, this command: speaker-test -D plughw:0,3 -c 2 doesn't work so that tells me the HDMI device I am actually using is HDMI 1 and not HDMI 0

However I can''t seem to get the xrandr commands to work. I wonder if the space in the name has anything to do with it? "HDMI 1" rather than "HDMI-1"

If I run the xrandr command using HDMI1 with no space I don't get any error it just outputs the xbmc@xbmc01:~$ prompt and doesn't seem to do anything.
Reply
Quote:This command: speaker-test -D plughw:0,7 -c 2 works and I hear noise from the speaker, this command: speaker-test -D plughw:0,3 -c 2 doesn't work so that tells me the HDMI device I am actually using is HDMI 1 and not HDMI 0
Those are your Audio outs. Video outputs are named differently.

You can get the correct DISPLAY output by:
Code:
DISPLAY=:0 xrandr -q
will tell you which monitor is connected and its modes. Use this instead.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2013-04-12, 15:39)fritsch Wrote:
Quote:This command: speaker-test -D plughw:0,7 -c 2 works and I hear noise from the speaker, this command: speaker-test -D plughw:0,3 -c 2 doesn't work so that tells me the HDMI device I am actually using is HDMI 1 and not HDMI 0
Those are your Audio outs. Video outputs are named differently.

You can get the correct DISPLAY output by:
Code:
DISPLAY=:0 xrandr -q
will tell you which monitor is connected and its modes. Use this instead.

Below is the output of that command. Looks like its HDMI3.

Code:
xbmc@xbmc01:~$ DISPLAY=:0 xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1920x1080      60.0 +   50.0*    30.0     25.0     24.0
   1920x1080i     25.0     30.0
   2880x576       50.0
   2880x480       59.9
   1280x1024      60.0
   1152x864       75.0
   1280x720       50.0     60.0     61.0
   1440x576       50.0
   1440x576i      25.0
   1024x768       60.0
   1440x480       59.9
   800x600        60.3
   720x576        50.0
   720x480        59.9
   640x480        60.0     59.9
   720x400        70.1
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
Reply
Yes, so:
DISPLAY=:0 xrandr --output HDMI3 --off
DISPLAY=:0 xrandr --output HDMI3 --auto

Take care, that your screen turns off after the first command.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2013-04-13, 09:02)fritsch Wrote: Yes, so:
DISPLAY=:0 xrandr --output HDMI3 --off
DISPLAY=:0 xrandr --output HDMI3 --auto

Take care, that your screen turns off after the first command.

Thanks

Yes the off command makes the TV screen go all blank and the auto command brings back the picture and also the sound as well.
Reply
Okay. Now do the following:
http://forum.xbmc.org/showthread.php?tid...pid1378913

Make sure, you replace USER=xbmctest with your username that is running xbmc and therfore has started the xserver. If this username is hans, make sure that line is read: USER=hans

This should make your screen blank after resume and enable it again.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12

Logout Mark Read Team Forum Stats Members Help
Frodo - No sound after resume from suspend3