Bug 1529889 - PulseAudio 11.1 disables HDMI out every startup. 10.0 is fine
Summary: PulseAudio 11.1 disables HDMI out every startup. 10.0 is fine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-30 20:48 UTC by Leszek Matok
Modified: 2018-07-11 20:16 UTC (History)
3 users (show)

Fixed In Version: pulseaudio-12.0-3.fc28
Clone Of:
Environment:
Last Closed: 2018-07-11 20:16:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 101794 0 None None None 2018-05-05 14:03:10 UTC

Description Leszek Matok 2017-12-30 20:48:42 UTC
Description of problem:

Every time I start the computer, pulseaudio switches the "sound card" connected to my TV into profile "off", effectively disabling it:

$ pacmd list-cards
3 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_01_00.1>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 31"
		alsa.driver_name = "snd_hda_intel"
(...)
		output:hdmi-stereo-extra1: Wyjście Digital Stereo (HDMI 2) (priority 5700, available: no)
(...)
		off: Wyłączone (priority 0, available: unknown)
(...)
	active profile: <off>

Even if I turn the TV on, the profile doesn't change and obviously there's no sound.

So I can use pavucontrol to enable the sound card, which switches the profile to:
	active profile: <output:hdmi-stereo-extra1>

However, restarting pulseaudio without the TV (which happens on every logon/boot) switches the profile back to "off".

However, when the TV is enabled, pulseaudio does enable the card and remembers all video players that are set to play on the TV:
$ xrandr --output HDMI-0 --mode 1920x1080 --pos 1152x0
$ pulseaudio -k
$ pacmd list-cards|grep stereo-extra1
		output:hdmi-stereo-extra1: Wyjście Digital Stereo (HDMI 2) (priority 5700, available: unknown)
	active profile: <output:hdmi-stereo-extra1>

(note: "available: unknown" instead of "no")

Problem is: I shouldn't need to, and don't want to restart pulseaudio / fiddle with pavucontrol several times a day. PA is supposed to remember the profile I chose and never EVER _permanently_ disable a working sound card, just because it detects it as _temporarily_ "unplugged".

PulseAudio 10.0 works exactly as expected:

# dnf downgrade pulseaudio
(...)
  pulseaudio.x86_64 10.0-4.fc26                                                 
(...)
$ xrandr --output HDMI-0 --off
$ pulseaudio -k
$ pacmd list-cards|grep stereo-extra1
		output:hdmi-stereo-extra1: Wyjście Digital Stereo (HDMI 2) (priority 5200, available: no)
	active profile: <output:hdmi-stereo-extra1>

Note: in spite of "available: no" which pavucontrol shows as "... (HDMI 2) (unplugged)", the card is still enabled (has correct active profile). Therefore, it doesn't need any additional action after reboot/logout - sound just works™, like it should.


Version-Release number of selected component (if applicable):
pulseaudio-11.1-7.fc26.x86_64.rpm

How reproducible:
Always (all it needs is the output being "unplugged", which it always is when PA starts on this system)

Steps to Reproduce:
1. Log in.
2. Observe card's profile.

Actual results:
Off

Expected results:
Whatever profile I set before

Note: I think (hope!) that behind this regression was some kind of planned feature to switch the card off/on when disconnected/connected. I'm guessing the plan was to make all the software (that was set to play on the TV) to automatically switch to speakers. I wouldn't mind that, but only if it will switch back to TV the moment I enable it. And it should always go back to MY profile (HDMI 2 and not any other). And only re-enable the card, not make it default output device if it wasn't default before (I'm already predicting what will break next! :))


Additional info:
I tried my best to include only relevant info, but of course can provide debug dumps and whatnot. For now I'm staying on PA 10.0.

Comment 1 Fedora End Of Life 2018-05-03 08:02:20 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Leszek Matok 2018-05-05 14:03:10 UTC
Still the case in Fedora 28.

Meanwhile, I'm using PulseAudio 11.1 rebuilt with a single patch from this commit from September:

https://cgit.freedesktop.org/pulseaudio/pulseaudio/patch/?id=5f27c2ec2fb0477f213e6794113182eaee1c43ba

which references https://bugs.freedesktop.org/show_bug.cgi?id=101794

Maybe you could apply that to Fedora's package?

Comment 3 Rex Dieter 2018-05-05 15:45:59 UTC
Test candidate builds that include this patch are available from
https://copr.fedorainfracloud.org/coprs/rdieter/pulseaudio/

These will likely hit fedora update repos when confidence is high regarding it's stability (and absence of regressions)

Comment 4 Leszek Matok 2018-05-05 17:42:01 UTC
So far so good, I've upgraded to the git version from your copr repo and for my purposes, it works just like 11.1 patched with the above patch (same bugs remain, this bug is fixed with a small kink).

Test system is 2 sound cards always on + third card being the nvidia HDMI out + a USB microphone with monitor, with some programs (read: games) automatically picking card with headphones attached, and some programs (read: multimedia players) automatically picking HDMI out.

So not a fancy config with Bluetooth headphones or playing over a network, but all of that still works, if this was bodhi I'd give it karma.


Difference from 10.0 is that in 11.0 the card's profile starts as "off" after reboot and media players which have the HDMI output remembered, play on default card. In 10.0, they wouldn't play any sound.

Then I can turn the TV out on,  and those programs will instantly and automatically switch (which is what I want, very cool).

BUT, if I then turn the TV out off, the sound doesn't come back to the default card :) So it's back to PA 10.0 behavior when those programs output to a disabled device. It's not a problem, just inconsistent. (Can work-around with pacmd set-card-profile alsa_card.pci-0000_01_00.1 off though :))

Comment 5 Fedora Update System 2018-06-22 21:30:29 UTC
pulseaudio-12.0-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ca2efd3f6

Comment 6 Fedora Update System 2018-06-23 21:21:53 UTC
pulseaudio-12.0-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ca2efd3f6

Comment 7 Leszek Matok 2018-06-27 18:50:50 UTC
Strangest thing happened... I've upgraded to kernel-4.17.2-200.fc28.x86_64 and it regressed to original behavior...

With kernel 4.16.16-300.fc28.x86_64 it works with the newest pulseaudio-12.0-1.fc28.x86_64 from updates-testing, so the update is good, I gave it good karma.

But booting 4.17.2 makes my TV mute again and the card stays in the "off" profile forever... unless I specifically re-enable the HDMI out using pavucontrol or manually with pacmd set-card-profile alsa_card.pci-0000_01_00.1 output:hdmi-stereo-extra1

...

After some fiddling about I found one work-around and you won't guess what it is:

cat /proc/asound/card0/codec#0 > /dev/null

Yes, reading a seemingly random file from /proc/asound makes it recognize (rescan?) which devices are "plugged".

Looks like this time it's ALSA :)

(it's driven by snd_hda_intel, maybe Intel stopped liking NVidia :))

Comment 8 Fedora Update System 2018-07-02 03:52:13 UTC
pulseaudio-12.0-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ca2efd3f6

Comment 9 Fedora Update System 2018-07-03 17:52:10 UTC
pulseaudio-12.0-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ca2efd3f6

Comment 10 Fedora Update System 2018-07-05 19:23:24 UTC
pulseaudio-12.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ca2efd3f6

Comment 11 Fedora Update System 2018-07-06 17:52:36 UTC
pulseaudio-12.0-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ca2efd3f6

Comment 12 Fedora Update System 2018-07-11 20:16:33 UTC
pulseaudio-12.0-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.