[Bug Report] System tray icon is invisible / transparent on KDE Plasma 6 (Wayland) with PyQt6

Aperta Adatta ai principianti
#1,667 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
linux, python

Direzione di ricerca

Inizia in opensnitch/service.py, in _setup_icons(), e verifica come vengono create e assegnate all’applicazione le icone dell’area di notifica. Avvia opensnitch-ui in una sessione KDE Plasma 6 Wayland per verificare che l’icona dell’area di notifica sia visibile e rimanga utilizzabile in tutti gli stati visualizzati; l’issue è completata quando l’area di notifica trasparente mostra l’icona prevista.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Describe the bug:

On KDE Plasma 6 running a native Wayland session, the opensnitch-ui system tray icon is completely invisible/transparent. The tray item area itself exists and is fully interactive (right-clicking the invisible spot opens the context menu normally), but the icon pixmap is never rendered on the panel.

Include the following information:

  • OpenSnitch version: 1.7.2
  • OS: CachyOS Linux
  • OS version: Rolling
  • Window Manager: KDE Plasma 6 (KWin Wayland)
  • Kernel version: 7.2.3-1-cachyos
  • Python / PyQt: Python 3.14 / PyQt6
To Reproduce:

Steps to reproduce the behavior:

  1. Log into a KDE Plasma 6 Wayland session on CachyOS.
  2. Launch opensnitch-ui.
  3. Look at the system tray panel.
  4. See error: The icon slot exists and can be clicked to display the context menu, but no visual icon is rendered (transparent space).
Post error logs:

No crash errors are logged. The GUI process runs with an active PID, but Qt Wayland fails to render a visible icon surface through the Plasma StatusNotifierItem D-Bus interface.

Expected behavior (optional):

The tray icon should be visually rendered on the KDE Plasma panel.

Screenshots:
Image
Additional context:

The issue originates in opensnitch/service.py under _setup_icons():

  1. Calling addPixmap(..., QtGui.QIcon.Normal, QtGui.QIcon.Off) defines only the inactive/off state. Under Plasma 6 (Wayland), the compositor queries the default representation via D-Bus; without it, it draws an empty surface.
  2. Passing .svg directly into QtGui.QPixmap() without using QIcon can result in a null pixmap depending on the Qt6 image format plugins available at runtime.

Tested Workaround / Fix:
Instantiating QtGui.QIcon directly with the .png paths immediately solves the problem:

def _setup_icons(self):
self.off_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-off.png"))
self.white_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-white.png"))
self.red_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-red.png"))
self.pause_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-pause.png"))
self.alert_icon = QtGui.QIcon(os.path.join(self._path, "res/icon-alert.png"))
self._app.setWindowIcon(self.white_icon)
if hasattr(self._app, "setDesktopFileName"):
self._app.setDesktopFileName(self.DESKTOP_FILENAME)

Lingua principale
Python
Stelle
14.3k
Fork
689
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di evilsocket/opensnitch

Tutte le issue di evilsocket/opensnitch

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.