Rhythmbox controls and track info broken

Bug #1245495 reported by Ben Linsey-Bloom on 2013-10-28
32
This bug affects 8 people
Affects Status Importance Assigned to Milestone
The Sound Menu
Incomplete
High
Unassigned
indicator-sound (Ubuntu)
High
Xavi Garcia

Bug Description

A Rhythmbox section appears in the indicator menu as it should but there are several glitches:

When RB isn't running > click on the icon in the indicator > RB starts as expected :-)
When RB is running > click on the icon in the indicator > RB icon wiggles in launcher but window doesn't come to focus :-(

Track info and album art appears in notifications, but is never shown in the sound menu.

Regardless of whether RB is running:
Sound menu track controls (prev, play/pause, next) do nothing.
The play/pause button has a dotted orange ring, which turns to an orange square on mouseover (see screenshots).

Ubuntu 13.10 64-bit
unity: 7.1.2+13.10.20131014.1-0ubuntu1
indicator-sound: 12.10.2+13.10.20131011-0ubuntu1
rhythmbox: 2.99.1-0ubuntu1

Related branches

Ben Linsey-Bloom (ben-kitserve) wrote :
description: updated
Ben Linsey-Bloom (ben-kitserve) wrote :
Ben Linsey-Bloom (ben-kitserve) wrote :
description: updated
Lars Karlitski (larsu) wrote :

Hi Ben. Thanks for reporting these bugs.

The sound menu uses MPRIS to find out about and communicate with media players on the system. MPRIS doesn't support passing the timestamp of the click to the media player, which is needed for focus stealing prevention. We're trying to get it into the spec[1]. We used to have some hacks for gtk applications, which got lost in a recent refactor of indicator-sound.

Can you give more detail on the track info and album art problem? I can't reproduce it on my machine. Can you please attach the output of

  gdbus call --session --dest org.mpris.MediaPlayer2.rhythmbox --object-path /org/mpris/MediaPlayer2 --method org.freedesktop.DBus.Properties.GetAll 'org.mpris.MediaPlayer2.Player'

when this happens again?

[1] https://bugs.freedesktop.org/show_bug.cgi?id=62917

Changed in indicator-sound (Ubuntu):
importance: Undecided → High
status: New → Triaged
assignee: nobody → Lars Uebernickel (larsu)
Changed in indicator-sound:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Lars Uebernickel (larsu)
Lars Karlitski (larsu) wrote :

The last issue you mentioned (the orange square) is tracked in bug #1231796.

Ben Linsey-Bloom (ben-kitserve) wrote :

All of the problems I reported are continuous, they always happen as described and never function properly.

The translucent popup notifications are fine, they show track info and album art as expected. The problem with track info and album art is that it is _never_ displayed in the sound menu since installing 13.10.

Here is the output of the command that you asked for:
ben@xameroth:~$ gdbus call --session --dest org.mpris.MediaPlayer2.rhythmbox --object-path /org/mpris/MediaPlayer2 --method org.freedesktop.DBus.Properties.GetAll 'org.mpris.MediaPlayer2.Player'
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.rhythmbox was not provided by any .service files

Can I provide any more information for you?

Lars Karlitski (larsu) wrote :

It seems like Rhythmbox wasn't running while you executed that command. If it wasn't, could you please try again with Rhythmbox running?

Ben Linsey-Bloom (ben-kitserve) wrote :

I tried again while Rhytmbox was running but it gives the same output:

ben@xameroth:~$ gdbus call --session --dest org.mpris.MediaPlayer2.rhythmbox --object-path /org/mpris/MediaPlayer2 --method org.freedesktop.DBus.Properties.GetAll 'org.mpris.MediaPlayer2.Player'
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.rhythmbox was not provided by any .service files

ionash. (janusz-arch) wrote :

My problem is very similar, but notifications (translucent ones) doesn't shows, just like covers in Sound Menu.
https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/1283269

Output of #4 command:
janusz@ubuntu:~/Pulpit$ gdbus call --session --dest org.mpris.MediaPlayer2.rhythmbox --object-path /org/mpris/MediaPlayer2 --method org.freedesktop.DBus.Properties.GetAll 'org.mpris.MediaPlayer2.Player'
Błąd: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.rhythmbox was not provided by any .service files

Lars Karlitski (larsu) wrote :

Sorry for the late reply.

Your copies of Rhythmbox don't export the MPRIS dbus interface which is needed for the sound menu to discover and manipulate media players. Do you have the MPRIS plugin enabled?

Changed in indicator-sound:
status: Triaged → Incomplete
ionash. (janusz-arch) wrote :

Like I wrote in comment in https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/1283269, after reinstalling Rhythmbox, Rhythmbox plugins and packages related to Sound Indicator and notifications, everything works as expected. I can't tell, if earlier I had the MPRIS plugin enabled, or not - now is enabled.

M Oberhauser (zomtir) wrote :

MPRIS plugin needs to be enabled, just tested it.

Nontheless a strange behaviour that the functions are displayed though not available.

