[求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

声卡/显卡/打印机/USB设备等硬件问题(网卡问题请发上面的网卡板块)
回复
Sunwish
帖子: 2
注册时间: 2019-05-10 12:46
系统: Ubuntu 18.04.2 LTS
送出感谢: 0
接收感谢: 0

[求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#1

帖子 Sunwish » 2019-05-10 13:42

系统版本: Ubuntu 18.04.2 LTS (从 16.04 升级而来)

一. 我的操作步骤
// 已禁用 nouveau 驱动 (lsmod | grep nouveau 无输出)
1.1 卸载原来的显卡驱动
1.1-1 sudo apt-get remove nvidia-*
1.1-2 sudo apt-get autoremove
1.1-3 sudo nvidia-uninstall

1.2 更新至最新状态
1.2-1 sudo apt update
1.2-2 sudo apt upgrade

1.3 进入命令行模式并关闭 X-Window 服务
1.3-1 CTRL+ALT+F1
1.3-2 sudo service lightdm stop

1.4 安装系统推荐的驱动后重启 X-Window 服务
1.4-1 sudo apt-get install nvidia-430
1.4-2 sudo service lightdm start

二. 完成操作后遇到的问题
2.1 nvidia-settings 无法正常打开

2.1-1终端输出:
sunwish@sunwish-F117:~$ nvidia-settings
ERROR: Unable to load info from any available system
(nvidia-settings:11187): GLib-GObject-CRITICAL **: 12:51:46.322: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 12:51:46.325: PRIME: No offloading required. Abort
** Message: 12:51:46.325: PRIME: is it supported? no

2.1-2打开的 NVIDIA X SERVER SETTINGS 窗口:
[图片]

2.2 画面撕裂
拖动窗口/浏览器页面滚动均有画面撕裂的情况

2.3 Settings-Details-About 中 Graphics 显示为 llvmpipe (LLVM 7.0, 256 bits) 而不是所安装的显卡驱动

2.4 系统中的所有动画效果缺失
(这些问题应该都是显卡驱动没有安装好导致的)

三. 可能有用的附加问题
3.1 在开机进入登录界面之前的命令行中第一行闪过一项 [FAILED] 但能够正常进入系统:
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status' system-modules-load.service for details
Mounting FUSE Control File System...
Mounting Kernel Configuration File System...
Starting Apply Kernel Variables.

3.2 在安装 NVIDIA 驱动的过程中出现 WARNING:
WARNING: Ignoring CC version mismatch:
The kernel was built with gcc version 7.3.0(Ubuntu 7.3.0-16ubuntu3), but the current compiler version is cc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0.
头像
zzugyl
帖子: 200
注册时间: 2011-03-07 17:26
系统: Ubuntu 18.04.3 LTS
送出感谢: 0
接收感谢: 8 次

Re: [求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#2

帖子 zzugyl » 2019-05-10 14:32

我之前用Ubuntu 16.04 nv显卡驱动完美。后来升级到Ubuntu 18.04,nv显卡驱动也出问题了。
具体还要看哪款显卡,可能是最新的内核并未完美支持。
常在深闺人未识 一朝成名天下知
Sunwish
帖子: 2
注册时间: 2019-05-10 12:46
系统: Ubuntu 18.04.2 LTS
送出感谢: 0
接收感谢: 0

Re: [求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#3

帖子 Sunwish » 2019-05-10 16:14

四. 可能有用的附加信息
--------------------------------------------------
sunwish@sunwish-F117:~$ uname -a
Linux sunwish-F117 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
--------------------------------------------------
sunwish@sunwish-F117:~$ sudo lspci -knn | grep -A2 -i "3d\|display\|vga"
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:591b] (rev 04)
Subsystem: Device [1d05:102e]
Kernel modules: i915
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
Subsystem: Device [1d05:102e]
Kernel driver in use: nvidia
--------------------------------------------------
sunwish@sunwish-F117:~$ sudo lshw -numeric -class video
*-display
description: VGA compatible controller
product: GP107M [GeForce GTX 1050 Ti Mobile] [10DE:1C8C]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:131 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
*-display UNCLAIMED
description: VGA compatible controller
product: Intel Corporation [8086:591B]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list
configuration: latency=0
resources: memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff
--------------------------------------------------
sunwish@sunwish-F117:~$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C8Csv00001D05sd0000102Ebc03sc00i00
vendor : NVIDIA Corporation
model : GP107M [GeForce GTX 1050 Ti Mobile]
driver : nvidia-driver-410 - third-party free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-418 - third-party free
driver : nvidia-driver-430 - third-party free recommended
driver : nvidia-driver-415 - third-party free
driver : nvidia-driver-396 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
--------------------------------------------------
sunwish@sunwish-F117:~$ sudo efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0002,0003,0004
Boot0000* Windows Boot Manager HD(1,GPT,41bae53d-ee01-4cc4-9a91-f89bdfea3494,0x1000,0x31000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0001* ubuntu HD(1,GPT,41bae53d-ee01-4cc4-9a91-f89bdfea3494,0x1000,0x31000)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* UEFI:CD/DVD Drive BBS(129,,0x0)
Boot0003* UEFI:Removable Device BBS(130,,0x0)
Boot0004* UEFI:Network Device BBS(131,,0x0)
--------------------------------------------------
sunwish@sunwish-F117:~$ lsmod | grep nouveau
--------------------------------------------------
sunwish@sunwish-F117:~$ lsmod | grep vulkan
--------------------------------------------------
sunwish@sunwish-F117:~$ lsmod | grep nvidia
nvidia_uvm 815104 0
nvidia_drm 45056 0
nvidia_modeset 1101824 1 nvidia_drm
nvidia 18448384 13 nvidia_uvm,nvidia_modeset
ipmi_msghandler 53248 2 ipmi_devintf,nvidia
drm_kms_helper 167936 2 nvidia_drm,i915
drm 401408 4 drm_kms_helper,nvidia_drm,i915
--------------------------------------------------
sunwish@sunwish-F117:~$ sudo dpkg -l | grep nvidia
ii libnvidia-cfg1-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-430 430.09-0ubuntu0~gpu18.04.1 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-390:amd64 390.116-0ubuntu0.18.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-390:i386 390.116-0ubuntu0.18.04.1 i386 NVIDIA libcompute package
rc libnvidia-compute-396:amd64 396.54-0ubuntu0~gpu18.04.1 amd64 NVIDIA libcompute package
rc libnvidia-compute-396:i386 396.54-0ubuntu0~gpu18.04.1 i386 NVIDIA libcompute package
rc libnvidia-compute-418:amd64 418.56-0ubuntu0~gpu18.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
rc nvidia-compute-utils-396 396.54-0ubuntu0~gpu18.04.1 amd64 NVIDIA compute utilities
rc nvidia-compute-utils-418 418.56-0ubuntu0~gpu18.04.1 amd64 NVIDIA compute utilities
ii nvidia-compute-utils-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA compute utilities
rc nvidia-dkms-396 396.54-0ubuntu0~gpu18.04.1 amd64 NVIDIA DKMS package
rc nvidia-dkms-418 418.56-0ubuntu0~gpu18.04.1 amd64 NVIDIA DKMS package
ii nvidia-dkms-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA DKMS package
ii nvidia-driver-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA driver metapackage
rc nvidia-kernel-common-396 396.54-0ubuntu0~gpu18.04.1 amd64 Shared files used with the kernel module
rc nvidia-kernel-common-418 418.56-0ubuntu0~gpu18.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-430 430.09-0ubuntu0~gpu18.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.8.2 all Tools to enable NVIDIA's Prime
ii nvidia-settings 418.56-0ubuntu0~gpu18.04.1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA driver support binaries
ii xserver-xorg-video-nvidia-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA binary Xorg driver
头像
aukomn
帖子: 144
注册时间: 2008-05-03 14:09
送出感谢: 6 次
接收感谢: 2 次
联系:

Re: [求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#4

帖子 aukomn » 2019-05-25 8:30

sudo apt-get install nvidia-384试试

不行的话可以安装xserver-xorg-video-nvidia-390对付一下
头像
aukomn
帖子: 144
注册时间: 2008-05-03 14:09
送出感谢: 6 次
接收感谢: 2 次
联系:

Re: [求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#5

帖子 aukomn » 2019-06-03 18:13

第一步:(最重要)禁用自己的secure boot,也就是设置为disable,具体的进入自己bios中找一下,一般在security或者boot里面。
393406851
帖子: 18
注册时间: 2013-12-29 17:58
系统: 14,04
送出感谢: 1 次
接收感谢: 0

Re: [求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#6

帖子 393406851 » 2019-06-12 9:23

应该是没有安装nvidia-prime 。直接从附加驱动那里自动安装一点问题都没有。
zxfever
帖子: 1
注册时间: 2019-09-15 22:26
系统: 16.04
送出感谢: 0
接收感谢: 0

Re: [求助] 双显卡 Ubuntu 18.04 中 NVIDIA 显卡驱动的安装问题

#7

帖子 zxfever » 2019-09-15 22:30

请问你解决了这个问题吗,麻烦求告知解决方案,谢谢!
我是在Ubuntu16.04安装的384版本驱动
运行nvidia-settings时出现了这个问题。

代码: 全选

(nvidia-settings:5425): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: PRIME: Requires offloading
** Message: PRIME: is it supported? yes
回复

回到 “常用硬件支持”