yktoo / indicator-sound-switcher

Sound input/output selector indicator for Linux
https://yktoo.com/en/software/sound-switcher-indicator/
GNU General Public License v3.0
369 stars 29 forks source link

Black icon in tray at boot #91

Closed phdzor closed 1 year ago

phdzor commented 4 years ago

When i boot into my Arch Linux icon in tray is black but when i right click - Quit the app and manually start it icon is normal color:

image Image

yktoo commented 4 years ago

I can't really come up with any possible explanation except for that it's a bug in Arch Linux or the Ayatana/AppIndicator lib.

emersonrp commented 4 years ago

I'm having the same trouble, except quitting and restarting manually it still comes up black. This is with Manjaro Linux, which is Arch-adjacent, so might indeed be a bug in Arch. Will update if I figure anything out.

fabrizziosoares commented 4 years ago

In my case, I have no icon at all. The indicator looks like an empty space, it responds to my commands, but no icon is shown. I am using Linux Mint 20. It was OK until something updated. I tried to reboot; manually start, but nothing changed. I also started it with -vv option to see if some error show up in verbose mode, but I found nothing. I don't know if it is a bug in Cinamon theme, or if I broke something after installing. Is there any package I should reinstall to see if it fixes the problem?

yktoo commented 4 years ago

@fabrizziosoares Did you try to refresh icon cache as suggested here?

fabrizziosoares commented 4 years ago

Dear @yktoo I didn't try yet. Now I did and I still have the same problem. On important detail is that the icon appears on about box. It does not appear only on the tray.

densha commented 4 years ago

I have the same issue on Linux Mint 20 Cinnamon. I just noticed the issue in a recent update. This is what i see in the notification area: image I tried running the commands in the other thread but still not seeing the icon. Any troubleshooting suggestions?

fabrizziosoares commented 4 years ago

That's precisely the problem I am having. It looks like it happened after some update, but I don't know which one.

evert-mouw commented 3 years ago

I only get the black icon. It would be nice if a preference setting could override it. I'm on an updated Arch Linux with indicator-sound-switcher-2.3.4

(Using sound switch a lot -- thanks for creating and maintaining it!!!)

gnutix commented 3 years ago

