Hi Everybody ;-), --- TL;DR: Could you please help me to get logs / trace or debug X (or KDE Plasma 5) that is freezing when I run (and actively use) X app inside LXC container? ---
I'm trying to run GUI apps inside LXC container. I know that there are other ways (snapd) but I really like the idea of LXC... I followed the following guide: https://gudok.xyz/lxcdeb/#_x11_applications_via_unix_socket since it is almost exactly mirrors my setup. My setup is: - Debian Buster with KDE Plasma 5 with LXC container running Debian 10, Debian 11 and Ubuntu 20.04 (I tested them all) - I have same user in the container (same username and UID) as outside the container with 1:1 UID mapping for this user. I also tried to run GUI apps as root inside the container. ----- lxc.idmap = u 0 100000 1000 lxc.idmap = g 0 100000 1000 lxc.idmap = u 1000 1000 1 lxc.idmap = g 1000 1000 1 lxc.idmap = u 1001 101001 64535 lxc.idmap = g 1001 101001 64535 lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none ro,bind,create=dir 0 0 lxc.environment = DISPLAY=:0 lxc.environment = XAUTHORITY=/home/my_user_name/.Xauthority # optional (works both with and without this): lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir lxc.mount.entry = /dev/video0 dev/video0 none bind,optional,create=file ----- I was pleasantly surprised that after following the guide I was able very quickly lunch GUI apps. The problem that I'm facing is that when I start using the app my desktop sometimes completely freeze for approx 30sec. I tested "retext", "meld" and "VSCodium" and a few other apps... It's all the same. I know that it's only GUI (not the Linux) that freezes. For example when I played video in VLC outside of the container and the freeze happened - the VLC window froze with rest of the screen but I still heard the audio. It usually takes 30sec and then the desktop unfreeze and everything is fine again. During the freeze I can see / move with mouse cursor and when I click on for example inactive window then the window becomes active after the freeze which tells me that the desktop responds but I can’t see the change during the freeze. I'm not asking anyone to debug this complicated setup since I understand that it's complicated. There are too many layers - Xorg, KDE Plasma, LXC and it's difficult to say what exactly is misbehaving. Can somebody please just tell me how to narrow down to app/configuration that is causing issues? I tried following: - Host: tail --follow /var/log/Xorg.0.log - Host: sudo journalctl --follow - Inside LXC cont.: journalctl --follow But I don't get anything interesting when/after the freeze happens. Thank you very much for any suggestions. JR