Skip to content

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

Description

@mazzucoe

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions