No Audio from HDMI After Switching Monitor Off / On

Bug #1001842 reported by Sushi
134
This bug affects 28 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After the 12.04 Update my HDMI audio stops working anytime I turn off or on, my 2nd monitor(plasma TV)
System Settings>Sound - Output
HDMI audio disappears from the list when monitor is turned off or on and does not reappear.

see http://askubuntu.com/questions/133575/hdmi-audio-stops-after-tv-turned-off/139265#139265

I'm guessing it has something to do with sink detection and ATI video

The only info I've found is after running pactl list
Partial copy

Sink #0
    State: SUSPENDED
    Name: alsa_output.pci-0000_01_00.1.hdmi-stereo
    Description: Turks HDMI Audio [Radeon HD 6000 Series] Digital Stereo (HDMI)
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 4
    Mute: no
    Volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    Base Volume: 100%
                 0.00 dB
    Monitor Source: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "HDMI 0"
        alsa.id = "HDMI 0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "3"
        alsa.card = "1"
        alsa.card_name = "HD-Audio Generic"
        alsa.long_card_name = "HD-Audio Generic at 0xfddfc000 irq 48"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:02.0/0000:01:00.1/sound/card1"
        device.bus = "pci"
        device.vendor.id = "1002"
        device.vendor.name = "Advanced Micro Devices [AMD] nee ATI"
        device.product.name = "Turks HDMI Audio [Radeon HD 6000 Series]"
        device.string = "hdmi:1"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "hdmi-stereo"
        device.profile.description = "Digital Stereo (HDMI)"
        device.description = "Turks HDMI Audio [Radeon HD 6000 Series] Digital Stereo (HDMI)"
        alsa.mixer_name = "ATI R6xx HDMI"
        alsa.components = "HDA:1002aa01,00aa0100,00100200"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        hdmi-output-0: HDMI / DisplayPort (priority: 5900, not available)
    Active Port: hdmi-output-0
    Formats:
        pcm

I checked before and after. The only difference is
hdmi-output-0: HDMI / DisplayPort (priority: 5900, not available)

Where "not available" is the only change I found.
Removing cable from HDMI socket and plugging in again, restores audio.
Logging in and out again restores audio.

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

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

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1001842/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → pulseaudio (Ubuntu)
Revision history for this message
thefuzz4 (jason-hamilton) wrote :

I can confirm that this is a problem as well.

Revision history for this message
Márcio Santos (marcio.santos) wrote :

I can confirm this bug, but i do not believe it is pulseaudio related.

I am experiencing the exact same problems with a new install of Ubuntu 12.04 Server Edition without pulseaudio, with standard alsa sound, lightdm and xbmc eden.

I believe the problem is Kernel or AMD Drivers related.

When the TV or Monitor is turned off, i get the following log entries in kernel log:
    HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0
    HDMI status: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0

When the TV is turned back on, no HDMI status is detected to turn the ELD_Valid=1, so no sound from HDMI.

Removing and re plugging the HDMI cable results in a:
    HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=1
    HDMI status: Codec=0 Pin=3 Presence_Detect=1 ELD_Valid=1
And sounds begins flowing again.

Logging out from the XBMC session and logging back on, results in the same events being logged:
    HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=1
    HDMI status: Codec=0 Pin=3 Presence_Detect=1 ELD_Valid=1
And sounds begins flowing again.

I was previously running the same setup with Beta 1 and didn't experience this problem.

Revision history for this message
Sushi (sushi-addiction13) wrote :

Thanks for the extra info Márcio. You are using AMD drivers....

I'm using fglrx from https://launchpad.net/~ubuntu-x-swat/+archive/x-updates
Many other have reported the same problem using fglrx from jockey.

I've been using, Go to System Settings>Display. Then click apply without changing anything. As a workaround.
I agree that it's probably not pulse audio but I have no idea of how to/what to change it

Revision history for this message
Bonzo (bonzo-bvd) wrote :

