我还有另一台笔记本电脑,它是专有 Nvidia 驱动程序的受害者。我想在笔记本电脑(配备 Quadro M1000M 和 4k 显示屏的 Dell Precision 5510)上进行 CUDA 开发,因此我需要专有驱动程序。
我已经尝试了几个小时了,甚至通读了这,我只是不知道当 xorg 无法自动配置时如何配置它。我曾经最初nvidia-xconfig
设置过xorg.conf
,然后我必须BusID
向该部分添加一个设置Device
才能找到该卡。现在,startx
运行没有错误(我可以验证事情是否确实正常工作),但它就像只显示在鬼屏上。我可以DISPLAY=:0 xrandr
远程运行,并获得一个没有输出的 8x8 虚拟屏幕:
Screen 0: minimum 8 x 8, current 8 x 8, maximum 16384 x 16384
我在 xorg 日志文件中得到以下与 Nvidia 相关的输出块,其中有几个可疑的 NULL 值:
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jul 16 22:35:15 2016
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) ServerLayout "Layout0"
(**) |-->Screen "Screen0" (0)
(**) | |-->Monitor "Monitor0"
(**) | |-->Device "Device0"
(**) |-->Input Device "Keyboard0"
(**) |-->Input Device "Mouse0"
...
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) NVIDIA(0): Enabling 2D acceleration
(II) NVIDIA(0): NVIDIA GPU Quadro M1000M (GM107GL-A) at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 2097152 kBytes
(--) NVIDIA(0): VideoBIOS: 82.07.82.00.23
(II) NVIDIA(0): Detected PCI Express Link width: 16X
(II) NVIDIA(0): Validated MetaModes:
(II) NVIDIA(0): "NULL"
(II) NVIDIA(0): Virtual screen size determined to be 640 x 480
(WW) NVIDIA(0): Unable to get display device for DPI computation.
(==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
(--) Depth 24 pixmap format is 32 bpp
(II) NVIDIA: Using 12288.00 MB of virtual memory for indirect memory
(II) NVIDIA: access.
(WW) NVIDIA(0): ACPI: AC power state information is not available under
(WW) NVIDIA(0): /sys/class/power_supply/ , nor under
(WW) NVIDIA(0): /proc/acpi/ac_adapter/
(II) NVIDIA(0): Built-in logo is bigger than the screen.
(II) NVIDIA(0): Setting mode "NULL"
(==) NVIDIA(0): Disabling shared memory pixmaps
(==) NVIDIA(0): Backing store enabled
(==) NVIDIA(0): Silken mouse enabled
(**) NVIDIA(0): DPMS enabled
这是我目前的xorg.conf
:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 367.35 (buildmeister@swio-display-x64-rhel04-01) Mon Jul 11 23:51:45 PDT 2016
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "LaptopBuiltin"
ModelName "eDP1"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
#BusId "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
答案1
如果您说您以前没有xorg.conf
,并且您使用该内容创建了它,那么我会从更简单的开始。你不需要这一切。
使用 nvidia 驱动程序所需要做的就是:
Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection
对于 OpenGL,您可能还需要以下内容:
Section "Files"
ModulePath "/usr/lib64/opengl/nvidia"
EndSection
(确切值取决于您的系统路径)
如果仍然不起作用,请发布整个 xorg 日志。