My system has 3 HDMI outputs, each with 3 speaker options. Thus, the drop-down menu becomes very long and it is hard to select the correct option (HDMI1 and HDMI3 are disconnected). See attached screenshots comparing kcm_pulseaudio against the cinnamon-settings UI. Reproducible: Always
Created attachment 100115 [details] KDE shows inactive outputs alongside the active ones
Created attachment 100116 [details] Cinnamon only shows connected sound outputs
Created attachment 100117 [details] Gnome control center similarly filters the unconnected outputs
The ui of kcm actually tries to offer same options as pavucontrol, not the ones that you mentioned.
kcm_pulseaudio uses a loop like this to fill-in the profiles drop-down: for (auto **it = info->profiles2; it && *it != nullptr; ++it) { Profile *profile = new Profile(this); profile->setInfo(*it); m_profiles.append(profile); if (info->active_profile2 == *it) { m_activeProfileIndex = m_profiles.length() - 1; } } I added some logging and found that checking (*it)->available is not enough to tell if a profile should be enabled. It seems that all profiles have available == 1. Next, I looked at the corresponding code in pavucontrol: for each profile, it looks at all the ports. If the profile appears in port.profiles, it checks if the port is in state PA_PORT_AVAILABLE_NO: for (std::set<pa_card_profile_info2>::iterator profileIt = profile_priorities.begin(); profileIt != profile_priorities.end(); ++profileIt) { bool hasNo = false, hasOther = false; std::map<Glib::ustring, PortInfo>::iterator portIt; Glib::ustring desc = profileIt->description; for (portIt = w->ports.begin(); portIt != w->ports.end(); portIt++) { PortInfo port = portIt->second; if (std::find(port.profiles.begin(), port.profiles.end(), profileIt->name) == port.profiles.end()) continue; if (port.available == PA_PORT_AVAILABLE_NO) hasNo = true; else { hasOther = true; break; } } if (hasNo && !hasOther) desc += _(" (unplugged)"); if (!profileIt->available) desc += _(" (unavailable)"); w->profiles.push_back(std::pair<Glib::ustring,Glib::ustring>(profileIt->name, desc)); } The "hasNo && !hasOther" thing is pretty confusing. I guess what they really meant is: "mark the profile as unplugged if all its ports are in state PA_PORT_AVAILABLE_NO". So we could do something similar in plasma-pa... I would prefer not to see the unplugged profiles at all in the list (like Gnome and Cinnamon do it). Grayed-out would also work, but it seems more clutter.
Still present in Plasma 5.10.0.
There's a patch for this: https://phabricator.kde.org/D10148
Git commit 1e644e5723df6d7e6ed2f4a6bf71dd694bb5aa97 by David Rosca. Committed on 10/02/2018 at 12:49. Pushed by drosca into branch 'master'. KCM: Show only available device profiles Differential Revision: https://phabricator.kde.org/D10148 M +6 -4 src/kcm/package/contents/ui/CardListItem.qml https://commits.kde.org/plasma-pa/1e644e5723df6d7e6ed2f4a6bf71dd694bb5aa97
Did the previous commit resolve this issue?
I'm still seeing see disconnected outputs in the drop-down list with plasma-pa 5.12.2. Looks like your commit isn't present on the 5.12 branch, could you please cherry-pick? Building from git is a bit hard for me at the moment.
It was committed to master, which means it'll wind up in 5.13. You can try it out with KDE Neon dev unstable, which has commits from master.