mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

The X11 connection broke (error 4). Did the X11 server die? #194

Closed ignacio82 closed 4 years ago

ignacio82 commented 4 years ago

My app crashes when I try to maximize the window. Is there a way of fixing that?

mviereck commented 4 years ago

Can you provide some information, please? In general it is no problem to maximize a window.

Ideally you store ~/.cache/x11docker/x11docker.log at www.pastebin.com.

ignacio82 commented 4 years ago

Does this help? https://pastebin.com/YK4TNH1G

mviereck commented 4 years ago

Ok, now I can see some possible reasons for the issue we can check out.

You have closed source nvidia driver on host. That can be problematic with fallback option --hostdisplay. Also, you have nvidia-runtime on your system. You can try:

ignacio82 commented 4 years ago

They all crashed: https://pastebin.com/CMc5CAj7

mviereck commented 4 years ago

ok. The log file is for the start with --nxagent Some error messages:

qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
WARNING: Application calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported!  This is an application bug!
QSGContext::initialize: stencil buffer support missing, expect rendering errors
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 163, resource id: 209, major code: 129 (Unknown), minor code: 47
Received signal 11 SEGV_MAPERR 000000000000

The application calls GLX 1.3 although nxagent does not seem to support it. The message says this is an application bug.

But I would expect that this one works:

x11docker --hostdisplay --gpu --runtime=nvidia rstudioxhost:verse

Can you show me the log after running this command?

ignacio82 commented 4 years ago

https://pastebin.com/SjngHqpC

mviereck commented 4 years ago

That's odd. With --runtime=nvidia all drivers needed should be available in container. But instead, the application failes to load a software rendering driver (swrast) and does not even try to use the nvidia driver:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

Could you please install xserver-xephyr and try: x11docker --xephyr rstudioxhost:verse

ignacio82 commented 4 years ago

That kind of works but I have a huge almost empty window and a tiny window with my application without the option to change it size:

Screenshot from 2019-11-15 08-24-02

mviereck commented 4 years ago

Great! Some first progress. What window manager do you have on your host system? x11docker tries to automatically find one and should run in in Xephyr. You can also install a window manager, e.g. xfwm4 and run:

 x11docker --xephyr --wm=xfwm4 rstudioxhost:verse

Though, x11docker should auto-detect xfwm4, you would not need to specify it.

Another check with nxagent: You can try

x11docker --nxagent --xcomposite rstudioxhost:verse
ignacio82 commented 4 years ago

x11docker --nxagent --xcomposite rstudioxhost:verse did not work

This computer has cinnamon. I tried this:

$ x11docker --xephyr --wm=cinnamon rstudioxhost:verse

x11docker note: Did not find a host window manager. 
  Please pull image x11docker/openbox or provide one of: 
  amiwm blackbox cinnamon compiz ctwm enlightenment fluxbox flwm fvwm jwm kwin kwin_x11 lxsession mate-session mate-wm marco metacity notion olwm olvwm openbox ororobus pekwm sawfish twm wmaker w9wm xfwm4

x11docker note: Option --wm: Starting host window manager: cinnamon --sm-disable
mviereck commented 4 years ago

What happened after these messages?

If it somehow did not work correctly, please install e.g. window manager xfwm4 or marco and try with them.

mviereck commented 4 years ago

Closing due to inactivity.

Feel free to comment again, I am happy to reopen the ticket.