Applications started via Autostart in Plasma 6 on Wayland are launched before the graphical session is fully ready. As a result, several applications crash at login with errors such as Failed to create wl_display or qt.qpa.xcb: could not connect to display. The systemd-user autostart units should wait for the Wayland session (or compositor availability) before execution to prevent these early-start failures. SUMMARY STEPS TO REPRODUCE 1. Install KDE Plasma with Wayland. 2. Add applications to autostart using .desktop files. 3. Log out and log back in, or reboot the system. OBSERVED RESULT Applications fail to start and crash with errors such as “Failed to create wl_display (No such file or directory)” or “qt.qpa.xcb: could not connect to display”. EXPECTED RESULT Autostarted applications should only launch after the Wayland session is fully initialized, allowing them to successfully connect to the display and start without errors or crashes. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 Kernel Version: 6.18.2-arch2-1 (64-bit) Graphics Platform: Wayland Hardware: Processors: 4 × Intel® Core™ i3-8100 CPU @ 3.60GHz Memory: 8 GiB RAM Graphics Processor: Intel® UHD Graphics 630 Storage device: SAMSUNG HD154UI 1,5 TB, 5400 RPM SATA2 ADDITIONAL INFORMATION I suspect this might be happening because of the slow storage device. I'm not sure which exact version it started in, but it was in November. As a workaround, I created a small script to delay the startup of the affected applications by a few seconds. This works because it ensures the Wayland display (wl_display) is available before the applications are launched. However, this is not a proper solution since Autostart should already wait for the session to be ready. Script: #!/bin/bash sleep 5 copyq --start-server & disown keepassxc & disown /home/lucas/scripts/easy.effects_in_background.sh & disown
>Autostarted applications should only launch after the Wayland session is fully initialized They do Please provide output of journalctl --user -b After a reboot without your workarounds.
Created attachment 188140 [details] Complete boot log (journalctl -b) showing autostart crashes. Aplications: keepassxc, copyq and easyeffects.
(In reply to David Edmundson from comment #1) > >Autostarted applications should only launch after the Wayland session is fully initialized > > They do > > Please provide output of journalctl --user -b > > After a reboot without your workarounds. journalctl --user -b is empty: No journal files were found. -- No entries -- However, journalctl -b I just does contain messages related to applications failing early due to missing Wayland display initialization. Since this might be relevant, I attached the full journalctl -b to the bug report.