[soundnua]: hdmi audio missing in sound settings (but works in Gnome shell)

Bug #974963 reported by zarquon42
92
This bug affects 27 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Invalid
Low
David Henningsson
gnome-control-center (Ubuntu)
Invalid
Low
Conor Curran

Bug Description

When using sound settings, under unity, the option hdmi-audio is missing, while under gnome-panel it is available and works fine.

Steps to reproduce:
log into unity
select system settings -> sound settings
only analogue output available.

Now log into gnome panel:
same procedure as above

hdmi audio is there and works.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-control-center 1:3.4.0-0ubuntu4
Uname: Linux 3.3.0-030300-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Fri Apr 6 10:48:11 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gnome-control-center
UpgradeStatus: Upgraded to precise on 2012-03-26 (10 days ago)

Revision history for this message
zarquon42 (zarquon42) wrote :
Changed in gnome-control-center (Ubuntu):
assignee: nobody → Conor Curran (cjcurran)
importance: Undecided → Low
summary: - hdmi audio missing in sond settings
+ [soundnua]: hdmi audio missing in sond settings
tags: added: soundnua
Revision history for this message
zarquon42 (zarquon42) wrote : Re: [soundnua]: hdmi audio missing in sond settings

is there a quick and dirty workaround so I can use hdmi output (on a amd e-450 apu) under unity, or do I have to log into gnome-panel session, each time I need hdmi audio?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
JW (jw-00000) wrote :

In my case, when booting with the HDMI cable connected, the option is available.
When booting with the HDMI cable disconnected and connecting it after boot, the option doesn't appear.

A few days ago, this still worked, so it seems a recent update must have introduced this bug?

Revision history for this message
JW (jw-00000) wrote :

Oh, I forgot to add that I am using the beta version of Ubuntu 12.04.

Revision history for this message
Conor Curran (cjcurran) wrote :

HDMI will only appear if the port is 'available', i.e. if the HDMI port has something plugged into it.

