After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709073 - Different icon in System Settings Sound pane
Different icon in System Settings Sound pane
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.12.x
Other Linux
: Low minor
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-30 09:02 UTC by Andreas Nilsson
Modified: 2017-12-15 16:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (35.97 KB, image/png)
2013-09-30 09:02 UTC, Andreas Nilsson
  Details
Same happens with Banshee (26.73 KB, image/png)
2015-02-19 21:09 UTC, Ankit
  Details
Fixes by setting pulse audio properties (1.60 KB, patch)
2017-08-26 22:12 UTC, Robert Greener
none Details | Review
Fixes by setting pulse audio properties (1.71 KB, patch)
2017-08-28 09:56 UTC, Robert Greener
none Details | Review
output of pacmd list-sink-inputs (1.17 KB, text/plain)
2017-08-29 06:55 UTC, Marinus Schraal
  Details

Description Andreas Nilsson 2013-09-30 09:02:12 UTC
Created attachment 256057 [details]
screenshot

The icon that gets used in the System Settings > Sound > Applications tab is different from the regular Music icon.
Comment 1 Allan Day 2014-04-22 19:27:53 UTC
Still present in 3.12. The settings panel should show the app icon.
Comment 2 Vadim Rutkovsky 2014-04-22 19:42:41 UTC
(In reply to comment #1)
> Still present in 3.12. The settings panel should show the app icon.
The issue seems obvious to me, though I have no idea how to fix it.

Allan, have you encountered a similar issue and/or fix in other projects?
Comment 3 Ankit 2015-02-19 21:09:22 UTC
Created attachment 297334 [details]
Same happens with Banshee

I believe it's a problem with Settings, because the same is happening with Banshee.
Comment 4 Allan Day 2016-01-06 13:16:35 UTC
Removing the available whiteboard - we're not really using it any more.
Comment 5 Marinus Schraal 2016-10-11 06:33:25 UTC
Might be a problem in control-center, but would be nice if someone could investigate.
Comment 6 Robert Greener 2017-08-26 22:12:07 UTC
Created attachment 358494 [details] [review]
Fixes by setting pulse audio properties

After some digging, it appears that this comes from the fact that gnome-music doesn't set the icon for pulse audio. To fix this I had to change the audio-sink from autoaudiosink to pulsesink, as you can't set the properties unless you do this.
Comment 7 Marinus Schraal 2017-08-28 07:12:45 UTC
(In reply to Robert Greener from comment #6)

Interesting, thanks for looking into this. The question then is, do we want to fix ourselves to only use pulseaudiosink?

Looking at eg. totem it uses autoaudiosink as well, but does display the correct icon. So there must be something more to this story.
Comment 8 Robert Greener 2017-08-28 07:33:51 UTC
(In reply to Marinus Schraal from comment #7)
> (In reply to Robert Greener from comment #6)
> 
> Interesting, thanks for looking into this. The question then is, do we want
> to fix ourselves to only use pulseaudiosink?
> 
> Looking at eg. totem it uses autoaudiosink as well, but does display the
> correct icon. So there must be something more to this story.

Gnome depends on pulse so it wouldn't be an issue but I'll check out totem and see if there is something to be learned
Comment 9 Robert Greener 2017-08-28 09:56:32 UTC
Created attachment 358578 [details] [review]
Fixes by setting pulse audio properties

Turns out that this can be fixed by just setting an environment variable, which I've done. This means that autoaudiosink can continue to be used
Comment 10 Marinus Schraal 2017-08-28 12:18:12 UTC
(In reply to Robert Greener from comment #9)
> Created attachment 358578 [details] [review] [review]
> Fixes by setting pulse audio properties
> 
> Turns out that this can be fixed by just setting an environment variable,
> which I've done. This means that autoaudiosink can continue to be used

Awesome, with your hints I stumbled upon this : https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/ .

Following that we should just set default_icon_name instead of icon_name in window.py and it should work.

While at it, we might as well set our media role to 'music' in a separate patch. I think I prefer using glib calls for that (GLib.setenv). Although that should probably be in the application.py init (can't really think of any other proper place)?

Would you be willing to supply the patches?
Comment 11 Robert Greener 2017-08-28 13:36:44 UTC
(In reply to Marinus Schraal from comment #10)

Changing from self.set_icon_name to self.set_default_icon_name does not seem to fix the issue, we could just set the environment variable in application.py for both the media role, and for the icon?
Comment 12 Marinus Schraal 2017-08-28 15:23:28 UTC
(In reply to Robert Greener from comment #11)
> Changing from self.set_icon_name to self.set_default_icon_name does not seem
> to fix the issue, we could just set the environment variable in
> application.py for both the media role, and for the icon?

Weird, I just checked and it does work for me. It sounds like the correct approach reading the docs.
Comment 13 Robert Greener 2017-08-28 16:09:06 UTC
(In reply to Marinus Schraal from comment #12)
> (In reply to Robert Greener from comment #11)
> > Changing from self.set_icon_name to self.set_default_icon_name does not seem
> > to fix the issue, we could just set the environment variable in
> > application.py for both the media role, and for the icon?
> 
> Weird, I just checked and it does work for me. It sounds like the correct
> approach reading the docs.

Weird, I tried running this command pacmd list-sink-inputs (output below), after changing self.set_icon_name('gnome-music') on line 80 of window.py to self.set_default_icon_name('gnome-music') and it hasn't changed the icon in control center. The command shows that gnome-music is missing an application.icon_name attribute. I don't know why it's not the same for us. What output do you get from pacmd list-sink-inputs

2 sink input(s) available.
    index: 92
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: CORKED
	sink: 1 <alsa_output.pci-0000_00_14.2.analog-stereo>
	volume: front-left: 65535 / 100% / -0.00 dB,   front-right: 65535 / 100% / -0.00 dB
	        balance 0.00
	muted: no
	current latency: 2015.06 ms
	requested latency: 980.00 ms
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 12
	client: 53 <Spotify>
	properties:
		media.role = "music"
		media.name = "Spotify"
		application.name = "Spotify"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "17955"
		application.process.user = "robert"
		application.process.host = "Robert-Arch"
		application.process.binary = "spotify"
		window.x11.display = ":1"
		application.language = "en_GB.UTF-8"
		application.process.machine_id = "121f95d677554b9da2285a691de7f0a8"
		application.process.session_id = "c3"
		application.icon_name = "spotify-client"
		module-stream-restore.id = "sink-input-by-media-role:music"
    index: 103
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 1 <alsa_output.pci-0000_00_14.2.analog-stereo>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 48.91 ms
	requested latency: 90.00 ms
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 12
	client: 62 <Music>
	properties:
		media.name = "'Nerve' by 'Don Broco'"
		application.name = "Music"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "3"
		application.process.user = "robert"
		application.process.host = "Robert-Arch"
		application.process.binary = "python3.5"
		application.language = "en_US.utf8"
		window.x11.display = ":99.0"
		application.process.machine_id = "Robert-Arch"
		module-stream-restore.id = "sink-input-by-application-name:Music"
		media.title = "Nerve"
		media.artist = "Don Broco"
Comment 14 Marinus Schraal 2017-08-29 06:55:41 UTC
Created attachment 358650 [details]
output of pacmd list-sink-inputs

What is your gtk+ & pa version?
Comment 15 Robert Greener 2017-08-29 09:01:37 UTC
Gtk 3.22.19
Pulseaudio 10.0.0
Comment 16 Marinus Schraal 2017-08-29 10:31:12 UTC
(In reply to Robert Greener from comment #15)
> Gtk 3.22.19
> Pulseaudio 10.0.0

Pretty much the same here. The thing is, if you set the environment var at the same point you do get the wanted result, which makes not a lot of sense if they essentially do pretty much the same thing. So it doesn't seem to be a problem in init order.
Comment 17 Marinus Schraal 2017-10-09 11:49:41 UTC
@Robert: Did you get a chance to test this with 3.26?
Comment 18 Marinus Schraal 2017-12-15 16:26:10 UTC
Going by my own experience this got fixed.