Same issue as @fabrizziosoares (no icon at all in the system tray, which seems to be the same as https://github.com/yktoo/indicator-sound-switcher/issues/92 too ?) on Pop!_OS 20.10 (Ubuntu Groovy) with Cinnamon 4.6.7. Clearing the icon cache didn't help, nor did installing from various sources (snap, PPA+apt, .deb file).

Any ideas ? It's kind of nagging seeing this glitch all day long on a new system.. ;(

yktoo commented 3 years ago

I'm afraid these reports do not bring us any closer to the solution.

What I suspect is happening is that different distros / DEs handle icons a bit differently, which is further diversified by the use of themes.

I would recommend playing around with the icon files by copying them to various locations under /usr/share/icons/. Perhaps the problem is the SVG format so you might also try to fall back to using PNG.

Important: do not forget to refresh the icon cache after copying, otherwise the changes won't be detected by the system:

sudo update-icon-caches /usr/share/icons/*
yktoo commented 3 years ago

Closing until more information is available.

Frost4142 commented 2 years ago

There is no icon in the system tray

OS Ubuntu Studio kernel 5.11.0-41-low latency XFCE Sound Switcher Indicator version 2.3.6

Sound Switcher Indicator is installed via the repository The program is working. There is only an icon in the tray. More precisely, an empty space where the icon should be. I changed the icon themes without result. Maybe we need to put svg somewhere so that the program can see them?

yktoo commented 2 years ago

@Frost4142 try to move icons around as suggested above:

What I suspect is happening is that different distros / DEs handle icons a bit differently, which is further diversified by the use of themes.

I would recommend playing around with the icon files by copying them to various locations under /usr/share/icons/. Perhaps the problem is the SVG format so you might also try to fall back to using PNG.

Important: do not forget to refresh the icon cache after copying, otherwise the changes won't be detected by the system:

sudo update-icon-caches /usr/share/icons/*
Frost4142 commented 2 years ago

I have tried all of the above methods with no result. When you start the program manually, the tray icon appears for a second and disappears.

yktoo commented 2 years ago

@Frost4142 cannot reproduce it. Here's a vanilla Xubuntu 21.10 install: image

Frost4142 commented 2 years ago

https://disk.yandex.ru/d/wjntPcpO6MsQIg

Frost4142 commented 2 years ago

https://disk.yandex.ru/d/78dl0BzdYME-YQ

Frost4142 commented 2 years ago

https://disk.yandex.ru/d/rQ9RnVrGxdVudQ

Frost4142 commented 2 years ago

I solved the problem by installing the old version indicator-sound-switcher_2.2.2-1_all.deb

yktoo commented 2 years ago

Screenshots are good but I need to reproduce the problem in order to diagnose it. So far I failed to find a combination of OS and DE that would reproduce this behaviour.

yktoo commented 2 years ago

If I compare the latest version to 2.2.2, here are the differences in copied icons:

-    ('share/icons/ubuntu-mono-dark/status/22',  ['icons/ubuntu-mono-dark/indicator-sound-switcher.svg']),
-    ('share/icons/ubuntu-mono-light/status/22', ['icons/ubuntu-mono-light/indicator-sound-switcher.svg']),
-    ('share/icons/hicolor/22x22/status',        ['icons/default/indicator-sound-switcher.svg']),
-    ('share/icons/hicolor/scalable/status',     ['icons/default/indicator-sound-switcher.svg']),
+    ('share/icons/hicolor/scalable/status',     ['icons/indicator-sound-switcher-symbolic.svg']),
+    ('share/icons/hicolor/scalable/apps',       ['icons/indicator-sound-switcher.svg']),

This could give you a hint which locations do work for you and which don't.

It's also possible the SVG is displayed but is not rendered properly (e.g. fully transparent), especially because I switched to using symbolic icons. This can be checked by using a different, colourful SVG file.

Frost4142 commented 2 years ago

I will experiment more ! I will write how the result will be ! But it also works well with the old version ) https://yadi.sk/d/Mu7uv6DtU2EmOw https://yadi.sk/d/mIvNUPSJFzTJvw

Frost4142 commented 2 years ago

It seems to me that the problem is in the Ubuntu Studio distribution I installed indicator-sound-switcher in Mint 20.2 there were no problems

yktoo commented 2 years ago

I still can't reproduce it, using Ubuntu Studio 21.10. The icon appears OK in both KDE and XFCE sessions. image

Frost4142 commented 2 years ago

xfce+compiz+emerald maybe because of this ?

Frost4142 commented 2 years ago

https://disk.yandex.ru/d/Wa7IfPE9zEfnOQ

Frost4142 commented 2 years ago

Won ! Posted a png here /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher.png /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher-symbolic.png

yktoo commented 2 years ago

Looks good, I see that in stock Ubuntu symbolic icons are somewhat scattered between /usr/share/icons/hicolor/scalable/ and /usr/share/icons/hicolor/symbolic/.

The icon is totally black though, I wonder if it looks better if you only put an SVG icon into /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher-symbolic.svg (and remove all other icons)?

Frost4142 commented 2 years ago

Now in detail The black icon appeared when I turned on the SVG option in the composite manager in the /image upload section/ I have a similar problem I was with the Crow Translate program But everything was solved there simply in the settings there is a parameter where you can specify the user icon I looked at the DEB package where he unpacks his icons and, by analogy, placed the ISS icons in these directories , these ones worked paths /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher.png /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher-symbolic.png after sudo update-icon-caches /usr/share/icons/* A white icon lit up in the tray

https://yadi.sk/d/AqlqgJOSUq-DjA

Frost4142 commented 2 years ago

/usr/share/icons/hicolor/scalable/ and /usr/share/icons/hicolor/symbolic/. /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher-symbolic.svg (and remove all other icons)? I tried it the icon remained black

yktoo commented 2 years ago

Hmmm it's still not clear to me whether it can handle SVG, or I also need to ship a PNG.

@Frost4142 can you confirm that with SVG only (no PNG) the icon is still present?

(update) Reading your previous comment, I conclude that SVG does work, but you need to enable it in Compiz, is that right?

Frost4142 commented 2 years ago

The tray icon appeared when turned on in Compiz, but it was invisible /empty space or transparency I don't know / PNG worked all the same when I put it here by these routes

/usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher.png /usr/share/icons/hicolor/symbolic/apps/indicator-sound-switcher-symbolic.png

I can also add that somehow there were the same problems with the Viber program , then I downloaded the Viber installation in /opt, the icon began to display normally . I remembered about this when I was collecting qmmp, I changed empty_cover there, but what would it display it was necessary to reassemble the ari package to the assembly with the software parameters by default, it not only did not display empty_cover noramally , but stopped seeing plugins and the program icon also disappeared, I reassembled it in /opt based on from the aforementioned Viber , everything worked with a bang I do not know With what options packages are assembled in the Ubuntu Studio distribution , but it seems that there is a problem right here I will also try to assemble your program and see what happens and I will write to you

yktoo commented 2 years ago

I have just pushed version 2.3.7 of the app, with fallback PNG/SVG icons. Please give it a try and report back if the problem persists.

Frost4142 commented 2 years ago

Ok I will try to install this on a virtual machine for the purity of the experiment. Only a little later, now I'm just not busy with work. End of the year -)

Frost4142 commented 2 years ago

I still deleted 2.3.6 Cleaned up all the experiments And installed 2.3.7 Everything works

https://disk.yandex.ru/i/sdb6q_eW6MhJaQ

madhur commented 2 years ago

Same issue here on Cinnamon 4.6.7

mxmilkiib commented 2 years ago

Can the app be made to log, in -vv, the path it's getting the icon from? Black on black on Arch here. How is the app detecting a dark theme? I'm using Awesome WM. Can a settings menu radio button override be added? Thanks!

Edit; sorry, I realise now the aur entry for the app is currently two versions behind, I've flagged the entry for orphaning given its maintainer is awol.

yktoo commented 2 years ago

@mxmilkiib That'd be helpful indeed. Unfortunately, the app knows nothing of that, it's entirely handled by the GTK and the AppIndicator library. This is how it looks in practice:

self.ind = AppIndicator.Indicator.new(
    APP_ID,
    'indicator-sound-switcher-symbolic', # This is the icon
    AppIndicator.IndicatorCategory.HARDWARE)

But bumping the app version might help as I tried to address the issue lately.

mxmilkiib commented 2 years ago

This isn't fixed in 2.3.8. Can the issue be reopened please?

mxmilkiib commented 2 years ago

Can you just, like, please add a flag? :)

yktoo commented 2 years ago

Reopened, but I'm not sure what I can do to diagnose that. I still think the icon is searched by the system at a wrong location.

mxmilkiib commented 2 years ago

If I change the icon tray bg colour to red in the AwesomeWM theme configuration, it shows a black i-s-s icon, so the path can't be wrong, no? Using qt5ct configuration editor, if I change the icon theme to a non-dark one and apply, flameshot changes it's icon within a few seconds. Hmm, what's a good fully GTK based app with a theme respecting tray icon to test with?

yktoo commented 2 years ago

Okay, so the icon is found and rendered, but it isn't the right one for the current theme. The SSI is shipped with symbolic icons, so perhaps your WM doesn't support these?

mxmilkiib commented 2 years ago

There's only one SVG for your app, and it's light coloured. This is very confusing. I'm sure it's just the standard old school XEmbed method, and if there was a problem with this with the WM, it would have turned up already. However, my and some others configuration could be incorrect; maybe there is a foreground colour variable that is unset, but I try a lot of apps and I can't recall (with my admittedly bad memory) a situation like this previously, and I couldn't see anything directly appropriate when I went down the path of looking for issues with a similar setup with the same problem, but ran out of time yesterday, will get back around to that again at some point

mxmilkiib commented 2 years ago

Reading above again; how might I make the app fallback to using png for the tray icon?

yktoo commented 2 years ago

@mxmilkiib there's a regular SVG icon (indicator-sound-switcher.svg) and a symbolic one (indicator-sound-switcher-symbolic.svg), the latter is indeed light but that shouldn't matter as symbolic icons are recoloured by the DE to match the current theme (that's the whole point of using symbolic icons).

There's also a whole bunch of PNGs shipped with the SSI, and my best guess would be they have to be at a certain subdirectory under /usr/share/icons/ for the DE to pick them up. I'm afraid I cannot provide any more details as I'm not familiar with Awesome WM.

What's also worth keeping in mind is that the icons can be cached, so the changes in the filesystem won't immediately be picked up unless the cache is flushed.

mxmilkiib commented 1 year ago

Moving indicator-sound-switcher-symbolic.svg to indicator-sound-switcher-symbolic2.svg and trying to run gives this error icon;

image

yktoo commented 1 year ago

Okay, so the icon is picked up correctly. Which apparently means the SVG is rendered incorrectly by the system. To verify this you can swap it for another well-working SVG.

mxmilkiib commented 1 year ago

I used the qbt icon; the blue one in the tray is qbt itself, the dark circle is indicator-sound-switcher

image

yktoo commented 1 year ago

Did you also rename it to *-symbolic? Because otherwise it's just bizarre it's rendered this way.