this post was submitted on 22 Feb 2025
39 points (100.0% liked)
KDE
5978 readers
28 users here now
KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.
Plasma 6 Bugs
If you encounter a bug, proceed to https://bugs.kde.org/, check whether it has been reported.
If it hasn't, report it yourself.
PLEASE THINK CAREFULLY BEFORE POSTING HERE.
Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This menu is for switching the device profile. Different programs can output audio to different devices, but a device can only have a single profile at a time active.
So, this menu can’t be flattened because the driver for the device doesn’t support outputting to both the speakers and the HDMI port at the same time. If the hardware supports it, this would have to be fixed in the driver, or at least ALSA or PipeWire. Plasma can’t do anything about this.
To clarify a little bit for OP: the same sound device is shared between the laptop's speakers, headphone jack and its video outputs like HDMI.
It's the same sound card but under a different profile to send the audio to the HDMI instead. Technically the same also happens but more automatically when you plug in wired headphone, it triggers a port switch. It's an either or situation: it can only do one at a time except on some chipsets. That used to be an interesting audio quirk back in the days: plug in headphones and it keeps playing through the laptop speakers.
Plasma only shows independent audio devices because it's not just a global audio device selector, you can also select individual apps to go to different audio devices, for example an external mixer and a dedicated music channel.
The thing is : I want my laptop to never have sound when using speakers, but always when connecting anything, e.g. Bluetooth or HDMI.
So, I mute
Built-in Audio Analog Stereo
, but I don't muteTurn It Up Wireless Speaker
: then, when I connect the latter, it has sound, but when I disconnect it, the former stays muted, therefore I never risking being surprised by sound.Except, when I need to use HDMI, I actually have to unmute
Built-in Audio Analog Stereo
becauseDigital Stereo (HDMI) Output
is considered to be the same item by Linux, therefore when I unplug it, it turns back toBuilt-in Audio Analog Stereo
but stays unmuted, which leaves me at risk of being surprised by sound.coppwr
Set up a dummy device whose input is a monitor of the HDMI out, and make the dummy device's output the headphones.
Used to use pactl for pulse, but coppwr makes pipe wire configs very visually accessible.
I understand what you're getting at, but I feel like that's doing a disservice to plasma. They absolutely can (software!) display what they want, but it would require a paradigm shift.
I've struggled with this sort of thing for many years. Multiple audio devices (switching between speakers/headphones/headset), complex input/output schemas (e.g. audio passthrough for a console mixed with the podcast on my PC, or from the endurance race on a Chromecast (obligatory "🖕 peacock") mixed with the game I'm playing on the PC), echo cancellation between various sources and the selected output, etc.
Audio management is complex, but I think OP is getting at one of the weaker points in "year of the Linux desktop" adoption.
I'm managing only because I've spent so much time figuring things out over nearly 20yrs of Linux use. My setup is currently a combination of plasma (I think the app is just "volume"), qpwgraph, and individual app settings.
The thing is : I want my laptop to never have sound when using speakers, but always when connecting anything, e.g. Bluetooth or HDMI.
So, I mute
Built-in Audio Analog Stereo
, but I don't muteTurn It Up Wireless Speaker
: then, when I connect the latter, it has sound, but when I disconnect it, the former stays muted, therefore I never risk being surprised by sound.Except, when I need to use HDMI, I actually have to unmute
Built-in Audio Analog Stereo
becauseDigital Stereo (HDMI) Output
is considered to be the same item by Linux, therefore when I unplug it, it turns back toBuilt-in Audio Analog Stereo
but stays unmuted, which leaves me at risk of being surprised by sound.Yeah, I can see how it would be confusing. Your internal sound "card" is managing several outputs (profiles) and settings are per device rather than profile.
I'm sure there's a way to detect the HDMI plug/unplug and script an action to un/mute the audio. If you're connected to the other external speaker, that action could be confused, so you'd have to account for that.
I'm not expert in that department, but udev is where I'd start.
Here's a link to someone trying to trigger action on HDMI events that could get you started down the right path: https://forums.raspberrypi.com/viewtopic.php?t=343614
It's possible it does work if you use the "Pro Audio" profile, but just isn't supported by the existing profiles for whatever reason.
That's kind of a nuclear option for a normal user, though, and there's no guarantee it will help.