我有以下内容Xorg.conf
:
Section "ServerFlags"
Option "AutoAddGPU" "false"
EndSection
我预计这会导致“未找到屏幕”错误,因为我已禁止 GPU 自动发现并且没有设备部分。相反,X 找到了我的 GPU 并通过 RandR 公开所有屏幕!
我还尝试添加Option "AutoAddDevices" "false"
,这可以正确禁用发现输入通过 udev 的设备(但正如预期的那样,没有采取任何措施来停止 GPU 发现)。
这是日志,我在几行有趣的内容前面加上了前缀####
:
[ 76704.301] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 76704.302]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 76704.302] Build Operating System: Linux Arch Linux
[ 76704.302] Current Operating System: Linux gallifrey 5.7.0-arch1-1 #1 SMP PREEMPT Mon, 01 Jun 2020 22:54:03 +0000 x86_64
[ 76704.302] Kernel command line: BOOT_IMAGE=/root/boot/vmlinuz-linux root=/dev/mapper/gfr_crypt rw rootflags=subvol=root rd.luks.name=62f43f28-4668-44da-ac39-788721ef82c7=gfr_crypt rd.luks.key=/var/keys/self.key rd.luks.options=discard loglevel=4
[ 76704.302] Build Date: 05 May 2020 05:08:17AM
[ 76704.302]
[ 76704.302] Current version of pixman: 0.40.0
[ 76704.302] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 76704.302] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 76704.302] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jun 8 13:49:10 2020
[ 76704.303] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 76704.303] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 76704.303] (==) No Layout section. Using the first Screen section.
[ 76704.303] (==) No screen section available. Using defaults.
[ 76704.303] (**) |-->Screen "Default Screen Section" (0)
[ 76704.303] (**) | |-->Monitor "<default monitor>"
[ 76704.303] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 76704.303] (**) Option "AutoAddDevices" "false"
[ 76704.303] (**) Option "AutoAddGPU" "false"
[ 76704.303] (**) Not automatically adding devices
[ 76704.303] (==) Automatically enabling devices
#### [ 76704.303] (**) Not automatically adding GPU devices
[ 76704.303] (==) Automatically binding GPU devices
[ 76704.303] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 76704.303] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 76704.303] Entry deleted from font path.
[ 76704.303] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 76704.303] Entry deleted from font path.
[ 76704.303] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[ 76704.303] Entry deleted from font path.
[ 76704.303] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[ 76704.303] Entry deleted from font path.
[ 76704.303] (==) FontPath set to:
/usr/share/fonts/TTF,
/usr/share/fonts/OTF
[ 76704.303] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 76704.303] (==) |-->Input Device "<default pointer>"
[ 76704.303] (==) |-->Input Device "<default keyboard>"
[ 76704.303] (==) No Layout section. Using the default mouse configuration.
[ 76704.303] (==) No Layout section. Using the default keyboard configuration.
[ 76704.303] (II) Module ABI versions:
[ 76704.303] X.Org ANSI C Emulation: 0.4
[ 76704.303] X.Org Video Driver: 24.1
[ 76704.303] X.Org XInput driver : 24.1
[ 76704.303] X.Org Server Extension : 10.0
[ 76704.304] (++) using VT number 1
[ 76704.305] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_314
#### [ 76704.305] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 76704.306] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 10 paused 0
[ 76704.308] (--) PCI:*(10@0:0:0) 1002:731f:1da2:e410 rev 193, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xfcb00000/524288, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
[ 76704.308] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 76704.308] (II) LoadModule: "glx"
[ 76704.308] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 76704.309] (II) Module glx: vendor="X.Org Foundation"
[ 76704.309] compiled for 1.20.8, module version = 1.0.0
[ 76704.309] ABI class: X.Org Server Extension, version 10.0
[ 76704.309] (II) Applying OutputClass "AMDgpu" to /dev/dri/card0
[ 76704.309] loading driver: amdgpu
[ 76704.309] (==) Matched amdgpu as autoconfigured driver 0
[ 76704.309] (==) Matched ati as autoconfigured driver 1
[ 76704.309] (==) Matched modesetting as autoconfigured driver 2
[ 76704.309] (==) Matched fbdev as autoconfigured driver 3
[ 76704.309] (==) Matched vesa as autoconfigured driver 4
[ 76704.309] (==) Assigned the driver to the xf86ConfigLayout
[ 76704.309] (II) LoadModule: "amdgpu"
[ 76704.309] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[ 76704.309] (II) Module amdgpu: vendor="X.Org Foundation"
[ 76704.309] compiled for 1.20.8, module version = 19.1.0
[ 76704.309] Module class: X.Org Video Driver
[ 76704.309] ABI class: X.Org Video Driver, version 24.1
[ 76704.309] (II) LoadModule: "ati"
[ 76704.309] (WW) Warning, couldn't open module ati
[ 76704.309] (EE) Failed to load module "ati" (module does not exist, 0)
[ 76704.309] (II) LoadModule: "modesetting"
[ 76704.309] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 76704.309] (II) Module modesetting: vendor="X.Org Foundation"
[ 76704.309] compiled for 1.20.8, module version = 1.20.8
[ 76704.309] Module class: X.Org Video Driver
[ 76704.309] ABI class: X.Org Video Driver, version 24.1
[ 76704.309] (II) LoadModule: "fbdev"
[ 76704.309] (WW) Warning, couldn't open module fbdev
[ 76704.309] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 76704.309] (II) LoadModule: "vesa"
[ 76704.309] (WW) Warning, couldn't open module vesa
[ 76704.309] (EE) Failed to load module "vesa" (module does not exist, 0)
[ 76704.309] (II) LoadModule: "mouse"
[ 76704.309] (WW) Warning, couldn't open module mouse
[ 76704.309] (EE) Failed to load module "mouse" (module does not exist, 0)
[ 76704.309] (II) LoadModule: "kbd"
[ 76704.309] (WW) Warning, couldn't open module kbd
[ 76704.309] (EE) Failed to load module "kbd" (module does not exist, 0)
[ 76704.309] (II) AMDGPU: Driver for AMD Radeon:
All GPUs supported by the amdgpu kernel driver
[ 76704.309] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 76704.310] (WW) Falling back to old probe method for modesetting
[ 76704.310] (II) AMDGPU(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 76704.310] (==) AMDGPU(0): Depth 24, (--) framebuffer bpp 32
[ 76704.310] (II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[ 76704.310] (==) AMDGPU(0): Default visual is TrueColor
[ 76704.310] (==) AMDGPU(0): RGB weight 888
[ 76704.310] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)
[ 76704.310] (--) AMDGPU(0): Chipset: "AMD Radeon RX 5700 XT" (ChipID = 0x731f)
[ 76704.310] (II) Loading sub module "fb"
[ 76704.310] (II) LoadModule: "fb"
[ 76704.310] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 76704.310] (II) Module fb: vendor="X.Org Foundation"
[ 76704.310] compiled for 1.20.8, module version = 1.0.0
[ 76704.310] ABI class: X.Org ANSI C Emulation, version 0.4
[ 76704.310] (II) Loading sub module "dri2"
[ 76704.310] (II) LoadModule: "dri2"
[ 76704.310] (II) Module "dri2" already built-in
[ 76704.348] (II) Loading sub module "glamoregl"
[ 76704.348] (II) LoadModule: "glamoregl"
[ 76704.348] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[ 76704.352] (II) Module glamoregl: vendor="X.Org Foundation"
[ 76704.352] compiled for 1.20.8, module version = 1.0.1
[ 76704.352] ABI class: X.Org ANSI C Emulation, version 0.4
[ 76704.360] (II) AMDGPU(0): glamor X acceleration enabled on AMD Radeon RX 5700 XT (NAVI10, DRM 3.37.0, 5.7.0-arch1-1, LLVM 10.0.0)
[ 76704.360] (II) AMDGPU(0): glamor detected, initialising EGL layer.
[ 76704.360] (==) AMDGPU(0): TearFree property default: auto
[ 76704.360] (==) AMDGPU(0): VariableRefresh: disabled
[ 76704.360] (II) AMDGPU(0): KMS Pageflipping: enabled
[ 76704.360] (II) AMDGPU(0): Output DisplayPort-0 has no monitor section
[ 76704.360] (II) AMDGPU(0): Output DisplayPort-1 has no monitor section
[ 76704.361] (II) AMDGPU(0): Output HDMI-A-0 has no monitor section
[ 76704.361] (II) AMDGPU(0): Output HDMI-A-1 has no monitor section
[ 76704.394] (II) AMDGPU(0): EDID for output DisplayPort-0
[ 76704.394] (II) AMDGPU(0): Manufacturer: DEL Model: a0b8 Serial#: 809588300
[ 76704.394] (II) AMDGPU(0): Year: 2019 Week: 2
[ 76704.394] (II) AMDGPU(0): EDID Version: 1.4
[ 76704.394] (II) AMDGPU(0): Digital Display Input
[ 76704.394] (II) AMDGPU(0): 8 bits per channel
[ 76704.394] (II) AMDGPU(0): Digital interface is DisplayPort
[ 76704.394] (II) AMDGPU(0): Max Image Size [cm]: horiz.: 52 vert.: 32
[ 76704.394] (II) AMDGPU(0): Gamma: 2.20
[ 76704.394] (II) AMDGPU(0): DPMS capabilities: Off
[ 76704.394] (II) AMDGPU(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 YCrCb 4:2:2
[ 76704.394] (II) AMDGPU(0): First detailed timing is preferred mode
[ 76704.394] (II) AMDGPU(0): Preferred mode is native pixel format and refresh rate
[ 76704.394] (II) AMDGPU(0): redX: 0.660 redY: 0.332 greenX: 0.302 greenY: 0.613
[ 76704.394] (II) AMDGPU(0): blueX: 0.150 blueY: 0.063 whiteX: 0.313 whiteY: 0.329
[ 76704.394] (II) AMDGPU(0): Supported established timings:
[ 76704.394] (II) AMDGPU(0): 720x400@70Hz
[ 76704.394] (II) AMDGPU(0): 640x480@60Hz
[ 76704.394] (II) AMDGPU(0): 640x480@75Hz
[ 76704.394] (II) AMDGPU(0): 800x600@60Hz
[ 76704.394] (II) AMDGPU(0): 800x600@75Hz
[ 76704.394] (II) AMDGPU(0): 1024x768@60Hz
[ 76704.394] (II) AMDGPU(0): 1024x768@75Hz
[ 76704.394] (II) AMDGPU(0): 1280x1024@75Hz
[ 76704.394] (II) AMDGPU(0): Manufacturer's mask: 0
[ 76704.394] (II) AMDGPU(0): Supported standard timings:
[ 76704.394] (II) AMDGPU(0): #0: hsize: 1152 vsize 864 refresh: 75 vid: 20337
[ 76704.394] (II) AMDGPU(0): #1: hsize: 1280 vsize 1024 refresh: 60 vid: 32897
[ 76704.394] (II) AMDGPU(0): #2: hsize: 1600 vsize 1200 refresh: 60 vid: 16553
[ 76704.394] (II) AMDGPU(0): #3: hsize: 1920 vsize 1080 refresh: 60 vid: 49361
[ 76704.394] (II) AMDGPU(0): #4: hsize: 1920 vsize 1200 refresh: 60 vid: 209
[ 76704.394] (II) AMDGPU(0): Supported detailed timing:
[ 76704.394] (II) AMDGPU(0): clock: 154.0 MHz Image Size: 518 x 324 mm
[ 76704.394] (II) AMDGPU(0): h_active: 1920 h_sync: 1968 h_sync_end 2000 h_blank_end 2080 h_border: 0
[ 76704.394] (II) AMDGPU(0): v_active: 1200 v_sync: 1203 v_sync_end 1209 v_blanking: 1235 v_border: 0
[ 76704.394] (II) AMDGPU(0): Serial No: 7MT0191C0AVL
[ 76704.394] (II) AMDGPU(0): Monitor name: DELL U2415
[ 76704.394] (II) AMDGPU(0): Ranges: V min: 49 V max: 61 Hz, H min: 30 H max: 83 kHz, PixClock max 175 MHz
... nothing interesting below here ...
所以,我的问题是:为什么 X 会发现 GPU 和屏幕?我该如何让它停止?
视频驱动程序是 AMDGPU。
我还尝试重新编译没有 udev 的 X,这(显然)会破坏输入设备发现,但不会影响视频设备的自动发现。
一些背景信息:
那么,我为什么想要这个呢?实际问题我试图解决的问题是,我正尝试使用 ZaphodHeads 扩展配置具有单个 GPU 的多座席。理论上,我应该能够配置 X 以仅捕获每个 X 服务器(以及用户空间 amdgpu 驱动程序)实例中的一个屏幕。但是,如果我只有一个带有其中一个 ZaphodHeads 的单个设备部分,则其余的“设备”会被发现和自动配置,并且第二个 X 服务器似乎无法捕获它们。为未使用的屏幕添加设备部分并Option "ignore" "true"
在其上使用确实会阻止 X 使用它们,但我怀疑设备部分具有某种锁定,因为每个 X 服务器都在其屏幕上工作,但在一个服务器已经运行后,其他服务器拒绝启动。
因此,我想完全禁止 X 发现图形设备,并且希望它使用只是我在设备部分配置了什么。