ubuntu16.04显卡驱动安装出现问题

CPU/显卡/打印机/USB设备等硬件问题
回复
hnaaa
帖子: 15
注册时间: 2017-12-28 19:12
系统: windows10

ubuntu16.04显卡驱动安装出现问题

#1

帖子 hnaaa » 2018-02-28 12:34

我的ubuntu版本是16.04,显卡是nvidia1070
选择手动安装显卡驱动
现在正常安装了,可以正常进入系统,分辨率正常,使用nvidia-smi命令后可以看到版本是390.25但是我有两个如下疑问

第一个,我必须在关闭uefi模式和secure boot模式下才能进入系统
但是nvidia的驱动是有签名的,但是并未自动加入系统信任签名,我想问一下如何把该签名加为信任?
该签名名称为nvidia-modsign-crt-5AE4FE70.der,我直接将其重命名为nvidia-modsign-crt-5AE4FE70.der.crt后放入
usr/local/share/ca-certificates目录下,然后更新签名后仍然没有作用

第二个,我必须在开机引导grub文件中加入nomodeset这一行,这一行的意思不是不加载显卡吗,我现在不输入这个指令就无法进入系统,请问有遇到过相同情况的人吗
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu16.04显卡驱动安装出现问题

#2

帖子 poloshiao » 2018-02-28 18:28

显卡是 nvidia 1070
使用nvidia-smi命令
1. nvidia 1070 並非 Tesla 系列
1-1. 參見
http://forum.ubuntu.com.cn/viewtopic.ph ... 3#p3201683
第一个,我必须在关闭uefi模式和secure boot模式下才能进入系统
但是nvidia的驱动是有签名的,但是并未自动加入系统信任签名,我想问一下如何把该签名加为信任?
该签名名称为nvidia-modsign-crt-5AE4FE70.der,我直接将其重命名为nvidia-modsign-crt-5AE4FE70.der.crt后放入
usr/local/share/ca-certificates目录下,然后更新签名后仍然没有作用
2. 先確認 你的電腦主板 是否支援 uefi 模式 和 secure boot 模式 開機
第二个,我必须在开机引导grub文件中加入nomodeset这一行,这一行的意思不是不加载显卡吗,我现在不输入这个指令就无法进入系统,请问有遇到过相同情况的人吗
3. 加 nomodeset 是為了 關閉 KMS
3-1. 參見
https://wiki.debian.org/KernelModesetting#Disabling_KMS
Disabling KMS
To disable KMS for nVidia cards, either:
Boot with the nomodeset kernel command line parameter.

4. 把下面指令 複製 貼進終端機 執行
4-1. uname -a
4-2. sudo lspci -knn
4-3. sudo lshw -numeric -class video
4-4. sudo ubuntu-drivers devices
4-5. sudo efibootmgr -v
4-6. echo $DESKTOP_SESSION
4-7. sudo cat /etc/os-release
把結果直接 選取/複製 貼上來
目的 要查是否已正確啟用顯卡驅動
不要擷圖 方便回文直接引用你貼上來的資料
方便你閱讀
hnaaa
帖子: 15
注册时间: 2017-12-28 19:12
系统: windows10

Re: ubuntu16.04显卡驱动安装出现问题

#3

帖子 hnaaa » 2018-03-01 17:36

非常感谢您的耐心解答,我首先更正一下我的说法,我目前看上去应该正确的安装了驱动,在系统信息里面已经显示使用了nvidia驱动
但是我现在目前的问题在与开启uefi和security boot模式下不能进入系统,但是在关闭security boot或者关闭uefi模式下都能进入系统,也就是说我现在问题在于我的驱动没有信任的签名,不能通过security boot验证。
此外您给我提供的代码运行效果如下:
hnaaa@hnaaa-Alienware-17-R4:~$ uname -a
Linux hnaaa-Alienware-17-R4 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
hnaaa@hnaaa-Alienware-17-R4:~$ sudo lspci -knn
00:00.0 Host bridge [0600]: Intel Corporation Sky Lake Host Bridge/DRAM Registers [8086:1910] (rev 07)
Subsystem: Dell Skylake Host Bridge/DRAM Registers [1028:0776]
Kernel driver in use: skl_uncore
00:01.0 PCI bridge [0604]: Intel Corporation Sky Lake PCIe Controller (x16) [8086:1901] (rev 07)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:01.2 PCI bridge [0604]: Intel Corporation Sky Lake PCIe Controller (x4) [8086:1909] (rev 07)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:02.0 Display controller [0380]: Intel Corporation Skylake Integrated Graphics [8086:191b] (rev 06)
DeviceName: Onboard IGD
Subsystem: Dell Skylake Integrated Graphics [1028:0776]
Kernel driver in use: i915
Kernel modules: i915
00:04.0 Signal processing controller [1180]: Intel Corporation Skylake Processor Thermal Subsystem [8086:1903] (rev 07)
Subsystem: Dell Skylake Processor Thermal Subsystem [1028:0776]
Kernel driver in use: proc_thermal
Kernel modules: processor_thermal_device
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] (rev 31)
Subsystem: Dell Sunrise Point-H USB 3.0 xHCI Controller [1028:0776]
Kernel driver in use: xhci_hcd
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131] (rev 31)
Subsystem: Dell Sunrise Point-H Thermal subsystem [1028:0776]
Kernel driver in use: intel_pch_thermal
Kernel modules: intel_pch_thermal
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] (rev 31)
Subsystem: Dell Sunrise Point-H CSME HECI [1028:0776]
Kernel driver in use: mei_me
Kernel modules: mei_me
00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] (rev 31)
Subsystem: Dell Sunrise Point-H SATA controller [AHCI mode] [1028:0776]
Kernel driver in use: ahci
Kernel modules: ahci
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #1 [8086:a110] (rev f1)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #5 [8086:a114] (rev f1)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.5 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #6 [8086:a115] (rev f1)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #9 [8086:a118] (rev f1)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-H LPC Controller [8086:a150] (rev 31)
Subsystem: Dell Sunrise Point-H LPC Controller [1028:0776]
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-H PMC [8086:a121] (rev 31)
Subsystem: Dell Sunrise Point-H PMC [1028:0776]
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
Subsystem: Dell Sunrise Point-H HD Audio [1028:0776]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-H SMBus [8086:a123] (rev 31)
Subsystem: Dell Sunrise Point-H SMBus [1028:0776]
Kernel modules: i2c_i801
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1ba1] (rev a1)
Subsystem: Dell Device [1028:0775]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nvidia_drm, nvidia
3c:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller [1969:e0a1] (rev 10)
Subsystem: Dell Killer E2400 Gigabit Ethernet Controller [1028:0772]
Kernel driver in use: alx
Kernel modules: alx
3d:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter [1a56:1535]
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci
3e:00.0 Non-Volatile memory controller [0108]: Toshiba America Info Systems Device [1179:0115] (rev 01)
Subsystem: Toshiba America Info Systems Device [1179:0001]
Kernel driver in use: nvme
Kernel modules: nvme

hnaaa@hnaaa-Alienware-17-R4:~$ sudo lshw -numeric -class video
*-display
description: VGA compatible controller
product: NVIDIA Corporation [10DE:1BA1]
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:140 memory:dc000000-dcffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:e000(size=128) memory:c0000-dffff
*-display
description: Display controller
product: Intel Corporation [8086:191B]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm bus_master cap_list
configuration: driver=i915 latency=0
resources: irq:125 memory:db000000-dbffffff memory:70000000-7fffffff ioport:f000(size=64)

hnaaa@hnaaa-Alienware-17-R4:~$ sudo ubuntu-drivers devices
[sudo] hnaaa 的密码:
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
vendor : NVIDIA Corporation
manual_install: True
modalias : pci:v000010DEd00001BA1sv00001028sd00000775bc03sc00i00
driver : nvidia-390 - third-party free recommended
driver : nvidia-387 - third-party free
driver : nvidia-384 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin

hnaaa@hnaaa-Alienware-17-R4:~$ sudo efibottmgr -v
sudo: efibottmgr:找不到命令
hnaaa@hnaaa-Alienware-17-R4:~$ sudo efibootmgr -v
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0000,0006,0001,0002
Boot0000* Windows Boot Manager HD(1,GPT,e39ea56b-070b-4dfd-80d7-d7c726615ba3,0x800,0xfa000)/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.}....z...............
Boot0001* Onboard NIC (IPV4) PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/MAC(18dbf241c1a9,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0002* Onboard NIC (IPV6) PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/MAC(18dbf241c1a9,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0006* HNAAA HD(1,GPT,e39ea56b-070b-4dfd-80d7-d7c726615ba3,0x800,0xfa000)/File(\EFI\ubuntu\shimx64.efi)
hnaaa@hnaaa-Alienware-17-R4:~$ echo $DESKTOP_SESSION
ubuntu
hnaaa@hnaaa-Alienware-17-R4:~$ sudo cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


如上,感谢您的回答
hnaaa
帖子: 15
注册时间: 2017-12-28 19:12
系统: windows10

Re: ubuntu16.04显卡驱动安装出现问题

#4

帖子 hnaaa » 2018-03-01 19:00

另外我还有个情况补充,我现在不开启nomodeset模式仍然可以正常进入系统,正常分辨率,应该已经安装正常了,我目前的问题就是无法启用security mode模式下进入系统,没有密钥验证
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu16.04显卡驱动安装出现问题

#5

帖子 poloshiao » 2018-03-01 19:31

第一个,我必须在关闭uefi模式和secure boot模式下才能进入系统
sudo efibootmgr -v
BootCurrent: 0006
Boot0006* HNAAA HD(1,GPT,e39ea56b-070b-4dfd-80d7-d7c726615ba3,0x800,0xfa000)/File(\EFI\ubuntu\shimx64.efi)
1. 表示你目前是在 UEFI enabled / Secure Boot enabled 模式開機 ?
显卡是 nvidia 1070
sudo lshw -numeric -class video
product: NVIDIA Corporation [10DE:1BA1]
configuration: driver=nvidia latency=0
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1ba1] (rev a1)
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nvidia_drm, nvidia
2. http://pci-ids.ucw.cz/v2.2/pci.ids
1ba1 GP104M [GeForce GTX 1070 Mobile]
2-1. https://www.nvidia.com/en-us/geforce/pr ... s/laptops/
GEFORCE GTX 10-SERIES LAPTOPS
Geforce GTX 1070
2-2. 表示 nVidia 目前作用中驅動 閉源 nvidia-xxx
*-display
description: Display controller
product: Intel Corporation [8086:191B]
3. http://pci-ids.ucw.cz/v2.2/pci.ids
191b HD Graphics 530
4. GeForce GTX 1070 Mobile 具備 Optimus 功能
4-1. https://zh.wikipedia.org/wiki/NVIDIA_Op ... 3%E5%8F%B0
NVIDIA Optimus
支援平台
4-1-1. 顯示核心
GeForce 10 系列筆記型版
4-1-2. 處理器平台:Intel Core 2 Duo、Core i7/Core i5和Intel Atom N450
4-2. https://www.geforce.com/hardware/techno ... _value=All
Optimus
Supported GPUs
GeForce GTX 10-Series Notebooks
4-3. https://www.geforce.com/hardware/techno ... technology
GeForce > Hardware > Technology > Optimus
4-3-1. 在 Linux 可能還無法 100% 實現上述 Optimus 功能

5. 要知道你目前安裝的顯卡驅動版本
把下面指令 複製 貼進終端機 執行
5-1. lsmod | grep -i nouveau
5-2. lsmod | grep -i nvidia
5-3. lsmod | grep -i vulkan
5-4. dpkg -l | grep -i nvidia
5-5. nvidia-settings --glxinfo | grep "OpenGL version string"
把結果直接 選取/複製 貼上來
回复