Sound no longer working

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
davidw Offline
Member
Posts: 77
Joined: Jan 2009
Reputation: 0
Location: Austria
Lightbulb    Post: #51
For all with Ubuntu Intrepid I wrote a script to automatic restore the sound on the digital output without restarting the whole system just with restart xbmc!

Make sure that your xbmc-user is allowed to perform this commands without password inquiry (sudo visudo).

Code:
#!/bin/bash
##
# alsabug.sh
##

# Stop XBMC (type in here your command to stop your XBMC
/sbin/initctl stop tty2

# unload Alsa modules
/sbin/modprobe -r snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq_dummy snd_seq snd_rawmidi snd_pcm_oss snd_mixer_oss snd_hda_intel snd_pcm

# load Alsa modules
/sbin/modprobe -a snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_rawmidi snd_seq snd_timer snd_seq_device snd

# activate the digital sound output
amixer -- sset IEC958 on

# Start XBMC (type in here your command to start XBMC)
/sbin/initctl start tty2

!! I tested it only with Ubuntu Intrepid !!

My problem is now: how can I include this into XBMC so that I can start this script via remote?!!

Cheers,
David
(This post was last modified: 2009-05-16 19:16 by davidw.)
find quote
xnappo Offline
Senior Member
Posts: 155
Joined: Oct 2008
Reputation: 0
Post: #52
davidw Wrote:My problem is now: how can I include this into XBMC so that I can start this script via remote?!!

Cheers,
David

I just included it in my .xsession:

Code:
export XBMC_PLATFORM_MODE=1
while [ 1 ]
do
    /sbin/modprobe -a snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_se
q_oss snd_rawmidi snd_seq snd_timer snd_seq_device snd
    amixer -- sset IEC958 on
    /usr/share/xbmc/xbmc.bin
    /sbin/modprobe -r snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq_du
mmy snd_seq snd_rawmidi snd_pcm_oss snd_mixer_oss snd_hda_intel snd_pcm
done

case "$?" in
    0 ) # Quit
        touch /tmp/noRestartXBMC
        break ;;
    64 ) # Shutdown System
        sleep 10 ;;
    65 ) # Warm Reboot
        echo Restarting XBMC ... ;;
    66 ) # Reboot System
        sleep 10 ;;
     * ) ;;
esac

xnappo
find quote
SubSense Offline
Member
Posts: 54
Joined: Feb 2008
Reputation: 0
Post: #53
"/usr/bin/iecset audio on" worked for me. I hope it stays working
The other method from Tslayer not (maybe I did something wrong).
The method is also a bit difficult te read for a complete linux newbe.
find quote
megadeth Offline
Junior Member
Posts: 5
Joined: Aug 2009
Reputation: 0
Post: #54
tslayer Wrote:I've had this where only digital audio would output and NOT analog (still out of spdif).

What I usually do to fix in my scenario is:

0) Stop XBMC
1) Create a file in your home directory called .asoundrc that contains the following single line: pcm.!default spdif
2) Run: speaker-test -c 2
3) If you hear sound, you can stop.
4) Remove .asoundrc
5) Restart XBMC


Try that...

what does it mean when you did that and get sound out of the speaker test, but can't get sound out of xbmc or playing any other file?

my spdif was playing fine. then i turned my computer on today and no sound anymore?

the only thing i did different was use the suspend mode when turning off xbmc.
find quote
megadeth Offline
Junior Member
Posts: 5
Joined: Aug 2009
Reputation: 0
Post: #55
update!!

i went back and put xbmc in suspend mode again. turned the computer back on and the sound was back Confused

some kind of bug maybe with suspend mode Oo
find quote
crackers Offline
Member
Posts: 69
Joined: Sep 2009
Reputation: 0
Post: #56
I ran into this - but it wasn't limited to XBMC. I did find a very quick, non-reboot work-around elsewhere:
Code:
sudo alsa force-reload
This does essentially the same as the modprobe scripts mentioned above.
find quote
spozen Offline
Senior Member
Posts: 211
Joined: Nov 2008
Reputation: 0
Post: #57
Why isn't this a sticky anymore? This is very helpful if you have alsa problems.

Hardware: ASUS P5N7A-VM with 2GB RAM and Intel Celeron 430 1,8GHz @ 3,06GHz
find quote
newb2linux Offline
Member
Posts: 98
Joined: May 2009
Reputation: 0
Post: #58
This NAVIGATION SOUND FIX isnt working for 9.11 what should I do ?

HTPC SPECS:Samsung Series 850 58" PDP
1920x1080@60.00Hz (full Screen)
XBMCLive : 10.00
HDD: 500GB WD Blue MOBO:P5n7a-VM
GPU: Geforce 9300/nforce 730i/PCI/SSE2
MEMORY: 2 GIG 1066MHZ DDR3 (single)
CPU: Intel® Core™2 Duo CPU E7500 @ 2.93GHz
find quote
prrrtpieptoet Offline
Junior Member
Posts: 1
Joined: Dec 2009
Reputation: 0
Post: #59
Well, I see I'm not the only one who ran into the problem of audio disappearing all of a sudden in XBMC. However, I guess I am one of the very few that couldn't get it fixed by any of the solutions provided in this thread.

To cut a very long short: if you're on Linux and can't get it fixed either, open the file ~/.xbmc/userdata/guisettings.xml and look for the tag volumelevel under the parent tag audio. Mine was set to -5645 or something like that. Setting it to 0 solved the issue for me.

I don't have a clue what caused that value to be set there. I am running XBMC 9.11 on Mythbuntu 9.10 (Ubuntu Karmic Koala).
find quote
deepblue Offline
Senior Member
Posts: 142
Joined: Sep 2007
Reputation: 0
Post: #60
I had this issue occur the other day (MP3 audio and menu clicks just quit) and pulled my hair out trying to fix it. Ended up doing a full reinstall.

Two days later, happened again, this time I found this thread and did the .asoundrc "pcm.!default spdif" trick, restarted XBMC, and all is well.

Question - is there any harm in leaving the .asoundrc file there with that entry? Earlier posts indicate it could cause "issues"...I'd obviously like a permanent fix.

Thanks
find quote
Post Reply