Lars Karlitski (larsu) wrote :

The problem is that MPRIS provides no way for the sound menu to find out when an application stops exporting player functionality. So if you've had the plugin enabled once, the sound menu will continue to display rhythmbox even after you've disabled the plugin again.

You can remove media players from the sound menu manually by modifying the com.canonical.indicator.sound interested-media-players gsettings key in dconf-editor.

M Oberhauser (zomtir) wrote :

I know a real patch would help more, but I don't know how to create one yet.

Adding a function to the MediaPlayer class in /src/media-player.vala:

+ public bool has_proxy () {
+ return (this.proxy != null)
+ }

Modifying the add_player function in /src/sound-menu.vala:

 var section = new Menu ();
 section.append_item (player_item);
- section.append_item (playback_item);
+ if (player.has_poxy())
+ section.append_item (playback_item);

From what I see this would require a restart of indicator-sound if the MPRIS gets re-enabled, but no sound items would be displayed if the proxy is absent.

M Oberhauser (zomtir) wrote :

Just noticed that the proxy may not be ready in time when the menu gets initialized. So this approach could break the default with MPRIS enabled anyway.

Doing the has_proxy check in update_playlists looks like an ugly hack, guess the bug is not worth the effort?

Rael Gugelmin Cunha (rael-gc) wrote :

Just to add: the rhythmbox-plugins package was not installed by default here too (14.04 beta 2). Only after I installed it, the back/play/next buttons in indicator-sound started to works.

Lars Karlitski (larsu) wrote :

zomtir, thanks for looking into this. However, we can't make this dependent on the proxy being available, as we want to allow starting recently-used players from the sound menu as well.

Nicolai Fröhlich (nifr) wrote :

I was affected by this bug, too.

The "rhythmbox-plugins" package was correctly installed by default with my Ubuntu 14.04 installation.

    rhythmbox:
      Installed: 3.0.2-0ubuntu2
    rhythmbox-plugins:
      Installed: 3.0.2-0ubuntu2

Going to "Tools" -> "Plugins ..." and enabling " MPRIS D-Bus Interface" ( restarting Rythmbox afterwards ) fixed the issue for me.

Xavi Garcia (xavi-garcia-mena) wrote :

I'm been working on the sound indicator for a few weeks running vivid in the desktop and I've never observed the described issue.

Taking into account that the bug was reported on 2013, I'm not sure if it should be tested by anybody from QA and confirm if it's fixed.

Sebastien Bacher (seb128) wrote :

is that still an issue for anyone on current versions?

Changed in indicator-sound (Ubuntu):
assignee: Lars Uebernickel (larsu) → nobody
Changed in indicator-sound:
assignee: Lars Uebernickel (larsu) → nobody
Changed in indicator-sound (Ubuntu):
status: Triaged → Incomplete
Kev Bowring (flocculant) wrote :

Just trying this in xenial.

gmusicbrowser works
Banshee works.
Rhythmbox doesn't.
clementine doesn't

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/1245495

tags: added: package-qa-testing
Xavi Garcia (xavi-garcia-mena) wrote :

I've been checking this and I can confirm the issue in xenial.

Clicking at the next/previous buttons does not send the expected dbus message, so something in the indicator might be wrong.
The play/pause button seems to be working fine, though.

In relation to having the focus in rhythmbox ... it depends on if the application was started by the indicator or by its own.
If the application is NOT started from the sound indicator then clicking on its name on the indicator does not focus the player.

Under investigation...

Changed in indicator-sound (Ubuntu):
assignee: nobody → Xavi Garcia (xavi-garcia-mena)
Xavi Garcia (xavi-garcia-mena) wrote :

I've created the following MP:
https://code.launchpad.net/~xavi-garcia-mena/indicator-sound/bug-1245495-playback-controls-with-playlist/+merge/283339

To fix the issue with the Next/Previous controls.

The problem was that, when the playlist was included in the player controls section, we were not updating the state of those buttons.

In relation to having the application on focus...
I saw that when starting the application from the sound indicator if the application is out of focus and you click the name of the application in the sound indicator...it comes to focus as expected.
If you launch the application by itself, it's out of focus and you click on its name in the indicator, then the icon wiggles in the launcher, but is does not come to focus.

Checking at the dbus messages, I see that the indicator is sending the right message (in fact the application is receiving it as its icon wiggles).

I've tested that with Banshee, GMusicBrowser and Rhythmbox... all 3 application have the same behavior.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-sound - 12.10.2+16.04.20160120-0ubuntu1

---------------
indicator-sound (12.10.2+16.04.20160120-0ubuntu1) xenial; urgency=medium

  [ Xavi Garcia Mena ]
  * Fixing the playback controls when we have the playlist as the last
    item in the player section. As number of items was 3 when having the
    playlist section we were not updating the player controls and the
    next/previous buttons were not working at all. (LP: #1245495)

 -- Xavi Garcia <email address hidden> Wed, 20 Jan 2016 17:31:39 +0000

Changed in indicator-sound (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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