-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autostart much delayed under wayland #460
Comments
There's a The condition that excludes Wayland is here: lxqt-session/lxqt-session/src/lxqtmodman.cpp Lines 404 to 405 in c630af9
I think it should be replaced by an appropriate condition under Wayland, but I don't know how. Anyway, you could check this by removing tray apps from the startup. EDIT: By "tray apps" I mean the startup items, for which "Wait for system tray" is checked: |
Actually, I think using of a blocking loop for finding the tray was a bad idea with X11 too. A blocking loop may be needed for finding the X11 WM, but the tray might be able to be found by checking every 5 seconds until 30 seconds are passed. |
Nope, 30 s is for waiting to start the WM. Starting/waiting for WM under wayland is not feasible. as with wayland the lxqt-session is started by compositor. Am I right? |
lxqt-session/lxqt-session/src/lxqtmodman.cpp Lines 122 to 140 in c630af9
|
Yes, this is the next 60 s wait for starting apps, which are requiring system tray in their .desktop files. |
I meant it — didn't pay attention to 60 (supposed it was 30). |
But the 30sec delay, which @stefonarch is talking here is caused by the waiting for window manager, not by waiting for systemtray. Please, what is the logic/architecture with wayland? Is the session compositor starting the lxqt-session or lxqt-session is starting the wayland session compositor? |
WM is already excluded from Wayland: lxqt-session/lxqt-session/src/lxqtmodman.cpp Lines 87 to 88 in c630af9
|
Apart from this issue — which, IMO, can be easily fixed — we have the above-mentioned problem: We need a more basic app to start a Wayland compositor-WM — a |
How about completely removing the native event filter logic -> https://github.com/lxqt/lxqt-session/tree/timers; and just check in timer based fashion. |
Actually I didn't measure the ~30sec, I checked shortly also another application with no tray icon which had the same delay. Looks like thunderbird is the exception. |
I tried this, under wayland no application in autostart starts anymore, maybe I'm missing something. Didn't check it under X11 though. Atm I set the timer to 3sec and it's perfect - if there is a panel(status notifier area). If it's started later some apps remain invisible which is logical. My guess is that the availability check under wayland has to be different as it's under X11; |
|
The simple question is: why do applications finish in the loop waiting for the systray if the panel is started by |
A lightweight app like FeatherNotes may be started before the tray is available; hence the loop. In November, Plasma-Wayland had a problem: its tray started too late after a cold boot, so that FeatherNotes couldn't always find it after 20 seconds. I don't know if the problem is fixed, but a 30 or 60-second loop is reasonable. Here, the problem is just that it's blocking, and the solution is a non-blocking loop. |
But it shoulḍ block if no tray is found, no? Here it blocks without reason. |
It can delay starting of tray apps until the systray is found but shouldn't block everything. The current code blocks everything because of tray.
The reason is that there's no systray at the moment lxqt-session/lxqt-session/src/lxqtmodman.cpp Line 419 in c630af9
The reason it isn't reached is that this condition above it is always satisfied under Wayland: lxqt-session/lxqt-session/src/lxqtmodman.cpp Lines 404 to 405 in c630af9
|
Thanks, now I see why it works fine if started by the compositor.
I wonder if such an app can do what no script can do afaik. Played around with |
Unlike X11, Wayland can never be running without compositing. This is the only thing I like about Wayland ;) |
So it would need some wayland code to do a different check? |
I debugged a bit in VM and made some fixes into that commit. @stefonarch can you, please, give it a try again? |
Under wayland tray apps do never start (except
|
Because it isn't a "tray app" in the above mentioned sense (see the screenshot of #460 (comment)). |
Based on the backtrace, you were still using the "old" commit, not the fixed one 2c34159. |
Ops, sorry you're right - pulled only master. |
W/o tray, lxqt-session will start the "need tray" autostart applications after 15s timeout anyway. |
If
lxqt-session
is started under wayland all applications that use the notification are starting with a delay of ~30sec, but also others like firefox. This is true also for lxqt-modules likelxqt-powermanagement
. This is very inconvenient as suddenly many windows open up at the same time after half a minute. For some reason this is true also for firefox.To avoid this behavior
lxqt-panel
orwaybar
can be started some seconds beforelxqt-session
itself in the compositors autostart settings.Expected Behavior
Autostart is fast
Current Behavior
It has huge delays for most apps if the notification area is not available.
Possible Solution
The check for systray available doesn't work under wayland?
mTrayStarted = QSystemTrayIcon::isSystemTrayAvailable();
But this doesn't explain the delay of firefox while thunderbird starts just fine. More investigating is needed.
I've tested this script - inserted in autostart - which starts all the "delayed" apps and it works with lxqt module
lxqt-panel
checked (started by the session).done
Context
Having lxqt-panel started outside of lxqt-session is not desirable, even if it works.
System Information
The text was updated successfully, but these errors were encountered: