Bug 465996 - Audio Applet "Show virtual devices" broken for newly created applets after 5.27.0
Summary: Audio Applet "Show virtual devices" broken for newly created applets after 5....
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-02-18 12:28 UTC by stefanfunk1998
Modified: 2023-03-18 08:36 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.4


Attachments
How its supposed to look like (479.83 KB, image/png)
2023-02-18 12:28 UTC, stefanfunk1998
Details
How it actually looks like on my 2nd screen (358.13 KB, image/png)
2023-02-18 12:29 UTC, stefanfunk1998
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefanfunk1998 2023-02-18 12:28:37 UTC
Created attachment 156429 [details]
How its supposed to look like

SUMMARY
***
since the update to KDE Plasma 5.27, i had i to redo my panel on my second screen. here i noticed that the audio applet form the tray doesnt follow the checkmark for showing virtual devices, unlike my primary screen one
***


STEPS TO REPRODUCE
1. Set up panel with Tray on 2nd Screen
2. Open Audio Applet
3. Check the Setting "Show Virtual Devices"

OBSERVED RESULT
It doesn't show virtual devices

EXPECTED RESULT
It shows virtual devices, like on my primary screen

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: up-to-date Arch linux with KDE Plasma 5.27
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 stefanfunk1998 2023-02-18 12:29:06 UTC
Created attachment 156430 [details]
How it actually looks like on my 2nd screen
Comment 2 Tom Dzmelyk 2023-02-21 21:21:04 UTC
Chiming in with some testing I've done. This seems to affect any new plasma-pa widget instance added after updating to 5.27.0, and is not related to which screen the widget is on. Checking "Show virtual devices" has has no effect and the setting does not persist through a restart.

I'm not sure if this is a 5.27 regression or if it just surfaced in 5.27 as a side effect of the multi-monitor changes causing people to recreate desktop widgets on non-primary screens.
Comment 3 Tom Dzmelyk 2023-02-24 01:43:27 UTC
Reproduced this on Arch Linux plasma 5.27.1
Comment 4 Eduardo 2023-02-28 19:30:55 UTC
I noticed it when I created a brand new user on my machine. Virtual devices are not shown, regardless of the "Show virtual devices" checkbox state. Also, this checkbox state does not persist upon logoff/login: it always starts unchecked.

I looked into the commit history, and commit 586fb5c315d12a02f2a3e2a524a5b6bf39ba2b52 seems to be the one to blame, apparently it was migrating the applet settings into KCM, but looks like something slipped. This commit was released into 5.27, so yes, this is a 5.27 regression.

I reverted into using the old KMix, a downgrade in looks, but works for me while this doesn't get fixed.
Comment 5 Gordan Vrbanec 2023-03-04 14:42:10 UTC
Reproduced on KDE Plasma 5.27.2 on Arch linux.

The screen doesn't matter, it happens on my main screen.
I audio settings, i have all the devices, and JACK sink virtual device.

