Important: Please read the Qt Code of Conduct -

Qt systray icon fails to load, causing X to blink and spam error

  • Hi, this is my first post here and it is in regards to a qt5 base app that is a gui for connman internet manager. The author released this software on his github below

    I am hoping to help the author by asking this forum and hopefully someone can give a lead on where to look.

    When running the app ./cmst an error message saying QXcbWindow: Unhandled client message: "_NET_SYSTEM_TRAY_S0"
    Video of this error can be found

    If I run the app with the "-d" flag which disables the systray icon from showing, the app works fine and displays the Qt window.

    The author responded with "That information did help. I don't know for sure, but I have a theory. For QT the system tray implementation for X11 must be compliant. I've looked at the freedesktop specification and they define the following hints: _NET_WM_NAME, WM_CLASS, _NET_WM_ICON, _NET_SYSTEM_TRAY_ORIENTATION.
    I then went to site to see if they state anywhere that their tray is compliant. Didn't find an answer to that one way or the other, but I did look at the code for their system tray and on line 459 found this hint: _NET_SYSTEM_TRAY_S0. My theory is that the system tray may not be strictly compliant, or perhaps it expands upon the basic compliance and QT can't handle the expansion.
    I have revised the sources to check for a systemtray before we try to access it. I want to temporarily remove the tray from my system so I can test the new pieces. Once I've tested it it will be part of the package I'm planning to put out this weekend (actually on github now, but as I said, untested). I'm hoping that will let us work around the problem, but if QT recognizes the tray, thereby passing my check, but chokes trying to put an icon there I may have to fall back to another commandline switch that will force the program to not use a systemtray."

    This issue seems to only happen to me as the rest of the users of this app are running a DE. I am running only DWM as my WM and my github for DWM is at

    Other systray icons do work for me. Simplescreenrecorder, steam, clipit, dropbox, and caffeine.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Since this question is a going a bit low-level, I would recommend posting in on the interest mailing list (don't forget to subscribe first). You'll find there Qt's developers/maintainers (this forum is more user oriented)

  • Hi SGalst, thank you for the redirection. I wasn't sure to post in the threads from the beginning because as you pointed out, it is a low-level question. Much appreciated.

  • Lifetime Qt Champion

    You're welcome !

    There's nothing wrong posting low-level questions at all, they are just less likely to get answered.

    There's only a few (very few) Qt dev that are around here.

  • Lifetime Qt Champion

    By the way, if you find anything, please report it here, so other interested people can follow

Log in to reply