Output switches from HDMI speakers to internal speakers on DPMS off

Bug #1641954 reported by Cristian Klein
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Undecided
Luke Yelavich
Xenial
Fix Released
Undecided
Luke Yelavich

Bug Description

Impact:
This bug affects users of audio via HDMI to their monitor or another HDMI device like an audio receiver.

Regression potential:
The regression potential should be low to non-existant.

Test case:
(1) Play some music through speakers connected through an HDMI display.

(2) type `xset dpms force off`

(3) Move mouse to bring screen back up.

With the version of PulseAudio in Xenial now, music plays in internal speakers, even after display wakes
up

Once the version of PulseAudio from xenial-proposed is installed, music plays in HDMI speaker after display wakes up

Original bug report

PulseAudio 8.0 includes a well-known user-experience regression: Its new auto-routing algorithm tries to switch to another output, as soon as the active output gets disconnected. This leads to the following bad user experience:

(1) Alice listens to music on her speakers, which are connected to the screen, which is connected through HDMI to the computer.

(2) Alice leaves the computer, the screen gets suspended (DPMS off).

(3) PulseAudio sees that the HDMI output got disconnected (although only for a short interval) and switches to internal speaker.

(4) Alice returns to the computer but finds that the music is now playing through the internal speakers.

(5) Alice can switch the output to the HDMI speakers manually, but the above user experience bug will reoccur when she leaves the computer again.

This is a well-known upstream bug that was fixed in PulseAudio 9.0. Due to the fact that Ubuntu 16.04.1 LTS uses PulseAudio 8.0, it is desirable to backport this fix to PulseAudio 8.0, so that all LTS users have better experience. Upstream said they would not do this and that I should report this to Ubuntu directly.

Other information:
* Upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=93946
* Fix 1: https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=04040c522f5f62dda50ac927e92453381d419f09
* Fix 2: https://github.com/pulseaudio/pulseaudio/commit/23c15c3b52a958887c1f8cad3c94879a8770ef0e

Revision history for this message
Cristian Klein (cristiklein) wrote :
Revision history for this message
Cristian Klein (cristiklein) wrote :
Revision history for this message
Cristian Klein (cristiklein) wrote :

This patch needs to be refreshed, due to the previous two patches.

tags: added: patch patch-rejected-upstream
Revision history for this message
Cristian Klein (cristiklein) wrote :

I added the quilt patches that need to be added on top of the current xenial-proposed. (Sorry if this is not the best way to present them, my "how to contribute to Ubuntu" is a bit rusty.)

I already tested them as follows:

(1) Play some music through speakers connected through an HDMI display.

(2) type `xset dpms force off`

(3) Move mouse to bring screen back up.

Before patch: music plays in internal speaker, even after display wakes up

After patch: music plays in HDMI speaker after display wakes up

Let me know if I can somehow help to push this into xenial-proposed.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 1641954] Re: Output switches from HDMI speakers to internal speakers on DPMS off

Thanks very much for doing the leg work for this. Once pulseaudio in xenial-proposed gets pushed to updates, which should be very soon, I will do the necessary work to sponsor this and get it into Xenial.

Thanks again.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 1641954] [NEW] Output switches from HDMI speakers to internal speakers on DPMS off

On Wed, Nov 16, 2016 at 12:58:14AM AEDT, Cristian Klein wrote:
> (1) Alice listens to music on her speakers, which are connected to the
> screen, which is connected through HDMI to the computer.
>
> (2) Alice leaves the computer, the screen gets suspended (DPMS off).
>
> (3) PulseAudio sees that the HDMI output got disconnected (although only
> for a short interval) and switches to internal speaker.

Ok, with a fresh Xenial install, I don't seem to get this behavior. I have tested with 2 different monitors, both different brands from each other. I set the HDMI audio out as the output, start playing audio, and let the screen turn off and/or run xset dpms force off. In either case, audio stops playing, but does not switch to another device. When I press a key and the screen turns back on, the music resumes playback on the monitor's speakers.

I should note that I've also tested this on 3 different machines, 2 that were also connected to speakers via 3.5mm analog jack, and another via S/PDIF.

Am I missing something?

Revision history for this message
Cristian Klein (cristiklein) wrote :

Could you tell me exactly which pulseaudio package you used? I could try to
re-reproduce the bug on my end.

2016-11-24 2:51 GMT+01:00 Luke Yelavich <email address hidden>:

> On Wed, Nov 16, 2016 at 12:58:14AM AEDT, Cristian Klein wrote:
> > (1) Alice listens to music on her speakers, which are connected to the
> > screen, which is connected through HDMI to the computer.
> >
> > (2) Alice leaves the computer, the screen gets suspended (DPMS off).
> >
> > (3) PulseAudio sees that the HDMI output got disconnected (although only
> > for a short interval) and switches to internal speaker.
>
> Ok, with a fresh Xenial install, I don't seem to get this behavior. I
> have tested with 2 different monitors, both different brands from each
> other. I set the HDMI audio out as the output, start playing audio, and
> let the screen turn off and/or run xset dpms force off. In either case,
> audio stops playing, but does not switch to another device. When I press
> a key and the screen turns back on, the music resumes playback on the
> monitor's speakers.
>
> I should note that I've also tested this on 3 different machines, 2 that
> were also connected to speakers via 3.5mm analog jack, and another via
> S/PDIF.
>
> Am I missing something?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1641954
>
> Title:
> Output switches from HDMI speakers to internal speakers on DPMS off
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+
> bug/1641954/+subscriptions
>

Revision history for this message
Luke Yelavich (themuso) wrote :

I was using 1:8.0-0ubuntu3.1.

Revision history for this message
Cristian Klein (cristiklein) wrote :

I just downgraded to 1:8.0-0ubuntu3.1:

> sudo apt-get install --allow-downgrades pulseaudio=1:8.0-0ubuntu3.1
libpulse0=1:8.0-0ubuntu3.1 pulseaudio-utils=1:8.0-0ubuntu3.1
pulseaudio-module-x11=1:8.0-0ubuntu3.1 libpulsedsp=1:8.0-0ubuntu3.1
pulseaudio-module-bluetooth=1:8.0-0ubuntu3.1
libpulse-mainloop-glib0=1:8.0-0ubuntu3.1 libpulse0:i386=1:8.0-0ubuntu3.1

I can reliably reproduce the bug. The output switches to "Speakers /
Build-in Audio" on DPMS off and does not get restored on DPMS on.

Not sure how to progress here. Shall I send you a video reproducing the
bug? Some pulseaudio tables / logs?

2016-11-29 9:10 GMT+01:00 Luke Yelavich <email address hidden>:

> I was using 1:8.0-0ubuntu3.1.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1641954
>
> Title:
> Output switches from HDMI speakers to internal speakers on DPMS off
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+
> bug/1641954/+subscriptions
>

Revision history for this message
Luke Yelavich (themuso) wrote :

Probably logs would be best, https://wiki.ubuntu.com/PulseAudio/Log.

Revision history for this message
Cristian Klein (cristiklein) wrote :

Please find the log attached. I did the following:

(1) Started an audio client
(2) xset dpms force off
(3) Moved mouse, i.e., display back on
(4) Manually set output to HDMI

Let me know if there is anything else I can help with.

Luke Yelavich (themuso)
Changed in pulseaudio (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
Changed in pulseaudio (Ubuntu Xenial):
assignee: nobody → Luke Yelavich (themuso)
status: New → In Progress
Luke Yelavich (themuso)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Cristian, or anyone else affected,

Accepted pulseaudio into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:8.0-0ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pulseaudio (Ubuntu):
status: New → Fix Released
Changed in pulseaudio (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Cristian Klein (cristiklein) wrote : Re: [Bug 1641954] Re: Output switches from HDMI speakers to internal speakers on DPMS off

I just tested the package from xenial-proposed and can confirm that it
fixes the original bug.

Thanks!

2017-01-06 1:20 GMT+01:00 Brian Murray <email address hidden>:

> Hello Cristian, or anyone else affected,
>
> Accepted pulseaudio into xenial-proposed. The package will build now and
> be available at
> https://launchpad.net/ubuntu/+source/pulseaudio/1:8.0-0ubuntu3.2 in a
> few hours, and then in the -proposed repository.
>
> Please help us by testing this new package. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Your feedback will aid us getting this update
> out to other Ubuntu users.
>
> If this package fixes the bug for you, please add a comment to this bug,
> mentioning the version of the package you tested, and change the tag
> from verification-needed to verification-done. If it does not fix the
> bug for you, please add a comment stating that, and change the tag to
> verification-failed. In either case, details of your testing will help
> us make a better decision.
>
> Further information regarding the verification process can be found at
> https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
> advance!
>
> ** Changed in: pulseaudio (Ubuntu)
> Status: New => Fix Released
>
> ** Changed in: pulseaudio (Ubuntu Xenial)
> Status: In Progress => Fix Committed
>
> ** Tags added: verification-needed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1641954
>
> Title:
> Output switches from HDMI speakers to internal speakers on DPMS off
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+
> bug/1641954/+subscriptions
>

tags: added: verification-done
Luke Yelavich (themuso)
tags: removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:8.0-0ubuntu3.2

---------------
pulseaudio (1:8.0-0ubuntu3.2) xenial; urgency=medium

  * 0101-card-add-preferred-input-output-port.patch,
    0102-switch-on-port-available-prefer-ports-that-have-been.patch,
    0103-card-Add-hook-before-profile-changes.patch:
    - Backport from upstream to fix a bug in PulseAudio 8 where audio switches
      to another audio device when an HDMI monitor goes to sleep, thanks to
      Cristian Klein <email address hidden> for the backport (LP: #1641954)

 -- Luke Yelavich <email address hidden> Thu, 08 Dec 2016 14:16:59 +1100

Changed in pulseaudio (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for pulseaudio has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.