| Summary: | System freezes for a few seconds when interacting with x11 app using xwayland inside a docker container | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | stellarix74 |
| Component: | core | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | major | ||
| Priority: | NOR | ||
| Version First Reported In: | 6.5.3 | ||
| Target Milestone: | --- | ||
| Platform: | CachyOS | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
kwin_wayland backtrace
wireshark |
||
|
Description
stellarix74
2025-11-21 11:59:01 UTC
Created attachment 187150 [details]
kwin_wayland backtrace
Created attachment 187151 [details] wireshark I did another test by running Thunar with x11 backend: `GDK_BACKEND=x11 thunar` I found that the host OS was trying to resolve the container’s hostname by sending DNS or LLMNR queries to the container (see attached image). As soon as I added the container’s hostname to the host’s /etc/hosts file, all freezes completely disappeared: ``` # Standard host addresses 127.0.0.1 xwayland localhost ``` If the freeze was caused by the host being unable to resolve the container, KDE should not be freezing because of that. So I’m not sure whether this issue is related to the KWin code here: https://invent.kde.org/plasma/kwin/-/blob/master/src/backends/drm/drm_commit_thread.cpp, or something caused by Docker, or NetworkManager. I tested this again but using Arch Linux as the host machine. I found that no freezes occur there, and systemd-resolved is disabled by default. Once I enable it, the freezes come back. CachyOS has systemd-resolved enabled, so my current workaround to get rid of these freezes is either to: - Add the Docker container hostname to the host machine’s /etc/hosts - Disable/stop systemd-resolved with `sudo systemctl stop systemd-resolved`, then stop these two sockets `systemd-resolved-monitor.socket, systemd-resolved-varlink.socket` I also noticed that the timing of the DNS query is roughly the same as the duration of the freezes. # systemd-resolved disabled (instant output): [arch ~]$ resolvectl query xwayland xwayland: resolve call failed: Could not activate remote peer 'org.freedesktop.resolve1': activation request failed: unknown unit # systemd-resolved enabled (~3-4s): [arch ~]$ resolvectl query xwayland xwayland: 'xwayland' not found Similar problems: https://discuss.linuxcontainers.org/t/running-xwayland-gui-application-on-top-of-host-desktop-environment-causes-kwin-wayland-drm-to-freeze-computer/24211/8 https://discuss.linuxcontainers.org/t/x11-freezes-for-a-few-seconds-in-lxd-container/10095/8 https://bugs.kde.org/show_bug.cgi?id=510290 |