XWayland applications mini freeze

GUI applications launched from a docker and through XWayland experience mini freezes. Passing the mouse over a menu and letting the application deploy that menu causes this issue. The application freezes for maximum 3 seconds then returns to normal. You deploy a new menu and the problem returns… The applications never crashed and alas, give no interesting log.

No problem with purely Wayland applications inside a docker.
No problem either with XWayland applications launched outside a docker.

Playing with the GDK_BACKEND, QT_QPA_PLATFORM, XDG_SESSION_TYPE variables inside the docker is enough to notice the problem or see it disappear.

I see this problem on both GTK3, Qt6 and SDL2 applications.
The host runs under Archlinux with amdgpu.

What other information could I give?

Do you really use Docker Desktop?

Note: it’s not “inside a docker” but “inside a container”. Docker is the application that runs containers

You’re right. I made a terminology error. Inside a container of course.

I also failed to clarify that my problem is the lack of a workaround for SDL applications. As for Qt and GTK I can play with the GDK_BACKEND and QT_QPA_PLATFORM variables respectively. But for SDL applications (to not mention games) SDL_VIDEODRIVER=wayland does not seem to be taken into account and mini freezes are indeed present.

Please, answer this question. I can’t answer yours, but people often ask in the Docker Desktop category just because they run Docker on Linux. the Desktop is very different, so we need to be sure how you installed Docker. Sharing how you create the container is also important. Without these it is very likely there will be no replies.

Oh sorry. Definitely I’m wrong everywhere.
I don’t use it. I suppose this topic could be close.

I moved the topic to the category of Docker Engine. We don’t need to close the topic, just provide enough details so people can help you :slight_smile:

1 Like

A observation maybe not so minor as that…

When I cause the problem (still by playing with the menus of an application launched from a container) my ENTIRE desktop freezes for 2 to 3 seconds. Including applications running outside the container.

Hard to blame Docker. My suspicion switches to kwin/plasma…

A year later, I bring the information that I no longer see this freeze problem. Unfortunately, I do not know the reason :frowning: I still had it a short while ago in a container of the time. And now, with a freshly created container, no more problem.
Sorry for not providing better explanations…
Maybe a mistake in the creation of my container…

A few people regularly ask about running GUI apps in Docker. It would be great if you could share your working setup, so others can use it, too.

First of all, my bad, the problem persists. I thought I had solved this problem. But wrong manipulation on my side… Sorry :tired_face: I will remove the tag “Solution”.
Bluepuma 77, you’re right and I probably should have started with that. Here are my commands :

Container creation :
docker create --name myarchlinux -it -e XDG_RUNTIME_DIR=/tmp -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY --user=$(id -u):$(id -g) -v /tmp/.X11-unix:/tmp/.X11-unix -eDISPLAY=$DISPLAY archlinux

X host autorisation + container starting :
xhost + && docker start myarchlinux

Login :
docker exec -it -u root myarchlinux /bin/bash

I will try to make a video.

I believe I’m having this same issue when I click on some button or hover to some menu that spawn a window/dialog.
My container setup pretty much the same as yours.

Host environment:
KDE Plasma Version: 6.5.2
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Graphics Platform: Wayland

I tested this by running Burpsuite inside the container using java -jar burpsuite.jar. When interacting with the top menu bar or buttons, the application experiences short, repeated freezes.

This brief freezes seem to occur under kde plasma.

I also tested this on wayland gnome desktop and there were no freezes there, I think this might be a kde plasma issue.