我运行 Kubuntu 16.04(刚刚从 ISO 安装)。我的电脑有片上英特尔显卡,这是我用于显示的。我还有一张 GTX 650 Ti Boost 卡,我不想用于显示(仅用于 CUDA 工作)。
- 当安装 nVIDIA 驱动程序 361.62 或 367.35(最新)时,Xorg 加载到黑屏(但当我运行使用 CUDA 的二进制文件时运行良好)。
- 未安装 nVIDIA 驱动程序时,Xorg 加载正常;它加载了 nouveau 模块(尽管据说我不需要它们) - 但 CUDA 应用程序不运行。
安装 nVIDIA 驱动程序的 Xorg 错误是:
(EE) NOUVEAU(G0): [XvMC] Failed to initialize extension.
...
(EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
如果我卸载 nVIDIA 驱动程序,X 将再次正常工作(很快会在此处引用一些日志消息)。
我怎样才能同时安装 X 和 CUDA(即驱动程序安装和运行)?
适当披露:我曾问过关于 unix.SX 上的 Debian Stretch 的相同问题,但由于我刚刚切换到 Kubuntu,所以将其删除。
更新:
因此,我完全卸载了 Nouveau 以进一步探索这一点。当我生成 xorg.conf 时,我得到(剪辑输入设备相关和文件行和部分):
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
EndSection
Section "Module"
Load "glx"
EndSection
section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "Card0"
Driver "fbdev"
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "Card1"
Driver "fbdev"
BusID "PCI:2:0:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
(注意 PCI 2:0:0 是 nVIDIA 卡,0:2:0 是片上显卡。)
现在,
- 如果我将此配置与 nVDIAI 驱动程序一起使用 - 空白屏幕。
- 如果我注释掉有关 nVIDIA 卡(卡 1,监视器 1)的部分并更改 ServerLayout 部分 - 空白屏幕。
- 如果我禁用 GLX 模块的加载,这会在日志中产生错误 - 空白屏幕(并且不清楚模块加载是问题)
- 我什至进入
/usr/lib/xorg/modules
,删除 nvidia 的 libglx.so 和/或恢复非 nvidia libglx.so - 仍然是空白屏幕。
我确实收到了不同的错误消息。有了上述最广泛的子集,我有:
[ 1952.022] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Aug 10 10:07:20 2016
[ 1952.022] (==) Using config file: "/etc/X11/xorg.conf"
[ 1952.022] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 1952.022] (==) ServerLayout "X.org Configured"
[ 1952.022] (**) |-->Screen "Screen0" (0)
[ 1952.022] (**) | |-->Monitor "Monitor0"
[ 1952.022] (**) | |-->Device "Card0"
[ 1952.022] (**) |-->Input Device "Mouse0"
[ 1952.022] (**) |-->Input Device "Keyboard0"
[ 1952.022] (==) Automatically adding devices
[ 1952.022] (==) Automatically enabling devices
[ 1952.022] (==) Automatically adding GPU devices
...
1952.024] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 1952.024] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 1952.026] (--) PCI:*(0:0:2:0) 8086:0162:1565:110f rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64
[ 1952.026] (--) PCI: (0:2:0:0) 10de:11c2:19da:1281 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[ 1952.026] (II) LoadModule: "glx"
[ 1952.026] (II) Loading /usr/lib/xorg/modules/extensions-nvidia-leave-me-alone/libglx.so
[ 1952.026] (II) Module glx: vendor="X.Org Foundation"
[ 1952.026] compiled for 1.18.3, module version = 1.0.0
[ 1952.026] ABI class: X.Org Server Extension, version 9.0
[ 1952.026] (==) AIGLX enabled
[ 1952.026] (II) LoadModule: "fbdev"
[ 1952.027] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 1952.027] (II) Module fbdev: vendor="X.Org Foundation"
[ 1952.027] compiled for 1.18.1, module version = 0.4.4
[ 1952.027] Module class: X.Org Video Driver
[ 1952.027] ABI class: X.Org Video Driver, version 20.0
[ 1952.027] (II) FBDEV: driver for framebuffer: fbdev
[ 1952.033] (II) Loading sub module "fbdevhw"
[ 1952.033] (II) LoadModule: "fbdevhw"
[ 1952.033] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 1952.033] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 1952.033] compiled for 1.18.3, module version = 0.0.2
[ 1952.033] ABI class: X.Org Video Driver, version 20.0
[ 1952.033] (**) FBDEV(0): claimed PCI slot 0@0:2:0
[ 1952.033] (II) FBDEV(0): using default device
[ 1952.033] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[ 1952.033] (==) FBDEV(0): RGB weight 888
[ 1952.033] (==) FBDEV(0): Default visual is TrueColor
[ 1952.033] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 1952.033] (II) FBDEV(0): hardware: inteldrmfb (video memory: 8100kB)
[ 1952.033] (II) FBDEV(0): checking modes against framebuffer device...
[ 1952.033] (II) FBDEV(0): checking modes against monitor...
[ 1952.033] (--) FBDEV(0): Virtual size is 1920x1080 (pitch 1920)
[ 1952.033] (**) FBDEV(0): Built-in mode "current"
[ 1952.033] (==) FBDEV(0): DPI set to (96, 96)
[ 1952.033] (II) Loading sub module "fb"
[ 1952.033] (II) LoadModule: "fb"
[ 1952.033] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 1952.034] (II) Module fb: vendor="X.Org Foundation"
[ 1952.034] compiled for 1.18.3, module version = 1.0.0
[ 1952.034] ABI class: X.Org ANSI C Emulation, version 0.4
[ 1952.034] (**) FBDEV(0): using shadow framebuffer
[ 1952.034] (II) Loading sub module "shadow"
[ 1952.034] (II) LoadModule: "shadow"
[ 1952.034] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 1952.034] (II) Module shadow: vendor="X.Org Foundation"
[ 1952.034] compiled for 1.18.3, module version = 1.1.0
[ 1952.034] ABI class: X.Org ANSI C Emulation, version 0.4
[ 1952.034] (==) Depth 24 pixmap format is 32 bpp
[ 1952.079] (==) FBDEV(0): Backing store enabled
[ 1952.080] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
... repeated many times
[ 1952.082] (==) FBDEV(0): DPMS enabled
[ 1952.082] (==) RandR enabled
[ 1952.087] (II) SELinux: Disabled on system
[ 1952.087] (II) AIGLX: Screen 0 is not DRI2 capable
[ 1952.087] (EE) AIGLX: reverting to software rendering
[ 1952.101] (EE) AIGLX error: dlopen of /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
[ 1952.101] (EE) GLX: could not load software renderer
[ 1952.101] (II) GLX: no usable GL providers found for screen 0
...
[ 2201.199] (II) config/udev: removing GPU device /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0/drm/card1 /dev/dri/card1
[ 2201.199] xf86: remove device 0 /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0/drm/card1
- 我还尝试强制使用“intel”驱动程序。这在未安装 nVIDIA 驱动程序时有效,但是当它们安装时它是相同的旧空白屏幕。
有趣的是,这个问题无法解决,因为它不是真正的问题:事实上,X 不是空白筛选;它是 Kubuntu 的 X 显示管理器,默认为-sddm。
如果您替换
sddm
为 ,lxdm
您将看到登录屏幕(至少 - 使用英特尔驱动程序和已编辑的xorg.conf
;甚至可能没有它),您将能够登录。不过,这并不是你麻烦的结束。如果你启动一个 KDE 会话,Plasma 会毫不客气地崩溃。会话仍将“工作”,因为恢复的应用程序将出现并正常运行,并且用于启动的 Alt+F2 也将工作。
但是,如果您安装另一个桌面环境(例如 LXDE)并启动它 - 它应该可以工作。
恼人的。
我刚刚在 Ubuntu 16.04 上成功安装了 CUDA,并且仅使用 intel skylake gpu 进行显示。现在官方的安装文档比较好,真的很有帮助。您应该查看高级设置和常见问题解答。这解决了我的问题。我选择了 Runfile 安装。(第 4.2 节)以下是我的提示:
lsmod |grep noveou
cuda-xx.run --no-opengl-libs
/etc/rc*.d/
,注意命名规则)ls /dev/nvidia*
. 如果一切正常,cuda 应该可以工作。xorg.conf
,删除 nVIDIA 视频卡。如果您看到 [drm] failed to open drm device for null,请使用步骤 4 检查并修复。
由于我使用的是intel skylake,所以我从01.org 安装了drm、guc固件。(检查
lsmod | grep intel
)或lspci -k | grep -A 2 VGA
Inxorg.conf
,