无法创建 Xorg.conf

无法创建 Xorg.conf

我打开终端并运行Xorg -configure,然后收到错误。

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 

(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

很明显,我需要在 X 服务器未运行时运行此命令,因此我遵循了中描述的解决方案无法创建 xorg.conf 文件并尝试了以下方法:

  • /etc/init.d/gdm3 stop要杀死 X,然后打开 tty 并运行Xorg -configure

  • 当 X 服务器运行时,我Xorg :2 -configure从另一台服务器运行命令。

这两种解决方案都会导致错误消息。

X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-165-generic x86_64 Ubuntu
Current Operating System: Linux atlantis 5.3.0-7648-generic #41~1586789791~19.10~9593806-Ubuntu SMP Mon Apr 13 17:50:40 UTC  x86_64
Kernel command line: initrd=\EFI\Pop_OS-03c4a8e3-3a5b-4231-8a9b-b15f59b18814\initrd.img root=UUID=03c4a8e3-3a5b-4231-8a9b-b15f59b18814 ro quiet loglevel=0 systemd.show_status=false splash
Build Date: 08 October 2019  09:43:30AM
xorg-server 2:1.20.5+git20191008-0ubuntu1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.38.4
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Apr 25 12:00:40 2020
List of video drivers:
    amdgpu
    ati
    intel
    nouveau
    qxl
    radeon
    vmware
    modesetting
    fbdev
    vesa
(++) Using config file: "/root/xorg.conf.new"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Number of created screens does not match number of detected devices.
  Configuration failed.
(EE) Server terminated with error (2). Closing log file.

以下是 的内容Xorg.0.log

[   929.794] 
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[   929.794] Build Operating System: Linux 4.4.0-165-generic x86_64 Ubuntu
[   929.794] Current Operating System: Linux atlantis 5.3.0-7648-generic #41~1586789791~19.10~9593806-Ubuntu SMP Mon Apr 13 17:50:40 UTC  x86_64
[   929.794] Kernel command line: initrd=\EFI\Pop_OS-03c4a8e3-3a5b-4231-8a9b-b15f59b18814\initrd.img root=UUID=03c4a8e3-3a5b-4231-8a9b-b15f59b18814 ro quiet loglevel=0 systemd.show_status=false splash
[   929.794] Build Date: 08 October 2019  09:43:30AM
[   929.794] xorg-server 2:1.20.5+git20191008-0ubuntu1 (For technical support please see http://www.ubuntu.com/support) 
[   929.794] Current version of pixman: 0.38.4
[   929.794]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   929.794] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   929.794] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Apr 25 12:00:40 2020
[   929.794] (II) Loader magic: 0x55e4f474a020
[   929.794] (II) Module ABI versions:
[   929.794]    X.Org ANSI C Emulation: 0.4
[   929.794]    X.Org Video Driver: 24.0
[   929.794]    X.Org XInput driver : 24.1
[   929.794]    X.Org Server Extension : 10.0
[   929.794] (--) using VT number 1

[   929.794] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[   929.795] (II) xfree86: Adding drm device (/dev/dri/card1)
[   929.795] (II) xfree86: Adding drm device (/dev/dri/card0)
[   929.795] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[   929.796] (--) PCI:*(0@0:2:0) 8086:3e9b:1025:1338 rev 0, Mem @ 0xa2000000/16777216, 0xb0000000/268435456, I/O @ 0x00006000/64, BIOS @ 0x????????/131072
[   929.796] (--) PCI: (1@0:0:0) 10de:1f91:1025:1336 rev 161, Mem @ 0xa3000000/16777216, 0x90000000/268435456, 0xa0000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/524288
[   929.796] List of video drivers:
[   929.796]    amdgpu
[   929.796]    ati
[   929.796]    intel
[   929.796]    nouveau
[   929.796]    qxl
[   929.796]    radeon
[   929.796]    vmware
[   929.796]    modesetting
[   929.796]    fbdev
[   929.796]    vesa
[   929.796] (II) LoadModule: "amdgpu"
[   929.797] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[   929.797] (II) Module amdgpu: vendor="X.Org Foundation"
[   929.797]    compiled for 1.20.5, module version = 19.0.1
[   929.797]    Module class: X.Org Video Driver
[   929.797]    ABI class: X.Org Video Driver, version 24.0
[   929.797] (II) LoadModule: "ati"
[   929.797] (II) Loading /usr/lib/xorg/modules/drivers/ati_drv.so
[   929.797] (II) Module ati: vendor="X.Org Foundation"
[   929.797]    compiled for 1.20.5, module version = 19.0.1
[   929.797]    Module class: X.Org Video Driver
[   929.797]    ABI class: X.Org Video Driver, version 24.0
[   929.797] (II) LoadModule: "intel"
[   929.797] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[   929.797] (II) Module intel: vendor="X.Org Foundation"
[   929.797]    compiled for 1.20.4, module version = 2.99.917
[   929.797]    Module class: X.Org Video Driver
[   929.797]    ABI class: X.Org Video Driver, version 24.0
[   929.797] (II) LoadModule: "nouveau"
[   929.797] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[   929.797] (II) Module nouveau: vendor="X.Org Foundation"
[   929.797]    compiled for 1.20.3, module version = 1.0.16
[   929.797]    Module class: X.Org Video Driver
[   929.797]    ABI class: X.Org Video Driver, version 24.0
[   929.797] (II) LoadModule: "qxl"
[   929.797] (II) Loading /usr/lib/xorg/modules/drivers/qxl_drv.so
[   929.797] (II) Module qxl: vendor="X.Org Foundation"
[   929.797]    compiled for 1.20.0, module version = 0.1.5
[   929.797]    Module class: X.Org Video Driver
[   929.797]    ABI class: X.Org Video Driver, version 24.0
[   929.797] (II) LoadModule: "radeon"
[   929.797] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[   929.797] (II) Module radeon: vendor="X.Org Foundation"
[   929.798]    compiled for 1.20.5, module version = 19.0.1
[   929.798]    Module class: X.Org Video Driver
[   929.798]    ABI class: X.Org Video Driver, version 24.0
[   929.798] (II) LoadModule: "vmware"
[   929.798] (II) Loading /usr/lib/xorg/modules/drivers/vmware_drv.so
[   929.827] (II) Module vmware: vendor="X.Org Foundation"
[   929.827]    compiled for 1.20.0, module version = 13.3.0
[   929.827]    Module class: X.Org Video Driver
[   929.827]    ABI class: X.Org Video Driver, version 24.0
[   929.827] (II) LoadModule: "modesetting"
[   929.827] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   929.827] (II) Module modesetting: vendor="X.Org Foundation"
[   929.827]    compiled for 1.20.5, module version = 1.20.5
[   929.827]    Module class: X.Org Video Driver
[   929.827]    ABI class: X.Org Video Driver, version 24.0
[   929.827] (II) LoadModule: "fbdev"
[   929.827] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   929.827] (II) Module fbdev: vendor="X.Org Foundation"
[   929.827]    compiled for 1.20.1, module version = 0.5.0
[   929.827]    Module class: X.Org Video Driver
[   929.827]    ABI class: X.Org Video Driver, version 24.0
[   929.827] (II) LoadModule: "vesa"
[   929.827] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[   929.827] (II) Module vesa: vendor="X.Org Foundation"
[   929.827]    compiled for 1.20.4, module version = 2.4.0
[   929.827]    Module class: X.Org Video Driver
[   929.827]    ABI class: X.Org Video Driver, version 24.0
[   929.827] (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
[   929.827] (II) intel: Driver for Intel(R) HD Graphics
[   929.827] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[   929.827] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[   929.827] (II) NOUVEAU driver Date:   Mon Jan 28 23:25:58 2019 -0500
[   929.827] (II) NOUVEAU driver for NVIDIA chipset families :
[   929.827]    RIVA TNT            (NV04)
[   929.827]    RIVA TNT2           (NV05)
[   929.827]    GeForce 256         (NV10)
[   929.827]    GeForce 2           (NV11, NV15)
[   929.827]    GeForce 4MX         (NV17, NV18)
[   929.827]    GeForce 3           (NV20)
[   929.827]    GeForce 4Ti         (NV25, NV28)
[   929.827]    GeForce FX          (NV3x)
[   929.827]    GeForce 6           (NV4x)
[   929.827]    GeForce 7           (G7x)
[   929.827]    GeForce 8           (G8x)
[   929.827]    GeForce 9           (G9x)
[   929.827]    GeForce GTX 2xx/3xx (GT2xx)
[   929.827]    GeForce GTX 4xx/5xx (GFxxx)
[   929.827]    GeForce GTX 6xx/7xx (GKxxx)
[   929.827]    GeForce GTX 9xx     (GMxxx)
[   929.827]    GeForce GTX 10xx    (GPxxx)
[   929.827] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   929.827] (II) FBDEV: driver for framebuffer: fbdev
[   929.827] (II) VESA: driver for VESA chipsets: vesa
[   929.930] (++) Using config file: "/root/xorg.conf.new"
[   929.930] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   929.931] (==) ServerLayout "X.org Configured"
[   929.931] (**) |-->Screen "Screen0" (0)
[   929.931] (**) |   |-->Monitor "Monitor0"
[   929.932] (**) |   |-->Device "Card0"
[   929.932] (**) |-->Screen "Screen1" (1)
[   929.932] (**) |   |-->Monitor "Monitor1"
[   929.933] (**) |   |-->Device "Card1"
[   929.933] (**) |-->Input Device "Mouse0"
[   929.933] (**) |-->Input Device "Keyboard0"
[   929.933] (==) Automatically adding devices
[   929.933] (==) Automatically enabling devices
[   929.933] (==) Automatically adding GPU devices
[   929.933] (==) Automatically binding GPU devices
[   929.933] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   929.933] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   929.933]    Entry deleted from font path.
[   929.933] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   929.934]    Entry deleted from font path.
[   929.934] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   929.934]    Entry deleted from font path.
[   929.934] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   929.934]    Entry deleted from font path.
[   929.934] (**) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins,
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[   929.934] (**) ModulePath set to "/usr/lib/xorg/modules"
[   929.934] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   929.934] (WW) Disabling Mouse0
[   929.934] (WW) Disabling Keyboard0
[   929.934] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20190619
[   929.934] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20190815-1 (Timo Aaltonen <[email protected]>)
[   929.934] (II) intel(0): SNA compiled for use with valgrind
[   930.063] (EE) [drm] Failed to open DRM device for pci:0000:01:00.0: -19
[   930.063] Number of created screens does not match number of detected devices.
  Configuration failed.
[   930.063] (EE) Server terminated with error (2). Closing log file.

这里的内容是Xorg.1.log

操作系统:Pop!_OS 19.10 64 位

CPU:英特尔酷睿i7-9750H

显卡:GeForce GTX 1650

答案1

[   929.795] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

意味着 X 无论出于何种原因都无法访问您的显卡之一。检查dmesg进一步的线索,也做一个ll /dev/dri/

显然这会导致

Number of created screens does not match number of detected devices.
  Configuration failed.

因为自动生成的配置的健全性检查失败,因为它无法访问其中一张卡,因此无法为其创建配置。

选项:

  • 如果未使用的显卡是外置显卡,而不是内置显卡:将其卸下,创建没有它的配置,然后将显卡放回原处。
  • 调试导致未使用的显卡出现故障的原因
  • 手写xorg.conf。自动生成它作为起点很好,但不是必需的。

如果这是一个XY问题,你的 X 是“我想让我的第二块显卡工作”,你的 Y 是“我需要一个xorg.conf来做到这一点,所以我必须自动生成它”,那么你唯一的选择就是调试导致第二块显卡的原因失败,更不用说xorg.conf文件了。

相关内容