GNOME Bugzilla – Bug 709073
Different icon in System Settings Sound pane
Last modified: 2017-12-15 16:26:10 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.
Still present in 3.12. The settings panel should show the app icon.
(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?
Created attachment 297334 [details] Same happens with Banshee I believe it's a problem with Settings, because the same is happening with Banshee.
Removing the available whiteboard - we're not really using it any more.
Might be a problem in control-center, but would be nice if someone could investigate.
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.
(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.
(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
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
(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?
(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?
(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.
(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"
Created attachment 358650 [details] output of pacmd list-sink-inputs What is your gtk+ & pa version?
Gtk 3.22.19 Pulseaudio 10.0.0
(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.
@Robert: Did you get a chance to test this with 3.26?
Going by my own experience this got fixed.