升级到 18.04 后安装 nvidia 驱动程序后出现黑屏

升级到 18.04 后安装 nvidia 驱动程序后出现黑屏

在将我的计算机从 16.04 升级到 18.04 后,我注意到我的 Nvidia 驱动程序不再安装,重新安装驱动程序后,我得到了一个黑屏,我之前遇到过这样的问题,并通过手动安装 Nvidia 驱动程序而不是使用自动安装或 apt-get install Nvidia(此处输入数字)解决了它。我尝试了提到的所有安装方法这里 我在 askubuntu 上阅读了几乎所有关于这个问题的主题,现在已经快两周了,我还是找不到解决这个问题的方法

您可能需要的信息

lspci | grep VGA
02:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0 ==
modalias : pci:v000010DEd000013C2sv00001458sd0000367Abc03sc00i00
vendor   : NVIDIA Corporation
model    : GM204 [GeForce GTX 970]
driver   : nvidia-driver-415 - third-party free recommended
driver   : nvidia-driver-390 - third-party free
driver   : nvidia-driver-396 - third-party free
driver   : nvidia-driver-410 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin

nvidia-detector 
none

sudo lshw -numeric -C display
*-display UNCLAIMED       
       description: VGA compatible controller
       product: GM204 [GeForce GTX 970] [10DE:13C2]
       vendor: NVIDIA Corporation [10DE]
       physical id: 0
       bus info: pci@0000:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:f2000000-f2ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f3000000-f307ffff
  *-display UNCLAIMED
       description: Display controller
       product: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:412]
       vendor: Intel Corporation [8086]
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm bus_master cap_list
       configuration: latency=0
       resources: memory:f3400000-f37fffff memory:d0000000-dfffffff ioport:f000(size=64)

##glxinfo -B
name of display: :1
display: :1  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: VMware, Inc. (0xffffffff)
    Device: llvmpipe (LLVM 7.0, 256 bits) (0xffffffff)
    Version: 18.2.8
    Accelerated: no
    Video memory: 15904MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 7.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.2.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 18.2.8
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.2.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

##uname -a 
Linux LeLouch 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

编辑我通过更新内核解决了这个问题

我已经花了 3 周的时间来解决此问题,问题是在 linux-header 更新后,需要更新 grub 引导加载程序,我每次都使用 update-grub,但我没有注意到主 grub 引导加载程序在另一个发行版上,所以我需要更新那个 grub,这样就解决了我的问题。感谢 @BarBar1234

答案1

在 BIOS 中禁用安全启动,因为在这种情况下安全启动会阻止加载 nvidia 模块。

答案2

我尝试了互联网上找到的无数解决方案,唯一对我有用的是:

  • 备份/etc/X11/xorg.conf/etc/X11/xorg.conf.old
  • 类似地,备份/etc/X11/xorg.conf.d/目录(如果存在)
  • 进而cp -r /usr/share/X11/xorg.conf.d /etc/X11/

相关内容