Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run X11 server on Ubuntu Server Installtion? #517

Open
stsichler opened this issue Nov 12, 2023 · 3 comments
Open

Run X11 server on Ubuntu Server Installtion? #517

stsichler opened this issue Nov 12, 2023 · 3 comments

Comments

@stsichler
Copy link

Hi,
I'm trying to start an X11 server in a podman container on an Ubuntu 22.04.3 LTS Server installation (no X11) on my RasPi4b.
So I do not have any X11 related stuff on my host system. The device only shows TTY consoles on HDMI screen.
Can x11docker be used to start an isolated X11 server here or does it require a running X11 server on the host?

I've pulled the x11docker/xserver image and I'm starting x11docker with
x11docker -D --xc=podman --size=1280x720 --xorg --xonly
but I only get errors:

x11docker note: --xorg cannot claim a new virtual terminal (option --vt) with rootless X container (option --xc).
Please see also the full error log.

What can I do?

@echuber2
Copy link
Contributor

I'm not sure in your particular case, but it sounds like the error is happening because you're trying to use rootless podman as the backend, but this combination of options wants to do something that requires a rootful backend. Maybe try with --backend=podman --rootless=yes --xc=yes or try running directly from a tty.

@stsichler
Copy link
Author

It turned out that running sudo x11docker --debug --backend=podman --xc=podman --rootless=yes --xorg --desktop --vt=8 --gpu --network --xonly seems to be the right way.
But then, X11 cannot start because of error [(EE) no screens found(EE)].
I found out, that that can be fixed by adding --device /dev/fb0 to the podman run command.

After adding that to x11docker, the X11 server opens and I can see the black X-shaped cursor 👍 , but then it fails to add any input devices, see this verbose-log.txt.

Hm, looking through the log, it seems that adding /dev/fb0 should not be necessary at all, but there seems to also be a problem with DRI, indicated by the lines

(II) xfree86: Adding drm device (/dev/dri/card1)
(EE) /dev/dri/card1: failed to set DRM interface version 1.4: Function not implemented
(II) xfree86: Adding drm device (/dev/dri/card0)
(EE) /dev/dri/card0: failed to set DRM interface version 1.4: Function not implemented

Any ideas?

@echuber2
Copy link
Contributor

You're running with sudo, so do you really need rootless podman? I would try it with (rootful) docker in the most default way possible first, like the examples. You could try some of the other options like xephyr as well.

I should say that I haven't tried using this on a RPi or with Podman, and I'm not the maintainer of this project, so I can only guess. There are other errors and warnings in your log, for example:

_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
_XSERVTransmkdir: Mode of /tmp/.X11-unix should be set to 1777
_XSERVTransmkdir: this may cause subsequent errors

Also a few mentions of AppArmor. I don't know if the DRI issue is something related to your kernel drivers or a capabilities limitation. There are a few other things like this:

(II) FBDEV(0): FBIOBLANK: Function not implemented (Screen blanking not supported by kernel - disabling)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants