<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div style="font-family: Verdana;font-size: 12.0px;">
<div>Dear all,</div>
<div> </div>
<div>I am trying to run Xserver inside a priviledged LXC container with access to the hardware. Unfortunately I cannot get it to work. When I try to startx I get the following error:
<p><code>xf86OpenConsole: Switching VT failed</code></p>
<p>System is Intel Bay Trail with Intel HD 515 graphics, the container is Devuan Stable. LXC is version 2.1.1.</p>
<p>I am trying to run the entire x11 server inside the container with direct access to the hardware. I am aware that there is a solution to run the server on the host and only the apps in the container but that is not what I am looking for.</p>
<p>Any help would be really appreciated! Please help I am really stuck here…</p>
<p>Thank you,<br/>
Alex</p>
<p>config of the LXC container:</p>
<blockquote>
<p>lxc.cgroup.devices.allow = c 226:0 rwm<br/>
lxc.cgroup.devices.allow = c 4:0 rwm<br/>
lxc.cgroup.devices.allow = c 4:7 rwm<br/>
lxc.cgroup.devices.allow = c 4:8 rwm</p>
</blockquote>
<p>Script inside container:</p>
<blockquote>
<p>mknod -m 666 /dev/dri/card0 c 226 0<br/>
mknod -m 666 /dev/tty0 c 4 7<br/>
mknod -m 666 /dev/tty7 c 4 7<br/>
mknod -m 666 /dev/tty8 c 4 8</p>
</blockquote>
<p>Error message from Xorg</p>
<blockquote>
<p>[ 4733.780]<br/>
<a href="http://X.Org" target="_blank">X.Org</a> X Server 1.19.2<br/>
Release Date: 2017-03-02<br/>
[ 4733.781] X Protocol Version 11, Revision 0<br/>
[ 4733.781] Build Operating System: Linux 4.9.0-8-amd64 x86_64 Debian<br/>
[ 4733.781] Current Operating System: Linux desktop 4.14.95 <span class="hashtag">#0</span> SMP Wed Jan 30 12:21:02 2019 x86_64<br/>
[ 4733.781] Kernel command line: BOOT_IMAGE=/boot/vmlinuz root=PARTUUID=3bbf27a1-02 rootfstype=ext4 rootwait i915.modeset=0 acpi_enforce_resources=lax console=tty0 console=ttyS0,115200n8 noinitrd<br/>
[ 4733.781] Build Date: 03 November 2018 03:09:11AM<br/>
[ 4733.781] xorg-server 2:1.19.2-1+deb9u5 (<a href="https://www.debian.org/support" target="_blank">https://www.debian.org/support</a>)<br/>
[ 4733.781] Current version of pixman: 0.34.0<br/>
[ 4733.781] Before reporting problems, check <a href="http://wiki.x.org" target="_blank">http://wiki.x.org</a><br/>
to make sure that you have the latest version.<br/>
[ 4733.781] Markers: (–) probed, (<strong>) from config file, (==) default setting,<br/>
(++) from command line, (!!) notice, (II) informational,<br/>
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.<br/>
[ 4733.782] (==) Log file: “/var/log/Xorg.0.log”, Time: Sat May 25 18:16:33 2019<br/>
[ 4733.783] (==) Using system config directory “/usr/share/X11/xorg.conf.d”<br/>
[ 4733.783] (==) No Layout section. Using the first Screen section.<br/>
[ 4733.783] (==) No screen section available. Using defaults.<br/>
[ 4733.783] (</strong>) |–>Screen “Default Screen Section” (0)<br/>
[ 4733.783] (**) | |–>Monitor “”<br/>
[ 4733.784] (==) No monitor specified for screen “Default Screen Section”.<br/>
Using a default monitor configuration.<br/>
[ 4733.784] (==) Automatically adding devices<br/>
[ 4733.784] (==) Automatically enabling devices<br/>
[ 4733.784] (==) Automatically adding GPU devices<br/>
[ 4733.784] (==) Max clients allowed: 256, resource mask: 0x1fffff<br/>
[ 4733.784] (WW) The directory “/usr/share/fonts/X11/cyrillic” does not exist.<br/>
[ 4733.784] Entry deleted from font path.<br/>
[ 4733.784] (==) FontPath set to:<br/>
/usr/share/fonts/X11/misc,<br/>
/usr/share/fonts/X11/100dpi/:unscaled,<br/>
/usr/share/fonts/X11/75dpi/:unscaled,<br/>
/usr/share/fonts/X11/Type1,<br/>
/usr/share/fonts/X11/100dpi,<br/>
/usr/share/fonts/X11/75dpi,<br/>
built-ins<br/>
[ 4733.784] (==) ModulePath set to “/usr/lib/xorg/modules”<br/>
[ 4733.784] (II) The server relies on udev to provide the list of input devices.<br/>
If no devices become available, reconfigure udev or disable AutoAddDevices.<br/>
[ 4733.784] (II) Loader magic: 0x56489ee7ee00<br/>
[ 4733.784] (II) Module ABI versions:<br/>
[ 4733.784] <a href="http://X.Org" target="_blank">X.Org</a> ANSI C Emulation: 0.4<br/>
[ 4733.784] <a href="http://X.Org" target="_blank">X.Org</a> Video Driver: 23.0<br/>
[ 4733.784] <a href="http://X.Org" target="_blank">X.Org</a> XInput driver : 24.1<br/>
[ 4733.784] <a href="http://X.Org" target="_blank">X.Org</a> Server Extension : 10.0<br/>
[ 4733.787] (–) using VT number 2<br/>
[ 4733.787] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration<br/>
[ 4733.788] (II) xfree86: Adding drm device (/dev/dri/card0)<br/>
[ 4733.793] (–) PCI:*(0:0:2:0) 8086:0f31:1458:1000 rev 14, Mem @ 0xd0000000/4194304, 0xc0000000/268435456, I/O @ 0x0000f080/8, BIOS @ 0x???/131072<br/>
[ 4733.793] (II) LoadModule: “glx”<br/>
[ 4733.793] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so<br/>
[ 4733.797] (II) Module glx: vendor=“<a href="http://X.Org" target="_blank">X.Org</a> Foundation”<br/>
[ 4733.798] compiled for 1.19.2, module version = 1.0.0<br/>
[ 4733.798] ABI class: <a href="http://X.Org" target="_blank">X.Org</a> Server Extension, version 10.0<br/>
[ 4733.798] (==) Matched modesetting as autoconfigured driver 0<br/>
[ 4733.798] (==) Matched fbdev as autoconfigured driver 1<br/>
[ 4733.798] (==) Matched vesa as autoconfigured driver 2<br/>
[ 4733.798] (==) Assigned the driver to the xf86ConfigLayout<br/>
[ 4733.798] (II) LoadModule: “modesetting”<br/>
[ 4733.798] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so<br/>
[ 4733.799] (II) Module modesetting: vendor=“<a href="http://X.Org" target="_blank">X.Org</a> Foundation”<br/>
[ 4733.799] compiled for 1.19.2, module version = 1.19.2<br/>
[ 4733.799] Module class: <a href="http://X.Org" target="_blank">X.Org</a> Video Driver<br/>
[ 4733.799] ABI class: <a href="http://X.Org" target="_blank">X.Org</a> Video Driver, version 23.0<br/>
[ 4733.799] (II) LoadModule: “fbdev”<br/>
[ 4733.800] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so<br/>
[ 4733.800] (II) Module fbdev: vendor=“<a href="http://X.Org" target="_blank">X.Org</a> Foundation”<br/>
[ 4733.800] compiled for 1.19.0, module version = 0.4.4<br/>
[ 4733.800] Module class: <a href="http://X.Org" target="_blank">X.Org</a> Video Driver<br/>
[ 4733.800] ABI class: <a href="http://X.Org" target="_blank">X.Org</a> Video Driver, version 23.0<br/>
[ 4733.800] (II) LoadModule: “vesa”<br/>
[ 4733.801] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so<br/>
[ 4733.801] (II) Module vesa: vendor=“<a href="http://X.Org" target="_blank">X.Org</a> Foundation”<br/>
[ 4733.801] compiled for 1.19.0, module version = 2.3.4<br/>
[ 4733.801] Module class: <a href="http://X.Org" target="_blank">X.Org</a> Video Driver<br/>
[ 4733.801] ABI class: <a href="http://X.Org" target="_blank">X.Org</a> Video Driver, version 23.0<br/>
[ 4733.801] (II) modesetting: Driver for Modesetting Kernel Drivers: kms<br/>
[ 4733.801] (II) FBDEV: driver for framebuffer: fbdev<br/>
[ 4733.801] (II) VESA: driver for VESA chipsets: vesa<br/>
[ 4733.802] (WW) xf86OpenConsole: VT_GETSTATE failed: Inappropriate ioctl for device<br/>
[ 4733.802] (WW) xf86OpenConsole: VT_ACTIVATE failed: Inappropriate ioctl for device<br/>
[ 4733.802] (EE)<br/>
Fatal server error:<br/>
[ 4733.802] (EE) xf86OpenConsole: Switching VT failed<br/>
[ 4733.802] (EE)<br/>
[ 4733.802] (EE)<br/>
Please consult the The <a href="http://X.Org" target="_blank">X.Org</a> Foundation support<br/>
at <a href="http://wiki.x.org" target="_blank">http://wiki.x.org</a><br/>
for help.<br/>
[ 4733.802] (EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.<br/>
[ 4733.802] (EE)<br/>
[ 4733.803] (WW) xf86CloseConsole: KDSETMODE failed: Inappropriate ioctl for device<br/>
[ 4733.803] (WW) xf86CloseConsole: VT_GETMODE failed: Inappropriate ioctl for device<br/>
[ 4733.803] (EE) Server terminated with error (1). Closing log file.</p>
</blockquote>
</div>
</div></div></body></html>