Bug 427978

Summary: Unknown, non-working device shown in applet's popup with "Device name not found" text
Product: plasma-pa Reporter: Riccardo Robecchi <sephiroth_pk>
Component: appletAssignee: David Rosca <nowrep>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, nate, nicolas.fella, plasma-bugs
Priority: NOR Keywords: regression
Version: 5.20.0   
Target Milestone: ---   
Platform: Neon Packages   
OS: Linux   
Latest Commit: Version Fixed In: 5.20.4
Attachments: Applet screenshot
screenshot taken on neon unstable
pacmd info before disabling the output
pacmd info after disabling the output

Description Riccardo Robecchi 2020-10-19 13:33:09 UTC
Created attachment 132563 [details]
Applet screenshot

SUMMARY
After updating to Plasma 5.20 an unknown, non-working device is shown in the applet's popup. This device does not appear in the KCM.

STEPS TO REPRODUCE
1. Click on the plasma-pa applet on the panel

OBSERVED RESULT
A non-working, unknown device is shown with the "Device name not found" text.

EXPECTED RESULT
The mysterious device is not shown.

SOFTWARE/OS VERSIONS
Linux: KDE neon 5.20.0
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
This happens on both my desktop and my laptop, which have different audio devices connected and different PulseAudio configurations.
Comment 1 Patrick Silva 2020-10-19 17:02:32 UTC
Sometimes I see "Device name not found" in plasma-pa applet of neon unstable too.
In my case I think it is related to remote pulseaudio server that I use to stream audio, via local network, from my laptop to speakers connected to my desktop computer.
Comment 2 Riccardo Robecchi 2020-10-20 10:13:56 UTC
I just noticed that the bug seems to trigger if I disable an output. In my case, I have a USB DAC and the GPU's HDMI output; if I disable the latter, the unknown device shows up. It seems then like the device is not removed from the list of the applet and therefore appears like an unknown device.
Comment 3 Nate Graham 2020-10-21 02:56:44 UTC
lol weird
Comment 4 Patrick Silva 2020-10-21 12:59:31 UTC
Created attachment 132600 [details]
screenshot taken on neon unstable

(In reply to Patrick Silva from comment #1)
> Sometimes I see "Device name not found" in plasma-pa applet of neon unstable
> too.
> In my case I think it is related to remote pulseaudio server that I use to
> stream audio, via local network, from my laptop to speakers connected to my
> desktop computer.

I can reproduce with these steps:
1. start Plasma session on server machine
2. start Plasma session on client machine
3. suspend server machine to RAM

"Device name not found" appears in plasma-pa applet and I need to restart Plasma
session on client machine to get the correct remote pulseaudio output in plasma-pa applet again.
Comment 5 Nicolas Fella 2020-11-10 00:53:04 UTC
Can you attack `pacmd info` from before and after disabling the output?
Comment 6 Riccardo Robecchi 2020-11-15 11:13:25 UTC
Created attachment 133351 [details]
pacmd info before disabling the output
Comment 7 Riccardo Robecchi 2020-11-15 11:16:18 UTC
Created attachment 133352 [details]
pacmd info after disabling the output

Here are the outputs of the command before and after disabling the output. Let me know if you need anything else.
Comment 8 Bug Janitor Service 2020-11-23 21:08:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/30
Comment 9 Nicolas Fella 2020-11-24 18:29:31 UTC
Git commit 61f0698478ab39b81a79ee1359d531905174c018 by Nicolas Fella.
Committed on 24/11/2020 at 18:29.
Pushed by nicolasfella into branch 'master'.

Remove count property from PulseObjectFilterModel

PlasmaCore.SortFilterModel already has a count property that does what
we need.

For reasons that I don't fully understand this extra count property
confused the view in such a way that extra "empty" sink items were
visible in certain circumstances.

M  +0    -8    src/qml/PulseObjectFilterModel.qml

https://invent.kde.org/plasma/plasma-pa/commit/61f0698478ab39b81a79ee1359d531905174c018
Comment 10 Nicolas Fella 2020-11-24 18:31:41 UTC
Git commit 56bf58379fe507950a08240547710db5b6c7b8bf by Nicolas Fella.
Committed on 24/11/2020 at 18:30.
Pushed by nicolasfella into branch 'Plasma/5.20'.

Remove count property from PulseObjectFilterModel

PlasmaCore.SortFilterModel already has a count property that does what
we need.

For reasons that I don't fully understand this extra count property
confused the view in such a way that extra "empty" sink items were
visible in certain circumstances.
(cherry picked from commit 61f0698478ab39b81a79ee1359d531905174c018)

M  +0    -8    src/qml/PulseObjectFilterModel.qml

https://invent.kde.org/plasma/plasma-pa/commit/56bf58379fe507950a08240547710db5b6c7b8bf