In the applet, if i click the checkmark for "show virtual devices", nothing happens, doesn't show any virtual device.
Furthermore, sometimes after resuming from sleep, all the devices were gone from the applet except HDMI, but were available in the settings and worked normally. The applet just didn't see them.
Lastly, every reset, the "show virtual devices" gets unchecked automatically.
Comment 6 almaplatass 2023-03-05 12:07:27 UTC
Had this same issue the past days after having a new Arch Linux installation. What I realized was that any new plasma-pa widget wouldn't show the virtual devices whatsoever, but the one from a latte panel I had imported from the previous Arch system worked.
Afer going through the config files (~/.config/plasma-org.kde.plasma.desktop-appletsrc & ~/.config/latte/Plasma.layout.latte) of both new and old panels, I figured out that the issue was with the widget not writing the "showVirtualDevices=true" flag to the file. After having it there and rebooting, the widget showed the virtual devices as expected.
Comment 7 Gordan Vrbanec 2023-03-05 13:33:01 UTC
(In reply to almaplatass from comment #6)
> Had this same issue the past days after having a new Arch Linux
> installation. What I realized was that any new plasma-pa widget wouldn't
> show the virtual devices whatsoever, but the one from a latte panel I had
> imported from the previous Arch system worked.
> Afer going through the config files
> (~/.config/plasma-org.kde.plasma.desktop-appletsrc &
> ~/.config/latte/Plasma.layout.latte) of both new and old panels, I figured
> out that the issue was with the widget not writing the
> "showVirtualDevices=true" flag to the file. After having it there and
> rebooting, the widget showed the virtual devices as expected.

I don't even have "showVirtualDevices" at all in the "plasma-org.kde.plasma.desktop-appletsrc" file. 
Under what line is it supposed to be? I want to try to add it and see if it fixes it.
Comment 8 almaplatass 2023-03-05 14:29:18 UTC
(In reply to Gordan Vrbanec from comment #7)
> I don't even have "showVirtualDevices" at all in the
> "plasma-org.kde.plasma.desktop-appletsrc" file. 
> Under what line is it supposed to be? I want to try to add it and see if it
> fixes it.

Search for "plugin=org.kde.plasma.volume", then add the line under [Configuration][General]. Mine looks like this: 

>[Containments][10][Applets][18]
>immutability=1
>plugin=org.kde.plasma.volume
>  
>[Containments][10][Applets][18][Configuration]
>PreloadWeight=80
> 
>[Containments][10][Applets][18][Configuration][General]
>migrated=true
>showVirtualDevices=true
Comment 9 Gordan Vrbanec 2023-03-05 19:02:21 UTC
(In reply to almaplatass from comment #8)
> (In reply to Gordan Vrbanec from comment #7)
> > I don't even have "showVirtualDevices" at all in the
> > "plasma-org.kde.plasma.desktop-appletsrc" file. 
> > Under what line is it supposed to be? I want to try to add it and see if it
> > fixes it.
> 
> Search for "plugin=org.kde.plasma.volume", then add the line under
> [Configuration][General]. Mine looks like this: 
> 
> >[Containments][10][Applets][18]
> >immutability=1
> >plugin=org.kde.plasma.volume
> >  
> >[Containments][10][Applets][18][Configuration]
> >PreloadWeight=80
> > 
> >[Containments][10][Applets][18][Configuration][General]
> >migrated=true
> >showVirtualDevices=true

Yup! That worked! :)

Seems that this line is either missing or set to "false" in the configuration for some reason.
Or that GUI checkmark is supposed to write that line but doesn't.
I restarted, and upon booting up, the virtual device was there, and i didn't even have to enable it, it was already checked.

Well, i guess we know what the problem is now.
Comment 10 Gordan Vrbanec 2023-03-14 21:48:46 UTC
Just an update - the workaround no longer works for me, the audio applet just won't show the virtual devices.
Comment 11 Synthetic451 2023-03-17 17:41:18 UTC
Seems like the issue is at the UI layer and toggling the "Show virtual devices" checkbox simply isn't calling the right method to properly trigger the settings change. Every time I toggle the setting I get this error message in journalctl:

> plasmashell[200793]: QMetaObject::invokeMethod: No such method QQuickItem_QML_717::actionTriggered(QVariant)

@Gordan Vrbanec
Workaround still seems to work for me. I had to restart plasmashell after the config change and now I see my HRTF 7.1 surround sink.
Comment 12 Fushan Wen 2023-03-18 08:36:20 UTC
Git commit 5430caf2483203de5f3047408582bec953aa8946 by Fushan Wen.
Committed on 18/03/2023 at 08:33.
Pushed by fusionfuture into branch 'master'.

applet: add missing function for "Show virtual devices" menu item
FIXED-IN: 5.27.4

M  +4    -0    applet/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-pa/commit/5430caf2483203de5f3047408582bec953aa8946
Comment 13 Fushan Wen 2023-03-18 08:36:53 UTC
Git commit 1e4d0d567a72d444dff1f90bb9c1712212d6e07e by Fushan Wen.
Committed on 18/03/2023 at 08:34.
Pushed by fusionfuture into branch 'Plasma/5.27'.

applet: add missing function for "Show virtual devices" menu item
FIXED-IN: 5.27.4
(cherry picked from commit 5430caf2483203de5f3047408582bec953aa8946)

M  +4    -0    applet/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-pa/commit/1e4d0d567a72d444dff1f90bb9c1712212d6e07e