为什么 nvidia 驱动程序 346 可以工作,而驱动程序 384 却不工作?

为什么 nvidia 驱动程序 346 可以工作,而驱动程序 384 却不工作?

我一直尝试将我的驱动程序从 nvidia-346 升级到 nvidia-384,但第二次却无法启动 X 服务器。

计算机:笔记本 MSI GE60 2PE Apache Pro CPU:Intel I5-4200H GPU:GeForce GTX 860M 系统:Linux Mint 17.2 64 位 Linux 核心:3.16.0-38-generic

Prime 受支持,使用 nvidia-settings 强制使用 nvidia gpu。

为了从驱动程序 346(运行良好)切换到驱动程序 384,我做了以下操作:

sudo apt-get remove --purge nvidia-*
sudo reboot
sudo apt-get install nvidia-384

(如果我安装 nvidia-346,一切都会正常工作...但我想升级我的驱动程序)

然后我在启动时看到了 mint 徽标,但最后屏幕变黑了。虚拟终端 ctrl+alf+f1 仍在工作。

从那里,我进行了一些诊断:

sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
vendor   : NVIDIA Corporation
modalias : pci:v000010DEd00001392sv00001462sd00001107bc03sc02i00
driver   : nvidia-346 - third-party non-free
driver   : xserver-xorg-video-nouveau - distro free builtin
driver   : nvidia-375 - third-party free
driver   : nvidia-381 - third-party free
driver   : nvidia-340 - third-party free
driver   : nvidia-384 - third-party free recommended
driver   : nvidia-378 - third-party free

lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)

sudo lshw -C display
  *-display
       description: 3D controller
       produit: GM107M [GeForce GTX 860M]
       fabriquant: NVIDIA Corporation
       identifiant matériel: 0
       information bus: pci@0000:01:00.0
       version: a2
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress bus_master cap_list rom
       configuration: driver=nvidia latency=0
       ressources: irq:52 mémoire:f6000000-f6ffffff mémoire:e0000000-efffffff mémoire:f0000000-f1ffffff portE/S:e000(taille=128) mémoire:f7000000-f707ffff
  *-display
       description: VGA compatible controller
       produit: 4th Gen Core Processor Integrated Graphics Controller
       fabriquant: Intel Corporation
       identifiant matériel: 2
       information bus: pci@0000:00:02.0
       version: 06
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       ressources: irq:46 mémoire:f7400000-f77fffff mémoire:d0000000-dfffffff portE/S:f000(taille=64)

sudo nvidia-detector
none

inxi -SGx
System:   Host: Deepthought Kernel: 3.16.0-38-generic x86_64 (64 bit, gcc: 4.8.2)
          Console: tty 1 Distro: Linux Mint 17.2 Rafaela
Graphics: Card: Intel 4th Gen Core Processor Integrated Graphics Controller bus-ID: 00:02.0
          X.org: 1.15.1 drivers: nvidia,intel tty size: 240x67 Advanced Data: N/A for root out of X

这是 /var/log/Xorg.0.log 文件:https://pastebin.com/ZDa3GgpX

/var/log/gpu-manager.log 中的日志:https://pastebin.com/RYgAuqST

我还运行了这些命令:

dpkg -l | grep -i nvidia

ii  bbswitch-dkms                                         0.7-2ubuntu1                                        amd64        Interface for toggling the power on nVidia Optimus video cards
rc  libcuda1-352-updates                                  352.63-0ubuntu0.14.04.1                             amd64        NVIDIA CUDA runtime library
rc  libcuda1-361                                          361.45.18-0ubuntu0~gpu14.04.1                       amd64        NVIDIA CUDA runtime library
rc  libcuda1-364                                          364.19-0ubuntu0~gpu14.04.3                          amd64        NVIDIA CUDA runtime library
rc  libcuda1-367                                          367.44-0ubuntu0~gpu14.04.1                          amd64        NVIDIA CUDA runtime library
rc  libcuda1-370                                          370.28-0ubuntu0~gpu14.04.1                          amd64        NVIDIA CUDA runtime library
rc  libcuda1-384                                          384.69-0ubuntu0~gpu14.04.1                          amd64        NVIDIA CUDA runtime library
ii  nvidia-384                                            384.69-0ubuntu0~gpu14.04.1                          amd64        NVIDIA binary driver - version 384.69
ii  nvidia-prime                                          0.6.2.1linuxmint1                                   amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                                       346.72-0ubuntu1                                     amd64        Tool for configuring the NVIDIA graphics driver

