Skip to content

SystemTray.get() blocks ~60 s on Pop OS 22.04 then falls back to GtkStatusIcon #232

@Nikola352

Description

@Nikola352

On Pop!_OS 22.04 (GNOME 42, x11), SystemTray.get() takes approximately 60 seconds to return. After the delay, the tray falls back to GtkStatusIcon.

If an SLF4J provider is on the classpath, the following error log can be seen:

ERROR SystemTray - GNOME shell detected, but UNKNOWN type. This should never happen. Falling back to GtkStatusIcon. Please create an issue with as many details as possible.

Environment

Dorkbox SystemTray Version 4.4
OS Pop!_OS 22.04 LTS x86_64
Kernel 6.17.4-76061704-generic
DE GNOME 42.9
WM Mutter (x11)
WM Theme Pop
JVM Amazon Corretto 21 (reproduced on others as well)
XDG_CURRENT_DESKTOP pop:GNOME
XDG_SESSION_TYPE x11
gnome-shell-extension-appindicator installed

Minimal reproduction

import dorkbox.systemTray.SystemTray;
                                                                                                                                               
public class Main {
    public static void main(String[] args) {                                                                                                   
        long t0 = System.currentTimeMillis();
        SystemTray tray = SystemTray.get();
        System.out.printf("SystemTray.get() returned in %d ms: %s%n",                                                                          
                System.currentTimeMillis() - t0,
                tray == null ? "null" : tray.getClass().getName());                                                                            
        if (tray != null) tray.shutdown();
    }                                                                                                                                          
}               

With SLF4J + Log4j on the classpath: prints the UNKNOWN type error, returns after ~60s.

Workaround

Calling libayatana-appindicator3 directly via JNA (bypassing Dorkbox detection) works correctly and initialises instantly on the same machine, confirming the library and extension are functional.

Expected behaviour

SystemTray.get() should detect the AppIndicator environment and return promptly, or at minimum not block for 60 seconds before falling back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions