I am seriously sorry to raise this issue this late in the process. But its prompted by the recent release of Ubuntu 21.10. For some time now, the Lazarus SysTray has worked in two modes on Linux, either using the traditional SysTray or, added a few years ago, the AppIndicator model. Sensibly, we test for the existence of traditional system tray and default to it if it looks OK to do so.
On most current distributions, that test fails and they end up using the AppIndicator. Ubuntu and its derivatives has been an exception, the test says "Yep, I can do Traditional SysTray" and it does it, well, until now.
Sadly, the release of Ubuntu 21.10 has broken that pattern. It claim to be able to use the SysTray and while it displays the icon, the popup menu appears in what seems a random place. Its a Wayland issue IMHO.
I believe that the solution is to change the default, U2110 and most current distributions can do the AppIndicator fine and its probably time that happened. Some old installs will have trouble with that approach, I suggest there will be many, many times more U2110 (and derivatives) users than people using, for example, Ubuntu 16.04.
The AppIndicator model works fine for other major distributions I have tested, Fedora, SUSE, Debian.
The default decision, which ever it is, can be overridden by setting an env variable before starting a Lazarus app, eg LAZUSEAPPIND=YES (or NO, INFO).
So, my question is, should I rush a quick change to the default decision, choosing AppIndicators instead of traditional SysTray to try to get into Lazarus 2.2 or not ? It will involve no really new code, just a reversal of the decision about which path to choose first.
And, yes, I have logged a bug report with Launchpad, I did so several weeks ago when I saw this problem in a beta release. No response ....
Davo