消息 | egrep -i “bbswitch|nvidia”

[   17.368801] nvidia: module license 'NVIDIA' taints kernel.
[   17.372095] nvidia: module verification failed: signature and/or  required key missing - tainting kernel
[   17.376643] nvidia-nvlink: Nvlink Core is being initialized, major device number 249
[   17.376921] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  384.69  Wed Aug 16 19:34:54 PDT 2017 (using threaded interrupts)
[   17.377929] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  384.69  Wed Aug 16 19:39:44 PDT 2017
[   17.378275] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[   17.408885] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 248
[   18.071894] nvidia 0000:01:00.0: irq 51 for MSI/MSI-X
[   18.072250] systemd-udevd[805]: failed to execute '/bin/systemctl' '/bin/systemctl start --no-block nvidia-persistenced.service': No such file or directory
[   21.215643] bbswitch: version 0.7
[   21.215649] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   21.215655] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   21.215730] bbswitch: detected an Optimus _DSM function
[   21.215735] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[   21.387726] systemd-udevd[1211]: failed to execute '/bin/systemctl' '/bin/systemctl stop --no-block nvidia-persistenced': No such file or directory
[   23.363834] nvidia 0000:01:00.0: irq 52 for MSI/MSI-X
[   23.560676] nvidia-modeset: Allocated GPU:0 (GPU-73945cf4-306b-7a4c-199c-65624530c4a3) @ PCI:0000:01:00.0
[   23.560775] nvidia-modeset: Freed GPU:0 (GPU-73945cf4-306b-7a4c-199c-65624530c4a3) @ PCI:0000:01:00.0

这是 /lib/module/3.16.0-38-generic/kernel/drivers/drm 文件夹的内容:

nvidia_384_drm.ko
nvidia_384.ko
nvidia_384_modeset.ko
nvidia_384_uvm.ko

我还有一个 /etc/modprobe.d/nvidia-graphic-drivers.conf,其中包含:

# This file was installed by nvidia-384
# Do not edit this file manually

blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-current
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current-updates
blacklist nvidia-173-updates
blacklist nvidia-96-updates
blacklist nvidia-384-updates
alias nvidia nvidia_384
alias nvidia-uvm nvidia_384_uvm
alias nvidia-modeset nvidia_384_modeset
alias nvidia-drm nvidia_384_drm
alias nouveau off
alias lbm-nouveau off

options nvidia_384_drm modeset=0

我希望这足以帮助我?谢谢

答案1

根据 OP 的评论,安装更高版本的内核有帮助(4.4linux-generic-lts-xenial包)

因此,这是一个 Ubuntu 打包错误,我建议报告。他们应该将更高版本的内核添加到 NVidia-384 的依赖项中(4.4一定能完成这项工作)

归根结底,内核没有稳定的模块接口,这是故意的——这也是为什么尽管已经 26 年了,它仍然很现代,而且发展得很好。它每次都会被重构,内部接口被删除、添加、重写、改进等。

这很好,而且对于在内核中使用驱动程序的显卡制造商来说,这也是可取的(例如英特尔和 AMD)。但是 NVidia 出于政治原因,将代码保持封闭状态,而是使用 DKMS 与内部不稳定 API 配合使用。而您的情况显然是从 3.16 到 4.4 的过程中发生了一些重大变化,这导致 NVidia 内核驱动程序失败。

FTR,请注意内核 GPU 驱动程序之间的区别(我正谈论这个)以及用户空间 GPU 驱动程序(作为内核的一个组件)

另请注意,3.16 并不旧,因为 4.4 才是旧的。3.16 是古老的

相关内容