Switch sound output automatically to HDMI, if available

Bug #1349025 reported by pafosdfkapos
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Switchboard
Invalid
Undecided
Unassigned
elementary OS
New
Undecided
Unassigned

Bug Description

If HDMI (or something similiar) cable is connected, then there would be no information displayed on the screen about the current audio output. If the person connects the cable, there should be a popup or notification for the person to choose, wether to use the default (built-in) or the external audio source.

Revision history for this message
Danielle Foré (danrabbit) wrote :

Marking as invalid for Switchboard since it isn't a daemon or anything that could cover this functionality.

Maybe this is a job for GSD or Pulseaudio. Not sure.

Changed in switchboard:
status: New → Invalid
Revision history for this message
Héctor Guillén Sánchez (hmaster-2) wrote :

Maybe you can add to sound menu, the selected audio output just as linux mint

Revision history for this message
Diego Calle (dnetix) wrote :

And also when the HDMI cable it's disconnected the PC stays silent, you need to go to sound configuration to select again the internal sound. Maybe if this could be automatic it would be awesome.

Revision history for this message
Richard Wonka (richard-wonka) wrote :

I currently find myself having to re-select HDMI sound output each time I start my computer.

It's really annoying.

could be less annoying if there was the option of selecting output device in the sound indicator menu.

Revision history for this message
fabiodan (fabiosantosart) wrote :

Not just switching to HDMI, switching back FROM hdmi is also important!

I had this problem where I thought Firefox was having sound issues. It's just that I had plugged my machine to the TV and switched to HDMI to play a video on firefox, and when I unplugged the cable, firefox simply stopped playing sound.

I tweeted about this issue. https://twitter.com/fabiosantosart/status/915562335443591168

The next day I plugged my HDMI cable and switched the sound output to HDMI, and played a video on chrome. When I unplugged HDMI I shut down my machine and when I turned it on sound never worked again.

The only thing that worked was installing pauvcontrol and selecting the default output for chrome and firefox again: https://askubuntu.com/a/822196

I agree with this bug being a bother (nobody would think to "set the sound output to my headphones" when connecting a jack cable to a laptop), I'm just saying that not switching back automatically causes even bigger issues. So don't ship a fix to this bug and automatically mute people's machines :D

Revision history for this message
John Levon (johnlevon) wrote :
Download full text (5.2 KiB)

Here is the pulseaudio debug I get when inserting my HDMI cable. It can be seen it's *trying* to switch over, but the lack of profile? is causing the issue.
4.15.0-54-generic kernel, Ubuntu 18.04, pulseaudio 1:11.1-1ubuntu7.2

An explicit 'pactl set-card-profile 0 output:hdmi-stereo-extra1' works. Some race issue with setup?

Jul 8 21:51:32 kent gsd-color[1762]: no xrandr-Samsung Electric Company-SAMSUNG-16780800 device found: Failed to find output xrandr-Samsung Electric Company-SAMSUNG-16780800
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] alsa-util.c: Monitor name in ELD info is 'SAMSUNG' (for device=7)
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] module-alsa-card.c: Jack 'HDMI/DP,pcm=7 Jack' is now plugged in
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] device-port.c: Setting port hdmi-output-1 to status yes
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] module-switch-on-port-available.c: Trying to switch to port hdmi-output-1
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] module-switch-on-port-available.c: Finding best profile for port hdmi-output-1, preferred = hdmi-stereo-extra1
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] module-switch-on-port-available.c: No suitable profile found
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1f.3 profile output:hdmi-stereo-extra1 to availability status unknown
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1f.3 profile output:hdmi-surround-extra1 to availability status unknown
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1f.3 profile output:hdmi-surround71-extra1 to availability status unknown
Jul 8 21:51:32 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.

Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] alsa-util.c: ELD info empty (for device=7)
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] module-alsa-card.c: Jack 'HDMI/DP,pcm=7 Jack' is now unplugged
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] device-port.c: Setting port hdmi-output-1 to status no
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1f.3 profile output:hdmi-stereo-extra1 to availability status no
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] card.c: Setting card alsa_card.pci-0000_00_1f.3 profile output:hdmi-surround-extra1 to availability status no
Jul 8 21:51:44 kent pulseaudio[6907]: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
Jul ...

Read more...

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.