在使用 NVIDIA 驱动程序时,如何在未连接显示器的情况下启动 X?

在使用 NVIDIA 驱动程序时,如何在未连接显示器的情况下启动 X?

卡片 :GeForce GT 730
操作系统:森托斯 6.5

我正在尝试演示惠普RGS在位于 DC 异地的 CentOS 6.5 计算机上。 RGS 要求 X 以 NVidia 硬件加速运行,但我无法让 X 使用 nvidia 模块进行无头启动。
我都尝试过使用自定义EDID在 xorg.conf 中,运行nvidia-xconfig --allow-empty-initial-configuration、同时运行两者以及两者都不运行。

nvidia相关包:

]# rpm -qa | grep nvidia
nvidia-x11-drv-346.59-1.el6.elrepo.x86_64
kmod-nvidia-346.59-1.el6.elrepo.x86_64
nvidia-detect-346.59-1.el6.elrepo.x86_64

已加载内核模块,noveau 已列入黑名单:

]# lsmod | grep -i nvid\|nov
nvidia               8368812  0 
i2c_core               31084  1 nvidia

lspci 输出:

lspci | egrep 'VGA|3D'
06:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2
08:00.0 VGA compatible controller: NVIDIA Corporation Device 1287 (rev a1)

这是当前的 xorg.conf

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    ModulePath      "/usr/lib64/xorg/modules/extensions/nvidia"
    ModulePath      "/usr/lib64/xorg/modules"
EndSection

Section "Module"

# HP Remote Graphics Extension
    Load           "rge"
# extmod recommended for preventing XID overflow.
    Load           "extmod"
# Ensure X.org defaults are loaded
    Load           "glx"
    Load           "dbe"
    Load           "record"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from data in "/etc/sysconfig/keyboard"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbLayout" "us"
    Option         "XkbModel" "pc105"
EndSection

Section "Monitor"

    # 1920x1080p @ 60Hz (EIA/CEA-861B)
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       26.0 - 81.0
    VertRefresh     24.0 - 75.0
    ModeLine       "1920x1080_24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    ModeLine       "1920x1080_23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    Option         "DPMS"
    Option         "DPI" "96 x 96"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 730"
EndSection

Section "Screen"

# Option "ModeDebug" "True"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "CustomEDID" "DFP-0:/etc/X11/edid.bin"
    Option         "UseDisplayDevice" "DFP-0"
    Option         "ConnectedMonitor" "DFP-0"
    # Option "IgnoreDisplayDevices" "CRT-0"
    Option         "Stereo" "0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    Option         "NoLogo" "1"
    Option         "RenderAccel" "1"
    Option         "TripleBuffer" "1"
    Option         "Coolbits" "1"
    Option         "DamageEvents" "1"
    Option         "RegistryDwords" "PerfLevelSrc=0x3333"
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Modes      "1920x1080"
    EndSubSection
EndSection

Section "Extensions"

# Begin HP Remote Graphics Software
    Option         "Composite" "Disable"
# End HP Remote Graphics Software
EndSection

以下是尝试使用该配置启动时的 Xorg.0.log 输出:

xauth:创建新的权限文件 /root/.serverauth.44277

X.Org X Server 1.15.0
Release Date: 2013-12-27
X Protocol Version 11, Revision 0
Build Operating System: c6b8 2.6.32-220.el6.x86_64
Current Operating System: Linux ws-00.cluster.opengeophysical.com 2.6.32-431.29.2.el6_lustre.gffd1fc2.x86_64 #1 SMP Mon Jan 12 10:02:20 PST 2015 x86_64
Kernel command line: ro root=UUID=041f043a-ee06-4f90-8197-2d8cbdd1496b rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=135M@0M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet nouveau.modeset=0 rdblacklist=nouveau audit=1
Build Date: 11 December 2014  07:44:11PM
Build ID: xorg-x11-server 1.15.0-25.el6.centos
Current version of pixman: 0.32.4
        Before reporting problems, check http://wiki.centos.org/Documentation
        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: Tue Jun 23 11:26:55 2015
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension Present
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension SELinux
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension RGE
Loading extension GLX
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the CentOS support
         at http://wiki.centos.org/Documentation
 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.
giving up.
xinit:  Connection refused (errno 111):  unable to connect to X server
xinit:  No such process (errno 3):  Server error.

答案1

尝试将此选项添加到驱动程序“nvidia”的“设备”部分。

Option "AllowEmptyInitialConfiguration" "true"

答案2

我非常确定您指定的所有选项都应该位于带有 nvidia 驱动程序的“设备”部分,而不是“屏幕”部分。

另外,根据文档,UseDisplayDevice 也可以设置为“none”,但我从未尝试过。

相关内容