MPRIS not working for snap applications (KDE - 24.04)

Bug #2066300 reported by Fabio Chino
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

The mpris protocol is not working on Ubuntu 24.04 under KDE. It appears to be related to the rights given to apparmour and dbus, just like in https://bugs.launchpad.net/snapd/+bug/2056696.

Those are the result of journalctl -f for this issue:

mai 17 16:03:51 machine dbus-daemon[3524]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="GetAll" name=":1.26" mask="receive" pid=44929 label="snap.spotify.spotify" peer_pid=3879 peer_label="plasmashell"
mai 17 16:03:51 machine dbus-daemon[3524]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="GetAll" name=":1.26" mask="receive" pid=44929 label="snap.spotify.spotify" peer_pid=3879 peer_label="plasmashell"
mai 17 16:03:51 machine kded5[3827]: Registering ":1.221/org/ayatana/NotificationItem/spotify_client" to system tray
mai 17 16:03:51 machine dbus-daemon[3524]: apparmor="DENIED" operation="dbus_signal" bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="PropertiesChanged" mask="send" name="org.freedesktop.DBus" pid=44929 label="snap.spotify.spotify" peer_pid=3879 peer_label="plasmashell"
mai 17 16:03:51 machine dbus-daemon[3524]: apparmor="DENIED" operation="dbus_signal" bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="PropertiesChanged" mask="send" name="org.freedesktop.DBus" pid=44929 label="snap.spotify.spotify" peer_pid=3879 peer_label="plasmashell"

As a result, KDE cannot detect that a player is present and, in case of Spotify, the tray icon is also missing (I had no time to investigate it further).

This bug also affect other media players from snap and Firefox while playing media. Players installed directly on the system, such as Clementine and KDE's own media player Juk, are not affected.

As a result, the media keys are not able to control those players as they are handled by the system and forwarded to the players via dbus.

Oddly enough, KDE's lock screen does detect the players and is able to control them.

I don't know if it is an issue with snapd as #2056696 or if it is something that must be changed on each player snap.

Thanks in advance!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.