X 无法通过英特尔板载显卡 + nVIDIA 卡启动

X 无法通过英特尔板载显卡 + nVIDIA 卡启动

我运行的是 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 驱动程序时,这种方法有效,但安装后,屏幕仍然一样空白。

答案1

有趣的是,这个问题无法解决,因为它并不是真正的问题:事实上,X 不是空白屏幕;它是 Kubuntu 默认的 X 显示管理器 -韓規模

如果您用 替换sddmlxdm您将看到登录屏幕(至少 - 使用英特尔驱动程序和编辑的xorg.conf;可能甚至没有它),并且您将能够登录。

不过,这并不是麻烦的结束。如果您启动 KDE 会话,Plasma 会毫不客气地崩溃。会话仍将“工作”,即恢复的应用程序将启动并正常运行,Alt+F2 启动键也将正常工作。

但是,如果您安装了另一个桌面环境(例如 LXDE)并启动它 - 它应该可以工作。

恼人的。

答案2

我刚刚在 Ubuntu 16.04 上成功安装了 CUDA,并且只使用 intel skylake gpu 进行显示。官方安装文档现在好多了,真的很有帮助。你应该看看高级设置和常见问题。这解决了我的问题。我选择了 Runfile 安装。(第 4.2 节)以下是我的提示:

  1. 首先删除新驱动程序;检查lsmod |grep noveou
  2. 停止 X,运行cuda-xx.run --no-opengl-libs
  3. 复制“设备节点验证”脚本并将其作为启动脚本(我将其复制到/etc/rc*.d/,注意命名规则)
  4. 获取上一个脚本,使用 进行检查ls /dev/nvidia*。如果一切正常,cuda 应该可以工作。
  5. 现在编辑xorg.conf,删除 nVIDIA 视频卡。

如果您看到 [drm] 无法打开 drm 设备为空,请检查并按照步骤 4 进行修复。

因为我使用 intel skylake,所以我安装了 drm、guc固件来自 01.org。(使用 进行检查lsmod | grep intel)或lspci -k | grep -A 2 VGAxorg.conf

Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

相关内容