如何在 Linux 中启动多个无根 Xorg 实例?

如何在 Linux 中启动多个无根 Xorg 实例?

我正在尝试在不同的 tty 上启动 2 个 Xorg 实例。我想在 tty1 上运行 LXDE,分辨率为 1280x800,在 tty2 上的单独 Xorg 服务器上运行 minecraft,分辨率为 640x400。这样我就可以使用 Ctrl+Alt+F1 和 Ctrl+Alt+F2 在桌面(例如互联网浏览器)和 minecraft 之间切换。这将自动切换我的屏幕分辨率。我需要以较低的分辨率运行 minecraft 以获得更好的 FPS(差异非常明显)。编辑:此方法不适用于 minecraft,当它最小化或不显示 Xorg 时它会冻结
有一个问题:当我以 rootless 方式运行 Xorg 时,我一次只能运行一个。第二个 Xorg 失败Fatal server error: (EE) no screens found(EE)。在 ~/.local/share/xorg/Xorg.1.log 中有错误:(EE) intel(0): [drm] failed to set drm interface version: Permission denied [13].这是完整日志:

[ 12537.302] 
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[ 12537.303] Current Operating System: Linux localhost.localdomain 5.13.19_1 #1 SMP Sat Sep 18 18:18:26 UTC 2021 x86_64
[ 12537.304] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.13.19_1 root=UUID=fa09ee21-d0dd-4c1e-a1b9-da255b55b480 ro quiet tsc=unstable
[ 12537.306]  
[ 12537.306] Current version of pixman: 0.40.0
[ 12537.306]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[ 12537.307] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 12537.311] (==) Log file: "/home/user/.local/share/xorg/Xorg.1.log", Time: Thu Sep 29 19:12:38 2022
[ 12537.316] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 12537.316] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 12537.323] (==) No Layout section.  Using the first Screen section.
[ 12537.323] (==) No screen section available. Using defaults.
[ 12537.323] (**) |-->Screen "Default Screen Section" (0)
[ 12537.324] (**) |   |-->Monitor "<default monitor>"
[ 12537.324] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[ 12537.325] (==) Automatically adding devices
[ 12537.325] (==) Automatically enabling devices
[ 12537.325] (==) Automatically adding GPU devices
[ 12537.326] (==) Automatically binding GPU devices
[ 12537.326] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 12537.327] (WW) The directory "/usr/share/fonts/X11/OTF" does not exist.
[ 12537.327]    Entry deleted from font path.
[ 12537.329] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/TTF,
    /usr/share/fonts/X11/Type1,
    /usr/share/fonts/X11/100dpi,
    /usr/share/fonts/X11/75dpi
[ 12537.329] (==) ModulePath set to "/usr/lib64/xorg/modules"
[ 12537.329] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 12537.330] (II) Module ABI versions:
[ 12537.330]    X.Org ANSI C Emulation: 0.4
[ 12537.330]    X.Org Video Driver: 25.2
[ 12537.330]    X.Org XInput driver : 24.4
[ 12537.331]    X.Org Server Extension : 10.0
[ 12537.338] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 12537.338] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[ 12537.481] (--) PCI:*(0@0:2:0) 8086:2a42:17aa:3a02 rev 7, Mem @ 0xf4000000/4194304, 0xd0000000/268435456, I/O @ 0x00001800/8, BIOS @ 0x????????/131072
[ 12537.483] (--) PCI: (0@0:2:1) 8086:2a43:17aa:3a02 rev 7, Mem @ 0xf4400000/1048576
[ 12537.485] (II) Open ACPI successful (/var/run/acpid.socket)
[ 12537.485] (II) LoadModule: "glx"
[ 12537.488] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 12537.502] (II) Module glx: vendor="X.Org Foundation"
[ 12537.502]    compiled for 1.21.1.4, module version = 1.0.0
[ 12537.503]    ABI class: X.Org Server Extension, version 10.0
[ 12537.503] (==) Matched intel as autoconfigured driver 0
[ 12537.503] (==) Matched modesetting as autoconfigured driver 1
[ 12537.504] (==) Matched fbdev as autoconfigured driver 2
[ 12537.504] (==) Matched vesa as autoconfigured driver 3
[ 12537.504] (==) Assigned the driver to the xf86ConfigLayout
[ 12537.505] (II) LoadModule: "intel"
[ 12537.512] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[ 12537.516] (II) Module intel: vendor="X.Org Foundation"
[ 12537.516]    compiled for 1.21.1.3, module version = 2.99.917
[ 12537.517]    Module class: X.Org Video Driver
[ 12537.517]    ABI class: X.Org Video Driver, version 25.2
[ 12537.518] (II) LoadModule: "modesetting"
[ 12537.524] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[ 12537.533] (II) Module modesetting: vendor="X.Org Foundation"
[ 12537.533]    compiled for 1.21.1.4, module version = 1.21.1
[ 12537.534]    Module class: X.Org Video Driver
[ 12537.534]    ABI class: X.Org Video Driver, version 25.2
[ 12537.535] (II) LoadModule: "fbdev"
[ 12537.541] (II) Loading /usr/lib64/xorg/modules/drivers/fbdev_drv.so
[ 12537.543] (II) Module fbdev: vendor="X.Org Foundation"
[ 12537.543]    compiled for 1.21.1.3, module version = 0.5.0
[ 12537.544]    Module class: X.Org Video Driver
[ 12537.544]    ABI class: X.Org Video Driver, version 25.2
[ 12537.544] (II) LoadModule: "vesa"
[ 12537.551] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so
[ 12537.553] (II) Module vesa: vendor="X.Org Foundation"
[ 12537.553]    compiled for 1.21.1.3, module version = 2.5.0
[ 12537.554]    Module class: X.Org Video Driver
[ 12537.554]    ABI class: X.Org Video Driver, version 25.2
[ 12537.554] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 12537.568] (II) intel: Driver for Intel(R) HD Graphics
[ 12537.568] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 12537.569] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 12537.569] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 12537.570] (II) FBDEV: driver for framebuffer: fbdev
[ 12537.571] (II) VESA: driver for VESA chipsets: vesa
[ 12537.572] (++) using VT number 2

[ 12537.574] xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
[ 12537.576] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20201103
[ 12537.591] (WW) Falling back to old probe method for modesetting
[ 12537.592] (WW) Falling back to old probe method for fbdev
[ 12537.592] (II) Loading sub module "fbdevhw"
[ 12537.592] (II) LoadModule: "fbdevhw"
[ 12537.594] (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so
[ 12537.595] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 12537.596]    compiled for 1.21.1.4, module version = 0.0.2
[ 12537.596]    ABI class: X.Org Video Driver, version 25.2
[ 12537.597] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 12540.475] (EE) intel(0): [drm] failed to set drm interface version: Permission denied [13].
[ 12540.477] (EE) intel(0): Failed to claim DRM device.
[ 12540.477] (II) UnloadModule: "intel"
[ 12540.479] (EE) Screen(s) found, but none have a usable configuration.
[ 12540.479] (EE) 
Fatal server error:
[ 12540.481] (EE) no screens found(EE) 
[ 12540.484] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[ 12540.486] (EE) Please also check the log file at "/home/user/.local/share/xorg/Xorg.1.log" for additional information.
[ 12540.487] (EE) 
[ 12540.510] (EE) Server terminated with error (1). Closing log file.

其中和重复了很多次。这是完整 strace 的链接(太大了,无法在这里发布LC_ALL=C strace -ftt startxioctl(11, DRM_IOCTL_SET_VERSION, 0x7fff68944c20) = -1 EACCES (Permission denied)clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=1000000}, NULL) = 0https://drive.google.com/file/d/1B2Ck-C3S2n5KSGcgl50MY6UhG6PYw961/view?usp=sharing
我能否以某种方式在不授予 Xorg 根权限的情况下授予用户对失败的 set drm interface version 命令的权限?(例如将其添加到视频和输入组)
我的笔记本电脑是联想 G530,配备英特尔奔腾双核 T3400 1.0 至 2.16 GHz、英特尔 GM 45 集成显卡。我使用的是 Linux Void x86_64 glibc。
如果有人好奇:是的,我有一台更好的电脑,但让旧电脑正常工作对我来说很酷。

相关内容