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

[BUG] Duplicated icon in system tray/panel Linux Mint Cinnamon 20.3 #122

Closed aironsouza closed 1 year ago

aironsouza commented 2 years ago

Describe the bug Duplicated icon after reboot in system tray Cinnamon DE

To Reproduce Steps to reproduce the behavior:

  1. Install indicator-sound-switcher via PPA
  2. Reboot
  3. Notice the duplicated icon

Expected behavior Only 1 icon in "Applet XApp Status"

Screenshots Captura de tela de 2022-07-08 11-49-50

Captura de tela de 2022-07-08 11-50-31

As you can see, one of the icons is bigger, the other is the normal size. The smaller is attached to "Applet XApp Status", alongsize with the dropbox icon and cannot be moved individually. The bigger one can be moved (in the second screenshot I put it alongsize the normal apps icon on he panel to show the difference);

Desktop (please complete the following information):

Indicator config: There's no file ~/.config/indicator-sound-switcher.json in my installation.

Captura de tela de 2022-07-08 12-14-12

Indicator log:

$ indicator-sound-switcher -vv
INFO     Starting indicator application
INFO     Configuration file /home/airon/.config/indicator-sound-switcher.json not found, falling back to defaults
DEBUG    KeyboardManager.bind_keys()
DEBUG    .menu_append_item(): appending item `Entradas`
DEBUG    .menu_append_item(): appending separator
DEBUG    .menu_append_item(): appending item `Saídas`
DEBUG    .menu_append_item(): appending separator
DEBUG    .menu_append_item(): appending item `_Atualizar`
DEBUG    .menu_append_item(): appending item `_Preferências…`
DEBUG    .menu_append_item(): appending item `_Sobre`
DEBUG    .menu_append_item(): appending item `_Sair`
DEBUG    Trying to connect to PulseAudio daemon, attempt #1
INFO     Context connected
DEBUG      + Card[0] added: `alsa_card.usb-Sony_Interactive_Entertainment_Wireless_Headset-00`, driver: `module-alsa-card.c`
DEBUG        + Card profile added: `input:mono-fallback` (`Entrada de Mono`), 0 sinks, 1 sources, priority: 1
DEBUG        + Card profile added: `input:multichannel-input` (`Entrada de Multicanal`), 0 sinks, 1 sources, priority: 1
DEBUG        + Card profile added: `output:analog-stereo` (`Saída de Estéreo analógico`), 1 sinks, 0 sources, priority: 6500
DEBUG        + Card profile added: `output:analog-stereo+input:mono-fallback` (`Saída de Estéreo analógico + Entrada de Mono`), 1 sinks, 1 sources, priority: 6501 -- Active
DEBUG        + Card profile added: `output:analog-stereo+input:multichannel-input` (`Saída de Estéreo analógico + Entrada de Multicanal`), 1 sinks, 1 sources, priority: 6501
DEBUG        + Card profile added: `output:iec958-stereo` (`Saída de Estéreo digital (IEC958)`), 1 sinks, 0 sources, priority: 5500
DEBUG        + Card profile added: `output:iec958-stereo+input:mono-fallback` (`Saída de Estéreo digital (IEC958) + Entrada de Mono`), 1 sinks, 1 sources, priority: 5501
DEBUG        + Card profile added: `output:iec958-stereo+input:multichannel-input` (`Saída de Estéreo digital (IEC958) + Entrada de Multicanal`), 1 sinks, 1 sources, priority: 5501
DEBUG        + Card profile added: `off` (`Desligado`), 0 sinks, 0 sources, priority: 0
DEBUG        + Card port added: `analog-input-mic` (`Microfone`); priority: 8700; direction: 2; available: Yes
DEBUG          . Supported profile: `input:mono-fallback`
DEBUG          . Supported profile: `output:analog-stereo+input:mono-fallback`
DEBUG          . Supported profile: `output:iec958-stereo+input:mono-fallback`
DEBUG        + Card port added: `multichannel-input` (`Entrada multicanal`); priority: 0; direction: 2; available: Yes
DEBUG          . Supported profile: `input:multichannel-input`
DEBUG          . Supported profile: `output:analog-stereo+input:multichannel-input`
DEBUG          . Supported profile: `output:iec958-stereo+input:multichannel-input`
DEBUG        + Card port added: `analog-output` (`Saída analógica`); priority: 9900; direction: 1; available: Yes
DEBUG          . Supported profile: `output:analog-stereo`
DEBUG          . Supported profile: `output:analog-stereo+input:mono-fallback`
DEBUG          . Supported profile: `output:analog-stereo+input:multichannel-input`
DEBUG        + Card port added: `iec958-stereo-output` (`Saída digital (S/PDIF)`); priority: 0; direction: 1; available: Yes
DEBUG          . Supported profile: `output:iec958-stereo`
DEBUG          . Supported profile: `output:iec958-stereo+input:mono-fallback`
DEBUG          . Supported profile: `output:iec958-stereo+input:multichannel-input`
DEBUG    .menu_insert_ordered_item(): inserting item `    Wireless Headset ‣ Microfone` at index 1
DEBUG    .menu_insert_ordered_item(): inserting item `    Wireless Headset ‣ Entrada multicanal` at index 1
DEBUG    .menu_insert_ordered_item(): inserting item `    Wireless Headset ‣ Saída analógica` at index 5
DEBUG    .menu_insert_ordered_item(): inserting item `    Wireless Headset ‣ Saída digital (S/PDIF)` at index 6
DEBUG      + Card[1] added: `alsa_card.pci-0000_07_00.1`, driver: `module-alsa-card.c`
DEBUG        + Card profile added: `output:hdmi-stereo` (`Saída de Digital Stereo (HDMI)`), 1 sinks, 0 sources, priority: 38668 -- Active
DEBUG        + Card profile added: `output:hdmi-surround` (`Saída de Digital Surround 5.1 (HDMI)`), 1 sinks, 0 sources, priority: 33568
DEBUG        + Card profile added: `output:hdmi-surround71` (`Saída de Digital Surround 7.1 (HDMI)`), 1 sinks, 0 sources, priority: 33568
DEBUG        + Card profile added: `output:hdmi-stereo-extra1` (`Saída de Digital Stereo (HDMI 2)`), 1 sinks, 0 sources, priority: 5700
DEBUG        + Card profile added: `output:hdmi-surround-extra1` (`Saída de Digital Surround 5.1 (HDMI 2)`), 1 sinks, 0 sources, priority: 600
DEBUG        + Card profile added: `output:hdmi-surround71-extra1` (`Saída de Digital Surround 7.1 (HDMI 2)`), 1 sinks, 0 sources, priority: 600
DEBUG        + Card profile added: `output:hdmi-stereo-extra2` (`Saída de Digital Stereo (HDMI 3)`), 1 sinks, 0 sources, priority: 5700
DEBUG        + Card profile added: `output:hdmi-surround-extra2` (`Saída de Digital Surround 5.1 (HDMI 3)`), 1 sinks, 0 sources, priority: 600
DEBUG        + Card profile added: `output:hdmi-surround71-extra2` (`Saída de Digital Surround 7.1 (HDMI 3)`), 1 sinks, 0 sources, priority: 600
DEBUG        + Card profile added: `output:hdmi-stereo-extra3` (`Saída de Digital Stereo (HDMI 4)`), 1 sinks, 0 sources, priority: 5700
DEBUG        + Card profile added: `output:hdmi-surround-extra3` (`Saída de Digital Surround 5.1 (HDMI 4)`), 1 sinks, 0 sources, priority: 600
DEBUG        + Card profile added: `output:hdmi-surround71-extra3` (`Saída de Digital Surround 7.1 (HDMI 4)`), 1 sinks, 0 sources, priority: 600
DEBUG        + Card profile added: `off` (`Desligado`), 0 sinks, 0 sources, priority: 0
DEBUG        + Card port added: `hdmi-output-0` (`HDMI / DisplayPort`); priority: 5900; direction: 1; available: Yes
DEBUG          . Supported profile: `output:hdmi-stereo`
DEBUG          . Supported profile: `output:hdmi-surround`
DEBUG          . Supported profile: `output:hdmi-surround71`
DEBUG        + Card port added: `hdmi-output-1` (`HDMI / DisplayPort 2`); priority: 5800; direction: 1; available: No
DEBUG          . Supported profile: `output:hdmi-stereo-extra1`
DEBUG          . Supported profile: `output:hdmi-surround-extra1`
DEBUG          . Supported profile: `output:hdmi-surround71-extra1`
DEBUG        + Card port added: `hdmi-output-2` (`HDMI / DisplayPort 3`); priority: 5700; direction: 1; available: No
DEBUG          . Supported profile: `output:hdmi-stereo-extra2`
DEBUG          . Supported profile: `output:hdmi-surround-extra2`
DEBUG          . Supported profile: `output:hdmi-surround71-extra2`
DEBUG        + Card port added: `hdmi-output-3` (`HDMI / DisplayPort 4`); priority: 5600; direction: 1; available: No
DEBUG          . Supported profile: `output:hdmi-stereo-extra3`
DEBUG          . Supported profile: `output:hdmi-surround-extra3`
DEBUG          . Supported profile: `output:hdmi-surround71-extra3`
DEBUG    .menu_insert_ordered_item(): inserting item `    HD-Audio Generic ‣ HDMI / DisplayPort` at index 5
DEBUG    .menu_insert_ordered_item(): inserting item `    HD-Audio Generic ‣ HDMI / DisplayPort 2` at index 6 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    HD-Audio Generic ‣ HDMI / DisplayPort 3` at index 7 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    HD-Audio Generic ‣ HDMI / DisplayPort 4` at index 8 (hidden)
DEBUG      + Card[2] added: `alsa_card.pci-0000_07_00.6`, driver: `module-alsa-card.c`
DEBUG        + Card profile added: `input:analog-stereo` (`Entrada de Estéreo analógico`), 0 sinks, 1 sources, priority: 65
DEBUG        + Card profile added: `output:analog-stereo` (`Saída de Estéreo analógico`), 1 sinks, 0 sources, priority: 6500
DEBUG        + Card profile added: `output:analog-stereo+input:analog-stereo` (`Duplex estéreo analógico`), 1 sinks, 1 sources, priority: 6565
DEBUG        + Card profile added: `output:analog-surround-21` (`Saída de Surround analógico 2.1`), 1 sinks, 0 sources, priority: 1300
DEBUG        + Card profile added: `output:analog-surround-21+input:analog-stereo` (`Saída de Surround analógico 2.1 + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 1365
DEBUG        + Card profile added: `output:analog-surround-40` (`Saída de Surround analógico 4.0`), 1 sinks, 0 sources, priority: 1200
DEBUG        + Card profile added: `output:analog-surround-40+input:analog-stereo` (`Saída de Surround analógico 4.0 + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 1265
DEBUG        + Card profile added: `output:analog-surround-41` (`Saída de Surround analógico 4.1`), 1 sinks, 0 sources, priority: 1300
DEBUG        + Card profile added: `output:analog-surround-41+input:analog-stereo` (`Saída de Surround analógico 4.1 + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 1365
DEBUG        + Card profile added: `output:analog-surround-50` (`Saída de Surround analógico 5.0`), 1 sinks, 0 sources, priority: 1200
DEBUG        + Card profile added: `output:analog-surround-50+input:analog-stereo` (`Saída de Surround analógico 5.0 + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 1265
DEBUG        + Card profile added: `output:analog-surround-51` (`Saída de Surround analógico 5.1`), 1 sinks, 0 sources, priority: 1300
DEBUG        + Card profile added: `output:analog-surround-51+input:analog-stereo` (`Saída de Surround analógico 5.1 + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 1365
DEBUG        + Card profile added: `output:analog-surround-71` (`Saída de Analog Surround 7.1`), 1 sinks, 0 sources, priority: 1200
DEBUG        + Card profile added: `output:analog-surround-71+input:analog-stereo` (`Saída de Analog Surround 7.1 + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 1265
DEBUG        + Card profile added: `output:iec958-stereo` (`Saída de Estéreo digital (IEC958)`), 1 sinks, 0 sources, priority: 38268 -- Active
DEBUG        + Card profile added: `output:iec958-stereo+input:analog-stereo` (`Saída de Estéreo digital (IEC958) + Entrada de Estéreo analógico`), 1 sinks, 1 sources, priority: 5565
DEBUG        + Card profile added: `off` (`Desligado`), 0 sinks, 0 sources, priority: 0
DEBUG        + Card port added: `analog-input-front-mic` (`Microfone frontal`); priority: 8500; direction: 2; available: No
DEBUG          . Supported profile: `input:analog-stereo`
DEBUG          . Supported profile: `output:analog-stereo+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-21+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-40+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-41+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-50+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-51+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-71+input:analog-stereo`
DEBUG          . Supported profile: `output:iec958-stereo+input:analog-stereo`
DEBUG        + Card port added: `analog-input-rear-mic` (`Microfone posterior`); priority: 8200; direction: 2; available: No
DEBUG          . Supported profile: `input:analog-stereo`
DEBUG          . Supported profile: `output:analog-stereo+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-21+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-40+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-41+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-50+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-51+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-71+input:analog-stereo`
DEBUG          . Supported profile: `output:iec958-stereo+input:analog-stereo`
DEBUG        + Card port added: `analog-input-linein` (`Entrada de linha`); priority: 8100; direction: 2; available: No
DEBUG          . Supported profile: `input:analog-stereo`
DEBUG          . Supported profile: `output:analog-stereo+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-21+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-40+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-41+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-50+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-51+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-71+input:analog-stereo`
DEBUG          . Supported profile: `output:iec958-stereo+input:analog-stereo`
DEBUG        + Card port added: `analog-output-lineout` (`Saída de linha`); priority: 9000; direction: 1; available: No
DEBUG          . Supported profile: `output:analog-stereo`
DEBUG          . Supported profile: `output:analog-stereo+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-21`
DEBUG          . Supported profile: `output:analog-surround-21+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-40`
DEBUG          . Supported profile: `output:analog-surround-40+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-41`
DEBUG          . Supported profile: `output:analog-surround-41+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-50`
DEBUG          . Supported profile: `output:analog-surround-50+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-51`
DEBUG          . Supported profile: `output:analog-surround-51+input:analog-stereo`
DEBUG          . Supported profile: `output:analog-surround-71`
DEBUG          . Supported profile: `output:analog-surround-71+input:analog-stereo`
DEBUG        + Card port added: `analog-output-headphones` (`Fones de ouvido`); priority: 9900; direction: 1; available: No
DEBUG          . Supported profile: `output:analog-stereo`
DEBUG          . Supported profile: `output:analog-stereo+input:analog-stereo`
DEBUG        + Card port added: `iec958-stereo-output` (`Saída digital (S/PDIF)`); priority: 0; direction: 1; available: Yes
DEBUG          . Supported profile: `output:iec958-stereo`
DEBUG          . Supported profile: `output:iec958-stereo+input:analog-stereo`
DEBUG    .menu_insert_ordered_item(): inserting item `    Family 17h (Models 10h-1fh) HD Audio Controller ‣ Microfone frontal` at index 1 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    Family 17h (Models 10h-1fh) HD Audio Controller ‣ Microfone posterior` at index 2 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    Family 17h (Models 10h-1fh) HD Audio Controller ‣ Entrada de linha` at index 1 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    Family 17h (Models 10h-1fh) HD Audio Controller ‣ Saída de linha` at index 8 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    Family 17h (Models 10h-1fh) HD Audio Controller ‣ Fones de ouvido` at index 8 (hidden)
DEBUG    .menu_insert_ordered_item(): inserting item `    Family 17h (Models 10h-1fh) HD Audio Controller ‣ Saída digital (S/PDIF)` at index 10
DEBUG      + Source[1] added: `alsa_input.usb-Sony_Interactive_Entertainment_Wireless_Headset-00.mono-fallback`, card 0
DEBUG        + Source port added: `analog-input-mic` (`Microfone`); priority: 8700; available: Yes
DEBUG        * Activated source port `analog-input-mic`
DEBUG      + Sink[0] added: `alsa_output.usb-Sony_Interactive_Entertainment_Wireless_Headset-00.analog-stereo`, card 0
DEBUG        + Sink port added: `analog-output` (`Saída analógica`); priority: 9900; available: Yes
DEBUG        * Activated sink port `analog-output`
DEBUG      + Sink[1] added: `alsa_output.pci-0000_07_00.1.hdmi-stereo`, card 1
DEBUG        + Sink port added: `hdmi-output-0` (`HDMI / DisplayPort`); priority: 5900; available: Yes
DEBUG        * Activated sink port `hdmi-output-0`
DEBUG      + Sink[2] added: `alsa_output.pci-0000_07_00.6.iec958-stereo`, card 2
DEBUG        + Sink port added: `iec958-stereo-output` (`Saída digital (S/PDIF)`); priority: 0; available: Yes
DEBUG        * Activated sink port `iec958-stereo-output`
DEBUG    * Activated sink: `alsa_output.usb-Sony_Interactive_Entertainment_Wireless_Headset-00.analog-stereo`
DEBUG    * Activated source: `alsa_input.usb-Sony_Interactive_Entertainment_Wireless_Headset-00.mono-fallback`

Additional context Only modification I did from a normal installation was the kernel 5.15. The rest is untouched. After installation, indicator-sound-switcher seems to work properlly. Bug after reboot, the second icon appears. It's not possible to exclude it, and if I hit close, the whole program shut down.

Already tried reinstall, remove the PPA, etc. Not tried Snap nor .DEB.

yktoo commented 2 years ago

How many instances of the app are running? Check with

ps auxw | grep indicator-sound-switcher
aironsouza commented 2 years ago

That was quick, thanks.

ps auxw | grep indicator-sound-switcher
airon      27336  0.7  0.3 741616 56904 ?        Sl   12:24   0:00 /usr/bin/python3 /usr/bin/indicator-sound-switcher
airon      28689  0.0  0.0   9076  2592 pts/0    S+   12:24   0:00 grep --color=auto indicator-sound-switcher
yktoo commented 2 years ago

Well, then it must be a glitch in the tray icon lib (gir1.2-ayatanaappindicator3-0.1 or gir1.2-appindicator3-0.1). Which one (or both) do you have installed?

aironsouza commented 2 years ago

I don't know how to check this. I'm quite new to Linux, can you help me on this?

yktoo commented 2 years ago

Try

apt list --installed '*appindicator*'
aironsouza commented 2 years ago
gir1.2-appindicator3-0.1/focal,now 12.10.1+20.04.20200408.1-0ubuntu1 amd64 [instalado]
libappindicator3-1/focal,now 12.10.1+20.04.20200408.1-0ubuntu1 amd64 [instalado]
yktoo commented 2 years ago

You can try to replace libappindicator with the Ayatana lib

sudo apt remove gir1.2-appindicator3-0.1
sudo apt install gir1.2-ayatanaappindicator3-0.1

(In fact you can skip the first step, the removal of the libappindicator, because the app prefers ayatanaappindicator3 over it.)