[Oneiric] HDMI output does not work immediately

Bug #884336 reported by Philipp Wendler
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
PulseAudio
Unknown
Medium
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

In Oneiric, the output of 5.1 sound (not AC3 passthrough, but multi-channel PCM) via the HDMI connector of my onboard Intel graphics card is finally working. This is really great!

For this to work, I have configured Pulseaudio to use the "Digital Surround 5.1 (HDMI) Output". The HDMI output of my computer is connected to a 5.1 receiver.

However, there is one nuisance: Whenever I start playing sound on the computer (e.g., rhythmbox or VLC, both playing via PulseAudio), I hear no sound. On my receiver I have to re-select the input source for the computer, which seems to initiate a HDMI handshake (it lasts 3 seconds). Only after this I am able to hear sound.

If I press pause and continue in Rhythmbox, the sound continues fine. If I stop and restart Rhythmbox, I have to do the above procedure again. The same is true for VLC and probably for all other players.

While playing around, I have noticed that sound is also working after killing pulseaudio while playing something in Rhythmbox. When the connection to Pulseaudio is killed, Rhythmbox tries a fallback to ALSA. As the Pulseaudio daemon was immediately restarted, this will result in Rhythmbox being connected via the ALSA plugin (before the connection was direct). It seems that Pulseaudio is doing the necessary things here, because after this I do hear sound (as long as Rhythmbox runs). However, this trick does not work for other players like VLC which don't fall back to ALSA.

Note that while for me this is just a nuisance, it may be a real blocker for other users. As long as you don't try to fiddle with the receiver inputs while playing sound on the computer, you hear absolutely nothing via HDMI. This includes the sounds from the speaker test dialog of Pulseaudio. I guess a lot of users would give up and think that HDMI output is broken in Ubuntu.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: pulseaudio 1:1.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: philipp 7706 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xfe520000 irq 50'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0892,80862002,00100302 HDA:80862805,80862805,00100000'
   Controls : 31
   Simple ctrls : 16
Date: Mon Oct 31 18:07:22 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
ProcEnviron:
 LANGUAGE=de:en
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 LC_MESSAGES=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: pulseaudio
UpgradeStatus: Upgraded to oneiric on 2011-10-31 (0 days ago)
dmi.bios.date: 11/15/2010
dmi.bios.vendor: Intel Corp.
dmi.bios.version: BLH6710H.86A.0076.2010.1115.1959
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: DH67BL
dmi.board.vendor: Intel Corporation
dmi.board.version: AAG10189-205
dmi.chassis.type: 3
dmi.modalias: dmi:bvnIntelCorp.:bvrBLH6710H.86A.0076.2010.1115.1959:bd11/15/2010:svn:pn:pvr:rvnIntelCorporation:rnDH67BL:rvrAAG10189-205:cvn:ct3:cvr:

Revision history for this message
Philipp Wendler (philw85) wrote :
Revision history for this message
Philipp Wendler (philw85) wrote :

It also works if I switch the Pulseaudio output configuration to "Digital Stereo (HDMI) output" and back while the sound is playing. As soon as the first change is done, I hear sound (in stereo, of course) and after the second change I have nice 5.1 sound.

So Pulseaudio is clearly able to do everything necessary to have sound, it just needs to do it automatically when starting playback.

Revision history for this message
Philipp Wendler (philw85) wrote :

I talked to the Pulseaudio developers on IRC. Disabling the module "module-suspend-on-idle" solves this problem.

Revision history for this message
In , O-frepdesktop-n (o-frepdesktop-n) wrote :

Created attachment 53000
Output of "pactl list sinks"

If this module is loaded, HDMI output (stereo and 5.1) is not working when I start a player like VLC or Rhythmbox. I have to fiddle with the output configuration of Pulseaudio (e.g., changing from 5.1 to stereo and back) or with the input configuration of my receiver (e.g., re-selecting the input source my computer is connected to) to hear sound.

If I pause and continue the playback, sound is still fine. If I quit the player so that no stream is playing at all and start it again, I have to perform the above procedure again.

Unloading the module suspend-on-idle solves this problem whereas loading the module produces the problem reproducibly.

Hardware: Intel Sandy Bridge cpu & mainboard with onboard video card with HDMI output (see attached file sink-list.txt). My receiver is a Denon AVR-1910.

Software: Pulseaudio 1.0 from Ubuntu 11.10 x64 (package version 1:1.0-0ubuntu3)

I had already filed a bug in the Ubuntu bug tracker: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/884336

