Linux Ubuntu / Gotham upgrade HDMI no sound in XBMC
#1
I've no idea what happened, I only know how it happened.

I was running Ubuntu 12.04 and an old Gotham build for quite a long time. I have XBMC set up where I have an "xbmc" user that has no login required and goes straight to the XBMC system. Worked brilliantly and also allowed a full PC on my TV when I needed that instead.

Yesterday, I decided it was probably time to get to the next LTS version, so I upgraded Ubuntu. I saw that the XBMC ppa's got disabled with the new upgrade, so I re-added the 14.04 XBMC ppa and got that updates as well. I logged out (not rebooted) and logged into XBMC. Perfect! Except I was having some trouble with my remote control (I use a USB-based IR remote), so I went into the input settings via the mouse and checked then unchecked the "system keys" button. The remote started working perfectly again.

When I rebooted, the sound didn't work in XBMC. I have some dumbed down sound settings even on Expert, and what I mean by that is I don't see anything relating to passthrough. I forget what the setting was that it was on, but I definitely had to switch that when I moved from a receiver to just a TV as my output (so I suspect I had to switch to no passthrough. Now I see the HDMI sound output option, but nothing about passthrough.

I thought maybe this is an nvidia card problem (I've got a GT520 in it), so I purged the nvidia drivers and reinstalled them, then rebooted. Same problem. Sound works great for the "mactastic" user of the PC, but doesn't work for xbmc at all.

I don't remember where to check next. The logs didn't seem to think there was an issue, the sound isn't muted (it's maxed volume and unmuted in XBMC), and I don't see any general issues in dmesg or anywhere. Obviously it works well for my other user.

I tried checking the pulse audio controls, and there was nothing muted there and all looked good. I also tried checking alsamixer, but this was odd (and I have no idea if it's related). The main levels for the Intel G620 hdmi a/v (which I'm not using ... the HDMI is plugged into only the NVidia card) were set fine, but the GT520 Nvidia card just showed [00] [00] for two slots and nothing more.

I don't think that's an issue since I think XBMC is running off pulse, but thought I'd mention it.

So I'm at a loss. I don't know where to check, why I can't set or change passthrough (which I suspect is the actual issue) or where my sound went. I'd appreciate any thoughts / tips / tricks / ideas.
Reply
#2
Provide: id
Add xbmc user to group audio and video
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
And of course: Debug Log
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#4
Sorry.

I checked the groups and xbmc is a member of both audio and video.

Logs are here:
http://home.mclauthlin.com/tmp/xbmc.log
Reply
#5
I have some more information, perhaps, but no more real info. No more errors in the logs other than what was seen, but I got it "working" for a small time before it stopped again.

I brought the box upstairs to a different TV (where I could work on it while the wife watches regular cable) and started messing around some more. Didn't notice anything other than the audio settings was set to 2 channels, so I bumped it to 7.1 since the docs said it's supposed to be set to the "output". After that (and a reboot), it worked! Qualified ... it worked in the sense that audio from movies worked. Audio from the GUI didn't. I figured that was fine, so I moved it downstairs again.

Plugged it in and it changed my audio output back to analog, so I changed it back to HDMI, and boom! Working. Even the GUI sounds. Great! For about thirty seconds.

And then it stopped. No idea why, just suddenly the remote became unresponsive (movie kept playing as did sound) and on reboot, no more audio.

Of course, I went in to check the settings and they had changed back to analog from hdmi for some reason. I changed them back, but no audio ever again.

I've no idea why any of this would be!

Is there something I can reinstall? Somehow maybe blow away alsa / pulse / xbmc and start over? Or something I'm overlooking?

Oh, and of course, all the while the sound works perfectly with my normal desktop user, so it's something different between that user and the xbmc user / configuration.
Reply
#6
do you need pulseaudio on that box? If yes, make sure pulse is properly configured for HDMI and passthrough. If not, get rid of it.
Also disable VAAPI.
Reply
#7
Well, pulse is pretty much required by Ubuntu these days, and yes, it's configured for HDMI just fine for the other user (see above). It works perfectly within Ubuntu, just not in XBMC on the same box. This has to be some kind of config difference between XBMC and "regular" Ubuntu. Just no idea where or how.

As to setting up any kind of passthrough or anything in XBMC 13.2 ... how? The sound options have been streamlined and there's nothing there that says "passthrough" even in the expert settings.

I did go ahead and disable VAAPI (or at least deselect the radio button) in XBMC, but still no change there.
Reply
#8
I'm still at a loss here, but have more logs with more debug / verbose information. Again, the audio works fine for a different user in normal Ubuntu Unity (14.04). When the user xbmc (that loads only xbmc, not unity) comes along ... no sound.

I loaded up the new logs here:
http://paste.ubuntu.com/8368903/

I note that the hdmi-stereo / device 2 / GF119 HDMI Audio Controller DIgital Stereo is the correct device. That's what plays when I'm using pavucontrol / pulse in Ubuntu. Plays just fine. It's also what I have selected in the settings in XBMC.

Soon in the logs it tells me pulse is initialized and the stream is ready for hdmi-stereo. Almost immediately afterwards it has a debug line that says "Sink changed". Don't know if that's in response to saying this stream is ready, or if that's an issue. I see that message more times later in the log. No other information in it provided.

Then I mouse around and open a movie (Transcendence ... I assume it's a terrible movie, but whatever Wink ).

It gives me the following:
19:50:27 T:140258781595392 NOTICE: Opening audio stream: 1 source: 256
19:50:27 T:140258781595392 NOTICE: Finding audio codec for: 86017
19:50:27 T:140258748417792 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
19:50:27 T:140258781595392 DEBUG: FactoryCodec - Audio: passthrough - Opening
19:50:27 T:140258781595392 DEBUG: FactoryCodec - Audio: passthrough - Failed
19:50:27 T:140258781595392 DEBUG: FactoryCodec - Audio: libmad - Opening
19:50:27 T:140258781595392 DEBUG: SECTION:LoadDLL(libmad.so.0)
19:50:27 T:140258781595392 DEBUG: Loading: libmad.so.0
19:50:27 T:140258781595392 DEBUG: FactoryCodec - Audio: libmad - Opened
19:50:27 T:140258781595392 NOTICE: Creating audio thread
19:50:27 T:140258163275520 NOTICE: Thread DVDPlayerAudio start, auto delete: false
19:50:27 T:140258163275520 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
19:50:27 T:140258781595392 DEBUG: ReadEditDecisionLists - Checking for edit decision lists (EDL) on local drive or remote share for: /var/media/movies/Transcendence (2014)/Transcendence.avi
19:50:27 T:140258781595392 DEBUG: OnPlayBackStarted : play state was 1, starting 1
19:50:27 T:140258781595392 DEBUG: CDVDPlayer::SetCaching - caching state 3
19:50:27 T:140259565193152 DEBUG: PlayFile : OpenFile succeed, play state 2
19:50:27 T:140259565193152 DEBUG: OnPlayBackStarted : play state was 2, starting 0
19:50:27 T:140258748417792 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
19:50:27 T:140258748417792 DEBUG: ffmpeg[88E04700]: [mpeg4] Invalid and inefficient vfw-avi packed B frames detected
19:50:27 T:140258748417792 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(41708.300000, 0)
19:50:27 T:140258748417792 NOTICE: fps: 23.976024, pwidth: 720, pheight: 304, dwidth: 720, dheight: 304
19:50:27 T:140258748417792 DEBUG: OutputPicture - change configuration. 720x304. framerate: 23.98. format: YV12
19:50:27 T:140258748417792 NOTICE: Display resolution DESKTOP : 1920x1080@ 60.00 - Full Screen (16)
19:50:27 T:140258748417792 DEBUG: CXBMCRenderManager::Configure - 3
19:50:27 T:140258748417792 DEBUG: CVideoReferenceClock: Clock speed 100.100000%
19:50:27 T:140258163275520 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(24000.000000, 1)
19:50:27 T:140258163275520 DEBUG: CDVDPlayerAudio: Sample rate changed, checking for passthrough
19:50:27 T:140258163275520 DEBUG: FactoryCodec - Audio: passthrough - Opening
19:50:27 T:140258163275520 DEBUG: FactoryCodec - Audio: passthrough - Failed
19:50:27 T:140258163275520 DEBUG: FactoryCodec - Audio: libmad - Opening
19:50:27 T:140258163275520 DEBUG: FactoryCodec - Audio: libmad - Opened
19:50:27 T:140258163275520 NOTICE: Creating audio stream (codec id: 86017, channels: 2, sample rate: 48000, no pass-through)
19:50:27 T:140259142121216 INFO: CActiveAESink::OpenSink - initialize sink
19:50:27 T:140258163275520 DEBUG: CDVDPlayerAudio:: synctype set to 2: resample
19:50:27 T:140259142121216 DEBUG: CActiveAESink::OpenSink - trying to open device PULSE:alsa_output.pci-0000_01_00.1.hdmi-stereo
19:50:27 T:140259142121216 DEBUG: PulseAudio: Context authorizing
19:50:27 T:140259142121216 DEBUG: PulseAudio: Context setting name
19:50:27 T:140259142121216 DEBUG: PulseAudio: Context ready
19:50:27 T:140259142121216 DEBUG: PulseAudio: Stream ready
19:50:27 T:140259142121216 DEBUG: Restored Stream value to 1.000000
19:50:27 T:140259142121216 DEBUG: CAnnouncementManager - Announcement: OnVolumeChanged from xbmc
19:50:27 T:140259142121216 DEBUG: GOT ANNOUNCEMENT, type: 64, from xbmc, message OnVolumeChanged
19:50:27 T:140259142121216 NOTICE: PulseAudio: Opened device alsa_output.pci-0000_01_00.1.hdmi-stereo in pcm mode with Buffersize 150 ms
19:50:27 T:140259142121216 DEBUG: CActiveAESink::OpenSink - PULSE Initialized:
19:50:27 T:140259142121216 DEBUG: Output Device : GF119 HDMI Audio Controller Digital Stereo (HDMI)
19:50:27 T:140259142121216 DEBUG: Sample Rate : 48000
19:50:27 T:140259142121216 DEBUG: Sample Format : AE_FMT_FLOAT
19:50:27 T:140259142121216 DEBUG: Channel Count : 2
19:50:27 T:140259142121216 DEBUG: Channel Layout: FL,FR
19:50:27 T:140259142121216 DEBUG: Frames : 2400
19:50:27 T:140259142121216 DEBUG: Frame Samples : 4800
19:50:27 T:140259142121216 DEBUG: Frame Size : 8
19:50:27 T:140259133728512 DEBUG: Sink changed
19:50:27 T:140259077928704 DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
19:50:27 T:140258163275520 DEBUG: Previous line repeats 1 times.
19:50:27 T:140258163275520 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:272975.349000, should be:-124810.879868, error:-397786.228868

I then did 30 second "seek" jumps through the video a little, so it (in theory) would jump around and re-set the audio. Still nothing, but the logs don't seem to be saying anything negative.

Any of that make sense to anyone? See why there wouldn't be audio playing? To me, it seems to be saying it's playing ...
Reply
#9
Same problem for me after upgrading Ubuntu and Xbmc. Able to get sound via HDMI (ATI 5700 card) but only 2ch. Even sound via optical out was 2ch. Went back down to Xbmc 12.3 and same issue. In the end, I just uninstalled pulseaudio. Lost sound on other stuff, like the browser but I don't care. Now, I get passthrough (settings level = advanced,expert) and I'm happy.
Reply
#10
Provide logfiles and don't start a "me too" whine.

AMD only supports 2 channels at all, when you don't have a kernel >= 3.13.

If you run pulseaudio make sure you read the xbmc wiki on howto either set it up for DTS, AC3 passthrough or multichannel output: http://wiki.xbmc.org/index.php?title=PulseAudio

Edit: The OP had not sound at all.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
I don't know why my follow up reply didn't get posted here, but it doesn't seem to be showing, so I'll try to remember what I'd put there.

Basically, my problem was probably caused by the 14.04 Ubuntu upgrade (somehow). I tried many different ways of testing or enabling / disabling pulse in XBMC as well as other options.

The final solution, though, was to change my login profile to not auto-login my XBMC user. Then I could click the user at the login screen and switch to the Unity desktop instead of the XBMC view. I went in to the Unity desktop and went into the audio there (just from the audio button on the toolbar) and switched it back to HDMI (it was trying to output via the headphone jack). Sound worked suddenly for the XBMC user.

To check, I brought up the XBMC view from within Unity and saw that it worked. I also went into the pulse audio controller and checked that it was set to default as HDMI (and it was). I then logged out, switched the view back to XBMC, and then changed that user to auto-login again (from another user). Boom. Back to automatically loading XBMC and sound working perfectly.

I suspect the upgrade needed me to check some boxes or something from a GUI view and was simply re-implementing the default audio any time I switched it to HDMI. Odd, but this method has now been working for a week or two.
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu / Gotham upgrade HDMI no sound in XBMC0