Conor Curran (cjcurran)
Changed in pulseaudio:
assignee: nobody → David Henningsson (diwic)
importance: Undecided → Low
Changed in gnome-control-center (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
zarquon42 (zarquon42) wrote :

I had a tv connected (hotplugged as well as during bootime) - but no hdmi showed up in sound menu (at the moment there is no hdmi device available for testing).

summary: - [soundnua]: hdmi audio missing in sond settings
+ [soundnua]: hdmi audio missing in sound settings
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: [soundnua]: hdmi audio missing in sound settings

Status changed to 'Confirmed' because the bug affects multiple users.

Revision history for this message
David Henningsson (diwic) wrote :

Could you please run this command: apport-collect 974963
...to be able to help you I need to know more about your hardware (graphics card, driver, etc) and running that command will attach that information to this bug. Please run the command when your system is in the state where hdmi audio should be showing up and working, but does not. Thanks.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
affects: pulseaudio → alsa-driver (Ubuntu)
Changed in alsa-driver (Ubuntu):
status: New → Incomplete
Revision history for this message
zarquon42 (zarquon42) wrote :

At the moment I have no access to a hdmi device but I will do as requested asap.

Revision history for this message
JW (jw-00000) wrote :

After a recent update, the problem no longer exists for me. I'll be unsubscribing myself from this bug, as I probably wasn't experiencing the same problem as zarquon42 (original report of the bug) is.

Revision history for this message
Aldwinaldwin (aldwinaldwin) wrote :

Same issue (AMD E-350 - 12.04 Precise). After reboot, everything is ok. But, if you take out the HDMI and reconnect it, then the sound settings has no more HDMI audio setting anymore, neither does the sound go through. Although, in PulseAudio Volume Control, you can still see that the audio is detected there for the HDMI module.
In 11.10, everything worked fine.

Revision history for this message
ggubuntu (ggubuntu) wrote :

Same issue. Using fglrx radeon 5650. Worked fine in 11.10. I have a different "workaround":
I plug in HDMI, only after that i can choose the input on my tv. There is no HDMI output in sound settings. If i plug out HDMI and plug it in again, it will be in the settings.

Doing a short watch "dmesg | tail -20" got me:

Plug in - TV is not set to HDMI-Input (no entry in settings):
[ 2678.137879] HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=1 ELD_Valid=1
[ 2678.137899] HDMI status: Codec=0 Pin=3 Presence_Detect=1 ELD_Valid=1
[ 2678.137950] HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0
[ 2678.137965] HDMI status: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0

Selecting HDMI on TV (nothing happens) - plug out, plug in (entry in settings):
[ 2678.161597] HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=1
[ 2678.161621] HDMI status: Codec=0 Pin=3 Presence_Detect=1 ELD_Valid=1

Unselecting HDMI on TV (entry in sound settings gone)
[ 2707.224468] HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0
[ 2707.224494] HDMI status: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0

Selecting HDMI again does nothing.

Im no expert in this things, but to me it seems that pluggin in the first time first is detected, but immediatly set to ELD_Valid=0 after that. Pluggin out and in with selection on TV leaves the state valid and switching input on TV unsets Valid. In my case at least best option would be to show HDMI in sound settings and never "unload" it, if detected one time? Right click->disable input as option to disable it again?

It worked perfect in 11.10.

Revision history for this message
DJPhelan (djphelan) wrote :

Same issue, AMD e-350 and 12.04 Precise. This is a pretty new system and I thought that it may be a hardware issue. This confirms that it is a driver issue.

MSI E350IA-E45 Motherboard

The HDMI works fine for a while but randomly disappears. When the sound stops I can look in the sound settings and the HDMI option is gone.

If I log out and log in again it will reappear and work fine for a while.

Regards.

Revision history for this message
David Henningsson (diwic) wrote :

Hi!

While working with a colleague today I discovered a bug that could make the device disappear after S3 suspend/resume. Maybe it is related?

In that process I also made a debug dkms with the fix in, and some debug messages (prefixed with "Diwic" in the dmesg log).
Here it is. Does it help?

Revision history for this message
David Henningsson (diwic) wrote :

Temporary patch, will clean it up. Just so you know what I put in the dkms.

tags: added: patch
Revision history for this message
Peter Willett (peter-willett) wrote :

Hi David

I too have the HDMI sound problem.
System E350M1 card with 64 bit mythbutu 12.04 with all the updates up to 25 September on it. The card has the Radeon Graphics hardware on it.
Sound can be restored by unplugging and plugging the HDMI lead back in.
I sometimes have the PC start up without the Samsung TV on and, it may be my imagination, but then HDMI sound will not work.
Have been experimenting with /etc/init.d/xxx restarts to no purpose

I see no one else has given you a copy of their log and have attached one to aid you if you need it.

Regards

Revision history for this message
David Henningsson (diwic) wrote :

@Peter, looking at the last part of the log:

Sep 26 07:52:57 lounge-tv kernel: [ 16.265760] Diwic: hdmi_unsol_event, res = 0x4000001
Sep 26 07:52:57 lounge-tv kernel: [ 16.265785] Diwic: read_pin_sense for pin 0x3, result = 0xffffffff
Sep 26 07:52:57 lounge-tv kernel: [ 16.267171] Diwic: hdmi_unsol_event, res = 0x4000002
Sep 26 07:52:57 lounge-tv kernel: [ 16.267187] Diwic: read_pin_sense for pin 0x3, result = 0xffffffff
Sep 26 07:53:07 lounge-tv kernel: [ 26.336065] eth0: no IPv6 routers present
Sep 26 07:54:17 lounge-tv kernel: [ 95.699821] Diwic: hdmi_unsol_event, res = 0x4000000
Sep 26 07:54:17 lounge-tv kernel: [ 95.699870] Diwic: read_pin_sense for pin 0x3, result = 0x7fffffff

It looks like you booted your machine with HDMI in and then unplugged it 90 seconds after boot. Is this correct, and also, was the device showing in the sound settings from boot until you unplugged it?

Revision history for this message
Peter Willett (peter-willett) wrote :
Download full text (4.2 KiB)

Hi David

Thank you for responding quickly.

No I don't recall unplugging it after 90 seconds. And, I know the HDMI cable is good because I swapped it when I first found the fault, and looking at dmesg I could see something about HDMI pin3.

I use this machine with Mythbuntu and the machine comes on at a set time from the bios rtc. The TV is switched on later. I have noticed that if I power the PC after switching on the TV then I do have sound (this is my perception and I need to record if this is 100% true on all occasions).

I am not sure what you mean about seeing it in sound settings. In Mythbutu this is Frontend/Setup/Audio and can only be seen after it has booted. I think that, in the past, when I have looked at it, it had a comment "Not Connected", but looking today this is not there. In the past I have tried changing drivers back to others and back to the HDMI one without getting sound. Unplugging and replugging seems the only thing I can do if I don't want to reboot the system

Below is a test results from the kernel log that I have just done. I booted up with the TV off and got no sound. I then unplugged and plugged back in the HDMI cable and got sound. I can see that the lack of sound may be due to the fglrx (Radeon) drivers? And that the unplug/Replug in event caused something to happen which got me sound.

Sep 27 10:08:33 lounge-tv kernel: [ 14.676878] NFSD: starting 90-second grace period
Sep 27 10:08:34 lounge-tv kernel: [ 15.751924] r8169 0000:04:00.0: eth0: link up
Sep 27 10:08:34 lounge-tv kernel: [ 15.752401] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sep 27 10:08:34 lounge-tv kernel: [ 16.143481] fglrx_pci 0000:00:01.0: irq 42 for MSI/MSI-X
Sep 27 10:08:34 lounge-tv kernel: [ 16.144774] [fglrx] Firegl kernel thread PID: 1383
Sep 27 10:08:34 lounge-tv kernel: [ 16.145000] [fglrx] Firegl kernel thread PID: 1384
Sep 27 10:08:34 lounge-tv kernel: [ 16.145149] [fglrx] Firegl kernel thread PID: 1385
Sep 27 10:08:34 lounge-tv kernel: [ 16.145332] [fglrx] IRQ 42 Enabled
Sep 27 10:08:34 lounge-tv kernel: [ 16.224126] dvb-usb: recv bulk message failed: -110
Sep 27 10:08:34 lounge-tv kernel: [ 16.374829] [fglrx] Gart USWC size:508 M.
Sep 27 10:08:34 lounge-tv kernel: [ 16.374837] [fglrx] Gart cacheable size:198 M.
Sep 27 10:08:34 lounge-tv kernel: [ 16.374846] [fglrx] Reserved FB block: Shared offset:0, size:1000000
Sep 27 10:08:34 lounge-tv kernel: [ 16.374851] [fglrx] Reserved FB block: Unshared offset:fe67000, size:199000
Sep 27 10:08:34 lounge-tv kernel: [ 16.374856] [fglrx] Reserved FB block: Unshared offset:17ff4000, size:c000
Sep 27 10:08:34 lounge-tv kernel: [ 16.617887] Diwic: hdmi_unsol_event, res = 0x4000001
Sep 27 10:08:34 lounge-tv kernel: [ 16.617915] Diwic: read_pin_sense for pin 0x3, result = 0xffffffff
Sep 27 10:08:34 lounge-tv kernel: [ 16.619331] Diwic: hdmi_unsol_event, res = 0x4000002
Sep 27 10:08:34 lounge-tv kernel: [ 16.619352] Diwic: read_pin_sense for pin 0x3, result = 0xffffffff
Sep 27 10:08:44 lounge-tv kernel: [ 26.400068] eth0: no IPv6 routers present
Sep 27 10:11:21 lounge-tv kernel: [ 183.362555] Diwic: hdmi_unsol_event, res = 0x4000000
Sep 27 10:11:21...

Read more...

Revision history for this message
David Henningsson (diwic) wrote :

> I am not sure what you mean about seeing it in sound settings. In Mythbutu this is Frontend/Setup/Audio

I mean, in the Gnome control center. Unless Mythbuntu is running Gnome, you're likely suffering from something different compared to the original bug reporter.

Anyway; when you plug your cable in, or possibly when you activate the HDMI screen, you should get "Diwic: read_pin_sense for pin 0x3, result = 0xffffffff" and when you unplug it, you should get "Diwic: read_pin_sense for pin 0x3, result = 0x7fffffff". Note the difference (0x7 unplugged, 0xf plugged). The question is if you or mythbuntu does something when this comes up in dmesg, or if it just happens spontaneously?

Revision history for this message
Peter Willett (peter-willett) wrote :

Hi David

I don't know whether this is the right forum to continue with my problem. No doubt someone will tell me if I need to raise it else where. In any event if someone stumbles on this as I did then they may find my comments useful. I think I know what is going on in my case.

When the PC powers up without the TV switched on. There is no handshake between it and the TV over the HDMI cable. The video driver defaults to the expected value but the system disables the video codec. When the TV is switched on, it does not trigger a restart of the video flgrx driver and in turn the audio remains disabled. (Wouln't it be nice if the system detected the TV and this triggers a X server restart.)

I base this on my observations that a HDMI cable unplug and replug triggers a X restart and audio appears. That if I kill the video with "sudo pkill X" in a terminal and relogon the audio appears. If I start the PC after the TV has been switched on the audio appears. The pin 3 results are as you describe above.

Further reading of forum messages on here and elsewhere seems to show that many have overcome this problem by installing the newer video drivers from AMD website. The Ubuntu ones are old and the post release fglrx update in Additional drivers does not work for me and many others from what I can see in the forums. I have not had success installing a newer driver from the AMD site, the process fails for me. I have even tried the latest beta version which apparently has Ubuntu support. I need to pursue this when I have time.

I am sure that if Ctrl-Alt-Backspace was available that would be an easy way to restart the x server and the situation would be acceptable. With Mybuntu I can't enable the feature on the keyboard. I have seen that Alt (Right)- K-PrintScreen restarts the X server but not for me. I am able to add buttons to the mythtv frontend (I have buttons to Power_off and Reboot). I think I will add a button to kill the X server and it will restart. This is fine but the process does not remember that it should autologin but that is better than continually unplugging and replugging in the HDMI cable.

Anyhow, that is as far as I have got.

Peter

Revision history for this message
David Henningsson (diwic) wrote :

I doubt what's happening automatically on unplug/replug is an "X restart", since that kills your current session and brings you back to login. Anyway maybe the same thing can be triggered from the catalyst application somehow?

Revision history for this message
Beltrachi (beltrachi) wrote :

On ubuntu 12.04 I found two workarounds to make appear hdmi in the sound settings:

1. Restart pulseaudio

sudo killall pulseaudio

2. Send noise to the hdmi output

It's play something on the PCM with aplay. The dmesg didn't show up anything about hdmi till I played sound to it. Maybe the device connected (TV through HDMI) does not activate the sound till you try to play something? Just guessing.

cat /dev/urandom | aplay -f S16_LE -c2 -r44100 -D hdmi
# ctrl+c when you have heard the noise on the tv.

The hdmi word is the PCM where you are sending the sound. Noise in this case.
You can see your available PCMs by "aplay -L"

I can confirm too that this only happens after suspending the PC. When the computer has not been suspended (fresh boot), the hdmi device appears right away in the sound settings after plugging the hdmi, as should be expected.

Revision history for this message
Raymond (superquad-vortex2) wrote :

post the output of alsa-info.sh when sound is working and not working

Revision history for this message
Diederik (diederikjhattingh) wrote :

I have a similar hardware setup, and the same problem. When my HDMI TV goes on standby or of, the E350 integreated graphics card's HDMI sound out is no longer listed as a audio device under sound settings.

My workaround is to log out and back in again. Unpluging the HDMLI and plugging it in again also brings the sound back to life.

Restarting pulse does not work for me, neither does it help to send noise to the HDMI port. I see Beltrachi says it works for him, though that was from bringing the machine up again from suspension. My PC stays on.

I am using Ubuntu 12.04 with unity.

Attached is the output of also-info.sh when the sound works. The sound not working case, will fillow shortly.

Revision history for this message
Diederik (diederikjhattingh) wrote :

Attached: alsa-info.sh output when sound does not work.

Revision history for this message
Raymond (superquad-vortex2) wrote :

state.Generic {
 control.1 {
  iface CARD
  name 'HDMI/DP,pcm=3 Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

Revision history for this message
Leon Marincowitz (lionthinker) wrote :

This is still a bug in 13.04

Revision history for this message
Sebastian (sebastianhaselbeck) wrote :

yea and the idiotic thing is that it works in gnome shell. as if the user interface had an impact on the audio outputs... this is really ridiculous, so i have to log out and into gnome shell to use my hdmi output with sound....

Revision history for this message
David Henningsson (diwic) wrote :

Ok, let's look again at this bug.

First, unfortunately bug 1169984 made it into the 13.04 release, which hits many machines with HDMI audio. So any problems in 13.04 is likely to be bug 1169984.

Second, there is a patch "ALSA: hda - hdmi: Make jacks phantom, if they're not detectable" that hopefully fixes most of these errors.

What I recommend at this point (to get the above fix without getting bug 1169984 ) is to install the latest HDA driver and reboot ( https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS ).

If this helps, you're likely being helped by the next proposed kernel in 13.04 too.

If this does not help, you can do the following:
 * Install the hda-jack-retask package from https://launchpad.net/~diwic/+archive/hda
 * Start the program (run "hda-jack-retask" in a terminal).
 * Select the HDMI codec in the topmost combobox. (If you have more than one, and don't know which one is right, you might have to repeat the below steps for all codecs.)
 * Select "Advanced override"
 * On the HDMI pin that does not show up, click "override", then change "Jack detection" from "Present" to "Not present".
 * You can then either click "Apply now" and test this right away, or click "Install boot override" and reboot to test.

Regardless of this is working or not, report back here and attach alsa-info ( https://wiki.ubuntu.com/Audio/AlsaInfo ).

Thanks!

Revision history for this message
r0bb3d (r0bb3d) wrote :

Have the same problem on Ubuntu 12.04 with Unity. Sometimes when I plug in my HDMI TV to my Dell laptop the audio will not work, the HDMI audio device is not present in Unity, Pulse says "available: no". This could be connected to hibernation, but I'm not 100% sure. A reboot always solves the problem, but that is a very bad option for me.

Just for anyone who wants this solved quickly in a simple way:

Write a script that uses "xrandr" to check whether the TV is connected. Then have it check "pacmd list-cards" under ports whether the HDMI output is "available: yes". If the TV monitor is detected with xrandr, but the HDMI output (sound) is not available, have it run "killall pulseaudio". I have this in a loop, causes very little resources, but is a (admittedly dirty) pragmatic fix for the problem.

Revision history for this message
r0bb3d (r0bb3d) wrote :

Quick add-on to previous comment: use "xrandr --current" to prevent the command from causing the screen to freeze for a few ms.

Revision history for this message
David Henningsson (diwic) wrote :

Hi,

So far there have been no responses to comment #30. If anybody wants to work with me - and have the time necessary to run tests etc - feel free to start there. If not, I'm closing this bug, because there isn't more I can do at this point.

Thanks.

summary: - [soundnua]: hdmi audio missing in sound settings
+ [soundnua]: hdmi audio missing in sound settings (but works in Gnome
+ shell)
Revision history for this message
David Henningsson (diwic) wrote :

Closing as invalid due to the lack of responses to the last comment.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
positivek (anonyhole) wrote :

Bug still present in 14.04.

It's not an invalid bug, but rather incomplete if it's missing the requested information about it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

If you still have the issue it might be good to open a new bug report using ubuntu-bug and describing your configuration and what you do and get as result

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.