Bug 508939 - 1 second delay when opening an app window that uses xwayland
Summary: 1 second delay when opening an app window that uses xwayland
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: xwayland (other bugs)
Version First Reported In: unspecified
Platform: EndeavourOS Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: efficiency-and-performance
Depends on:
Blocks:
 
Reported: 2025-08-30 14:38 UTC by Geno
Modified: 2025-09-25 17:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geno 2025-08-30 14:38:03 UTC
SUMMARY
Some apps take about a second to have their window appear, after instantly showing as launched and active in the "Task Manager" section of the plasma panel. This behaviour is consistent for the affected apps.

Launching the apps from a terminal and reproducing the behaviour does not show any errors. However, when reproducing the behaviour while running `journalctl -f` the following journal entry is consistently witnesses:
kwin_wayland[1325]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11

This happens consistently for the following apps:
    Discord [Flatpak] - restoring from tray
    Spotify [Flatpak] - restoring from tray
    Steam [pacman] - restoring from tray and opening any window, such as game properties

Some examples of apps that work correctly, and don't exhibit the behaviour:
    Dolphin, Kate, Krunner
    KeePassXC [pacman] - restoring from tray
    Firefox [pacman] - new window
    Vesktop [Flatpak] - restoring from tray

From what I gather, what the affected apps have in common is that they all run in xwayland.


App example 1 - Discord
STEPS TO REPRODUCE
0. Install a clean up-to-date OS with KDE Plasma, such as endeavourOS or cachyOS
1. Install discord: flatpak install flathub com.discordapp.Discord
2. Open discord, no need to log in
3. Close the discord window, so that it remains in the system tray
4. (optional) open a terminal window and run `journalctl -f` to see the yellow warning regarding KX11Extras::mapViewport
5. Left click on the discord icon in the system tray

OBSERVED RESULT
Apps using xwayland, such as discord, opening immediately in the "task manager" section of the panel, but takes about 1 second to actually make the window appear.

EXPECTED RESULT
Apps using xwayland showing immediately


App example 2 - Steam
STEPS TO REPRODUCE
0. Install a clean up-to-date OS with KDE Plasma, such as endeavourOS or cachyOS
1. Install steam, run steam and log into steam
2. (optional) open a terminal window and run `journalctl -f` to see the yellow warning regarding KX11Extras::mapViewport
3a. Close the steam window so that it remains in the system tray, then left click on the steam icon in the system tray
3b. Open any window inside steam, such as: friends & chat, steam settings, or game properties

OBSERVED RESULT
About 1 second delay when opening the main steam window from the system tray, or when opening a window from inside steam

EXPECTED RESULT
The main steam window or any windows opened inside steam appearing immediately without delay.


SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: EndeavourOS, 6.16.4-zen1-1-zen
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1