Bug 512478

Summary: Task Manager volume scrolling introduces hard dependency on PulseAudio
Product: [Plasma] plasmashell Reporter: Jonathan Marten <jjm>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: kde, qydwhotmail
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=510668
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jonathan Marten 2025-11-22 16:43:47 UTC
SUMMARY

Commit https://invent.kde.org/plasma/plasma-desktop/-/commit/79d010f4 introduces a mouse wheel option to adjust the volume of the selected task.  This is a good idea, but it means that the task manager will not load at all unless plasma-pa is available (required by "import org.kde.plasma.private.volume as PlasmaPa" in MouseHandler.qml).  plasma-pa in turn cannot be built or used at runtime unless PulseAudio is available and in use.

STEPS TO REPRODUCE

1.  Build latest plasma-desktop on a system without PulseAudio.
2.  Log in.

OBSERVED RESULT

The task manager is displayed only as an icon with the message

/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:369:9: Type MouseHandler unavailable
/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/MouseHandler.qml:11:1: module "org.kde.plasma.private.volume" is not installed

EXPECTED RESULT

The task manager works as intended

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Gentoo 2.18
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.21.0
Qt Version: 6.9.3

ADDITIONAL INFORMATION

Editing /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/MouseHandler.qml and commenting out the code referring to "import org.kde.plasma.private.volume", "PlasmaPa.GlobalConfig", and the entire "if (Plasmoid.configuration.wheelEnabled === 3) {" block allows the task manager to function normally.
Comment 1 David Redondo 2025-11-24 08:37:23 UTC
Us introducing dependencies is not a bug.

FYI org.kde.plasma.private.volume was introduced in taskmanager a long a time ago
Comment 2 Jonathan Marten 2025-11-26 17:49:23 UTC
Yes, it is not a bug in the sense that it is working as designed, but functionality is now broken in certain use cases.  Before this implementation it was possible to run a Plasma session without PulseAudio - obviously the volume control applet would not work, but that is directly involved with sound output and so would be expected, and alternatives are available.  Suddenly, though, a setup which would previously have been working perfectly cannot even run a task manager, for reasons unconnected to task management.

IMHO the scrolling volume control implementation, although useful, should not be implemented directly in the task manager.  If configured, the task manager should detect the wheel event and broadcast a DBus signal giving a task ID, scroll amount and direction.  This could then be picked up by plasma-pa and actioned.  An alternative volume control could also catch the same DBus signal, which would allow volume scrolling from the task manager to be implemented on non-PulseAudio systems.
Comment 3 Kai Uwe Broulik 2025-12-02 14:15:53 UTC
Git commit da71f3098ca3839a658b25ffeefeafa3dad62c79 by Kai Uwe Broulik.
Committed on 02/12/2025 at 14:00.
Pushed by broulik into branch 'master'.

applets/taskmanager: Make plasma-pa fully optional again

Move GlobalConfig to the PulseAudio loader item so it
can fail gracefully.

M  +1    -6    applets/taskmanager/package/contents/ui/MouseHandler.qml
M  +2    -0    applets/taskmanager/package/contents/ui/PulseAudio.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/da71f3098ca3839a658b25ffeefeafa3dad62c79