Losing audio after period of inactivity
#1
My installation keeps losing audio after a period of inactivity. In order to regain it I have to reboot.

I am using XBMC Eden, and it is running on Ubuntu 12.04, booting directly into an XBMC desktop session.

Running aplay -l on the machine outputs:

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC887 Analog [ALC887 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC887 Digital [ALC887 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

My audio settings are both set to custom -> plughw:1,3
Reply
#2
Im having the same problem thank god that ubuntu reboot's so quicky!
Reply
#3
anyone have a fix for this?
Reply
#4
Yes, nightly with AudioEngine.
System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon  AVR-3808CI  - Denon DVD-5900 Universal Player  - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray  - X-Box 360  - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
Reply
#5
(2012-05-31, 23:06)DDDamian Wrote: Yes, nightly with AudioEngine.

Sorry, i don't quite understand. Could you explain what you mean?
Reply
#6
(2012-05-31, 22:51)Mild Fuzz Wrote: anyone have a fix for this?

I found that I was losing audio as well after a period of inactivity - basically when the display would enter a power saving mode, when it was woken back up, audio would be gone. I found that by running xrandr and changing the display parameters to 'something else', and then back again, my audio would be restored. I found a python script that someone else wrote (I can't find the site so can't attribute this to the right person), that was checking for sleep events in the output from dmesg, and then triggering the same kind of xrandr switching to keep the screen awake. No audio loss since then.

As a first test I'd try changing the display settings via xrandr and then back to the original settings to see if this 'restores' your audio. If so, then you may want to run the script below when the system starts:


#!/usr/bin/env python
import os
import time

valid = "ELD_Valid=1"
invalid = "ELD_Valid=0"

def executeCommand(the_command):
temp_list = os.popen(the_command).read()
return temp_list

def getDMESG():
return executeCommand("dmesg | grep -i hdmi | tail -n 10")

def needsRefresh():
list = getDMESG();
valid_index = list.rfind(valid)
invalid_index = list.rfind(invalid)
if invalid_index > valid_index:
return True
else:
return False

def doTest():
if needsRefresh() == True:
os.popen("xrandr -display :0 --output DFP2 --off; xrandr -display :0 --output DFP2 --mode 0x9c").read()

while True:
doTest()
time.sleep(5)



Note: The line xrandr -display :0 --output DFP2 --off; xrandr -display :0 --output DFP2 --mode 0x9c should be change to match the parameters that are necessary for your particular environment, as it probably won't match mine Smile
Reply
#7
Seems a little heavy handed. I don't really want to have to keep it awake.

Is it relevant that my GFX card is a Radeon HD 5450? I don't think AudioEngine is compatible?!
Reply

Logout Mark Read Team Forum Stats Members Help
Losing audio after period of inactivity0