Revision history for this message
Philipp Wendler (philw85) wrote :
Revision history for this message
In , O-frepdesktop-n (o-frepdesktop-n) wrote :

Created attachment 53005
Output of pulseaudio -vvvvv

I produced a log output of pulseaudio, maybe it is useful. The log contains the following actions:

- start pulseaudio (nothing is playing)
- start VLC and begin playback (no sound from speakers)
- change output configuration from 5.1 to stereo in pavucontrol (sound is now audible)
- change output configuration from stereo back to 5.1 in pavucontrol (sound is still audible)
- quit VLC (nothing is playing anymore)
- start VLC and begin playback (again no sound from speakers)

Revision history for this message
In , Arun Raghavan (arunraghavan) wrote :

Could you post the output of alsa-info[1] from when the output is working and when it is not?

[1] http://git.alsa-project.org/?p=alsa-driver.git;a=blob_plain;f=utils/alsa-info.sh

Revision history for this message
In , O-frepdesktop-n (o-frepdesktop-n) wrote :

Created attachment 58470
alsa-info when running PA without module-suspend-on-idle (WORKING sound)

Revision history for this message
In , O-frepdesktop-n (o-frepdesktop-n) wrote :

Created attachment 58471
alsa-info when running PA with module-suspend-on-idle (NON-WORKING sound)

The alsa-info from when sound is not working was collected after starting pulseaudio with module-suspend-on-idle, playing a sound (verifying its working), waiting for the suspend module to trigger, and playing a sound again (verifying it is not working).
So this shows the suspended state.

Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , David Henningsson (diwic) wrote :

This might be a long shot, and I'm not completely sure, but I suspect this might be bad position reporting from the hardware, see

https://wiki.ubuntu.com/Audio/PositionReporting

Revision history for this message
In , O-frepdesktop-n (o-frepdesktop-n) wrote :

Neither using the module parameter for snd_hda_intel nor disabling PA's timer scheduling worked for me.

Note that I didn't reboot my computer for these tests. Instead I just unloaded the snd_hda_intel module and loaded it again with the position_fix parameter specified on the modprobe command line. If this is not enough, I can do it with reboots, but this machine is used remotely by others as well, so I try to avoid that.

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

Hmm, I just had a look in your alsa-info as well, and it shows entries like this:

[1788814.086727] [drm:drm_detect_monitor_audio], Monitor has basic audio support
[1788814.086733] [drm:output_poll_execute], [CONNECTOR:14:HDMI-A-2] status updated from 1 to 1
[1788814.087245] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003e

If you get strange entries in your dmesg when audio stops working, it looks like a kernel/hardware bug to me. Or did you repeatedly plug in and unplug your hdmi cable?

Revision history for this message
In , O-frepdesktop-n (o-frepdesktop-n) wrote :

Yes, I switch a lot between two devices connected via HDMI (my monitor, which is connected via a HDMI-DVI adapter, and my receiver). So the log entries might result from this.

For this problem I tested only the connection to the receiver. So I plugged in the receiver, verified the sound is working and then waited for the suspend timeout, after which the sound is not working.

If required, I can reproduce the problem and provide dmesg output, but this will take a few days as I'm currently out of country. However, although I am not sure, I guess I looked into the dmesg output when having the problem for the first time, and didn't find anything interesting.

Revision history for this message
In , Arun Raghavan (arunraghavan) wrote :

This looks very much like an ALSA driver issue, so I'm dropping it as a 2.0 blocker.

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

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

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Bernie Innocenti (codewiz) wrote :

I have a similar problem with snd_hda_codec_hdmi loosing the first 1 or 2 seconds of audio every time pulseaudio reopens the /dev/snd/* device.

I worked it around by commenting out module-suspend-on-idle in /etc/pulse/default.pa, but i wish there were a way to make the audio output recover faster.

Revision history for this message
In , Matt Horan (mhoran) wrote :

I'm seeing a similar issue with a similar setup. I've got a media center connected to a receiver via HDMI. Sometimes when I'm playing audio and power-cycle devices in the chain (TV, receiver, etc), pulse will stop playing audio. I don't get any errors or anything, and issuing pulseaudio -k will bring it all back.

I tried commenting out the module-suspend-on-idle module. It seemed to work at first, but I eventually got into a state where PA applications complained about not being able to play back, and audio went silent.

I think this could be an ALSA issue, but it's quite difficult to debug. Has anyone else come up with a solution to this problem?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 11.10 (oneiric) reached end-of-life on May 9, 2013.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Changed in pulseaudio (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/147.

Changed in pulseaudio:
status: Confirmed → Unknown
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.