I can confirm that is a driver issue. I had this problem (still not solved) in windows after a catalyst driver upgrade (I didn't remember which version).

Recently I have installed ubuntu 12.04 on the same machine (dual boot) and I have the same problem: no hdmi output after turning off tv (stand by). When I turn on tv the hdmi output device in sound configuration (Juniper HDMI Audio Radeon HD 5700 Series) is gone.

To get it back I have to unplug the hdmi cable and plug it again or to turn the tv off, but no stand by (hard off).

I hope this helps.

Revision history for this message
Sami Nieminen (sami-nieminen) wrote :

It seems that this is indeed caused by AMD Catalyst driver. There is now beta version of 12.6 which has the following fix:

Disabled HDMI audio when the connected HDTV is powered Off/On.

The beta is available here: http://support.amd.com/us/kbarticles/Pages/AMDCatalyst126beta.aspx

I am going to test it to see if it fixes the issue.

affects: pulseaudio (Ubuntu) → ubuntu
Revision history for this message
Sami Nieminen (sami-nieminen) wrote :

I can confirm that the 12.6 beta fixes the issue.

Revision history for this message
Sushi (sushi-addiction13) wrote :

What about fglrx users.

affects: ubuntu → fglrx-installer (Ubuntu)
Revision history for this message
Márcio Santos (marcio.santos) wrote :

I can indeed confirm that upgrading to AMD Catalyst 12.6 Beta fixed the problem.

I build the .deb package from the install file using the internal build process:

sh ./amd-driver-installer-8.98-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg --install fglrx_8.980-0ubuntu1_amd64.deb
sudo dpkg --install fglrx-amdcccle_8.980-0ubuntu1_amd64.deb

After restart, the problem no longer occurs.

Revision history for this message
Joe H. (joseph-hirn) wrote :

Well this sucks for those of us with a not too old HD 4000 series card as 12.6 is not compatible. I'm going to try going through older drivers. Perhaps this was a regression in ATI drivers and not present in one of the older versions.

bugbot (bugbot)
tags: added: kubuntu
Revision history for this message
Shane Sanders (shane442) wrote :

Any chance there will be a patch for the old cards as well. This is a MAJOR! issue...

Revision history for this message
cowmix (mmarch-gmail) wrote :

The newest beta driver solves the issue too.

Revision history for this message
Joe H. (joseph-hirn) wrote :

but can the newest driver work with 4XXX Radeon cards?

I hope the fix makes it to fglrx or there's a patch to the ATI drivers that enables this to work. Pretty annoying to have to rs my HTPC very time I go to view something.

Revision history for this message
Sebastian (sebastianhaselbeck) wrote :

same with intel on 12.10

it makes no sense to make HDMI audio out depend on active HDMI video out, hell new HDMI cables even support ethernet, it makes no sense concluding any media type with the cord/interface type.

Revision history for this message
Sushi (sushi-addiction13) wrote :

For some reason gnome and cinnamon don't have this problem. I've switched to cinnamon because unity had so many annoying bugs.

Revision history for this message
sébastien theil (seb-theil) wrote :

I have the same problem using NVIDIA drivers!

Revision history for this message
Vlatko Basic (vlatko.basic) wrote :

Aaaaaaaargh. Commented in wrong bug, please ignore above. Sound is working, just keys (volume up, down, mute) are blocked, not the sound. :-(

Revision history for this message
Kermode Bear (kermodebear) wrote :

Confirmed this bug with Ubuntu 12.04.2 LTS. Audio becomes unavailable after HDMI television has been turned off.

dmesg entries:
[149806.475564] HDMI hot plug event: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0
[149806.475609] HDMI status: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0

Running the following to take down the display and throw it back up will get everything working again:
 xrandr -display :0 --output DFP2 --off
 xrandr -display :0 --output DFP2 --auto

Replace FDP2 with your appropriate output device. There's probably a more graceful way to reset the sound but that's beyond my Linux-fu.

Revision history for this message
positivek (anonyhole) wrote :

On Ubuntu 14.04.1 LTS, another workaround is to go to the Display settings and change the resolution of the (hdmi) display temporarily. For example, set to a lower resolution and then let it time out (do not accept the changes). The HDMI "Play sound through" option is then available in the sound settings again.

Revision history for this message
Nathan Dorfman (ndorf) wrote :

I'm having the same problem in Ubuntu 14.04.1 LTS using on-board Intel graphics, no binary drivers in sight.

Revision history for this message
jandro (thejandroman) wrote :

Same issue on Ubuntu 16.04 LTS with on-board Intel graphics.

Revision history for this message
Stew Fisher (fishstew) wrote :

i have the same issue too with ubuntu 16.04 mate, but also i have changed my distro to Arch Linux and have the same issue, so i dont think its limited to to Ubuntu.

The other issue is that the bug is intermittent. sometimes it happens other times its not. I cannot work out what triggers this bug.

the chip im using is: 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07) its a new machine.

The work around that Positvek suggested seemed to work.

Revision history for this message
Josh Rosenberg (7-launchpad-desh-info) wrote :

I was able to work around this problem by using the xorg.conf option "CustomEDID". The goal is to essentially tell the system to pretend that your particular model of monitor/TV is always connected to the port in question.

First, run this to determine the name of the video port in question:
xrandr -d :0 --auto

Then, generate an edid file with the 'get-edid' utility. You can pipe the output into the edid-decode utility to see it, and eventually output it to a file (I used /root/edid.bin).

Then add something like this to your /etc/X11/xorg.conf, inside the "Device" section:
    Option "UseHotplugEvents" "False"
    Option "ConnectedMonitor" "HDMI-0"
    Option "UseDisplayDevice" "HDMI-0"
    Option "CustomEDID" "HDMI-0:/root/edid.bin"

Where HDMI-0 is the video port name you got from xrandr.

If you don't already have an xorg.conf file, you'll need to make one somehow. The "nvidia-xconfig" executable worked for me, but I'm sure it will vary depending on the video card and driver in question.

WARNING: I've read that using the CustomEDID option with an incorrect edid file (such as one for the wrong monitor or a different port) can cause hardware damage!

Revision history for this message
Victor (metalblueberry) wrote :

Same problem in ubuntu 18.04lts,
After the monitor enters in sleep mode or is turned off, the audio is missing.

Revision history for this message
free5lot (free5lot) wrote :

>After the 12.04 Update my HDMI audio stops working anytime I turn off or on, my 2nd monitor(plasma TV)

Try to comment the line in /etc/pulse/default.pa
load-module module-switch-on-port-available
and reboot or restart pulseaudio with
pulseaudio -k

Does it help? If not - revert changes by uncommenting the same line back.

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

Other bug subscribers

Remote bug watches

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