This forum has been archived. All content is frozen. Please use KDE Discuss instead.

HDMI sound device enabled even if cable disconnected

Tags: hdmi, audio hdmi, audio hdmi, audio
(comma "," separated)
User avatar
simgunz
Registered Member
Posts
56
Karma
0
OS
In System settings > Multimedia > Audio and Video I've set the priority of the HDMI sound device higher compare to the one of the internal notebook speakers device. In this way when I expect that when I connect the TV to the pc with the hdmi cable the audio is played from the tv and when the cable is disconnected the audio is played from the pc.

The problem is that the hdmi sound device is active (not greyed out) also if the hdmi cable is unplugged so that no audio comes from the pc speakers.

Because of this every time I connect the tv I need to go in the settings and change all the sound devices priorities there.

Is it there a way to solve this?

My sound card is:

00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller
User avatar
google01103
Manager
Posts
6668
Karma
25
AFAIK

don't think audio preferences work quite as you expect, think it's more which alternative when 1st not available

what you are looking to do is disable automatic audio output switching, assuming the following works you'll need to remember to re-enable it if you want automatic switching to the hdmi https://askubuntu.com/questions/228619/ ... ermanently
disable it by commenting out (#) the following line in your /etc/pulse/default.pa:
Code: Select all
 load-module module-switch-on-port-available

After the next restart of the pulseaudio server (e.g. with pulseaudio -k in a terminal) we should no longer switch to a different audio port when this becomes available (e.g. by plugging in your HDMI cable).


if you want to do something less permanent and use cmds this look approppriate https://unix.stackexchange.com/question ... -the-shell


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
simgunz
Registered Member
Posts
56
Karma
0
OS
I want to do exactly the opposite. I want automatic audio switching to HDMI when available, but with the configuration in the image: http://imagebin.ca/v/2XxDomApaG5q (HDMI has less priority than notebook speakers) this doesn't happen. To obtain audio via HDMI I need to raise the HDMI sound interface, but at this point KDE force the audio trough HDMI even if the cable is disconnected which result in no audio.

Basically it seems that KDE overrides the pulseaudio switching module.


Indeed I've found this bug:
https://bugs.kde.org/show_bug.cgi?id=351367

Basically the HDMI interface is available also if the cable is disconnected, and to switch the audio back to the speakers one needs to tinker with the settings every time because there is not a on the fly or automatic way to switch the output audio device.
User avatar
google01103
Manager
Posts
6668
Karma
25
sorry, misreading occasionally occurs before I have my coffee

try this https://forum.manjaro.org/index.php?PHP ... #msg230663
In /etc/pulse/default.pa find this line
Code: [Select]
### Should be after module-*-restore but before module-*-detect

and add this line
Code: [Select]
load-module module-switch-on-connect
after it.

Restart pulse and it should autoswitch now.


somethign a bit more complex http://jeffhoogland.blogspot.com/2014/0 ... o-out.html


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
simgunz
Registered Member
Posts
56
Karma
0
OS
I've tried to add that module to pulse audio but it doesn't work.

I give another example. in "Audio and Video" I've configureed the HDMI to high priority under Video and the Analog one to high priority under "Audio Playback".

Results:
HDMI not connected:
Audio play trough PC speakers for everything (Amarok, Chrome)
No audio for VLC and other Video applications

HDMI connected:
Audio play trough PC speakers for everything (Amarok, Chrome)
Audio play trough TV speakers (HDMI) for VLC and other Video applications

KDE is taking care of audio settings. How would pulseaudio load-module module-switch-on-connect should behave?
Should it switch everything to HDMI overriding the KDE settings?
Why do we need to tinker with pulseaudio? Shouldn't KDE taking care of this?

The main problem here is that KDE doesn't understand that the cable is disconnected and tries to send the audio trough HDMI also when it shouldn't.
User avatar
mauromol
Registered Member
Posts
8
Karma
0
OS
I have your exact same problem. I saw no improvement after upgrading from Linux Mint 17 (KDE 4.x) to Linux Mint 18 (Plasma 5.8.9).

KDE behaves correctly with a Bluetooth audio device (i.e.: it's greyed out when not connected, and hence it is skipped), but the HDMI output device is always enabled even when the HDMI cable is disconnected, so I have to manually change output priorities whenever I connect/disconnect the HDMI cable. Quite annoying...

Did you find a solution?
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
First of all: please do not hijack a thread that is 3 years old, Software evolves quite rapidly today.
Although judging from the Plasma versions you use, it might be the right place: current Plasma version is 5.16.5, and 5.17 is already out for testing. I strongly suggest you upgrade your system, I wouldn't be surprised if this was already solved since a while...


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
User avatar
mauromol
Registered Member
Posts
8
Karma
0
OS
Honestly, I don't understand this "hijacking" thing, I used this thread because it describes EXACTLY what happens in my case with an OS which is still currently supported nowadays. Using Google to search for this problem will bring you here, so I think THIS is the right place to talk about this problem, for anyone who has it, rather than opening another thread to talk about the exact same thing.

This said, we all know how Linux distributions work, so unless you can say that this problem is fixed in a later Plasma version, saying to upgrade it, just to see if it might be solved, is not really helpful, since there is no official Plasma >5.8.9 for Linux Mint 18 (or for Ubuntu 16.04, if you prefer), and building and installing it by yourself is not so straightforward... I may try a more recent live distribution of course, but in any case this is neither a solution nor a workaround.

I hope someone may help to understand at least whether this is "by design" or rather it sounds like a problem with our specific hardware (Intel Haswell HD Audio).

Thanks in advance,
Mauro
dagmann
Registered Member
Posts
12
Karma
0
mauromol wrote:Honestly, I don't understand this "hijacking" thing, I used this thread because it describes EXACTLY what happens in my case with an OS which is still currently supported nowadays. Using Google to search for this problem will bring you here, so I think THIS is the right place to talk about this problem, for anyone who has it, rather than opening another thread to talk about the exact same thing.

This said, we all know how Linux distributions work, so unless you can say that this problem is fixed in a later Plasma version, saying to upgrade it, just to see if it might be solved, is not really helpful, since there is no official Plasma >5.8.9 for Linux Mint 18 (or for Ubuntu 16.04, if you prefer), and building and installing it by yourself is not so straightforward... I may try a more recent live distribution of course, but in any case this is neither a solution nor a workaround.

I hope someone may help to understand at least whether this is "by design" or rather it sounds like a problem with our specific hardware (Intel Haswell HD Audio).

Thanks in advance,
Mauro



I agree!
hoboi
Registered Member
Posts
1
Karma
0
Split my HDMI connection and the separate AV cable is still ineffective. So is there any solution for this situation?


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]