我尝试在全新的 ASUS Vivobook n580gd 上安装 NVIDIA CUDA 驱动程序,但没有成功。经过大量 Google 搜索,我仍然没有找到解决方案。
我提前感谢您的任何建议/意见。
我的笔记本电脑有两块显卡:一块 Intel UHD Graphics 630 和一块 NVIDIA GeForce GTX 1050 Mobile。它预装了 Windows10,但我用 CentOS-7.6 进行了双启动。
这是我到目前为止所做的:
- 我在 Windows 10(笔记本电脑中已有)旁边执行了 CentOS-7 的双启动安装。为了顺利从 USB 启动 CentOS,我需要使用“nomodeset”标志。
- 我按照官方的安装指南进行安装https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
- 我安装了 GCC 和其他所需的软件包
- 我从这里下载 rpm(本地版本)文件https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=CentOS&target_version=7&target_type=rpmlocal
- 我使用指南中建议的命令安装了 cuda 和驱动程序。(特别是“sudo yum install cuda”)
- 我将 cuda 二进制文件添加到 PATH 变量中
然后我重新启动并尝试检查驱动程序:
$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
$ nvidia-settings
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
$ ll /dev/nvidia*
ls: cannot access /dev/nvidia*: No such file or directory
$ sudo lshw -numeric -C display
*-display UNCLAIMED
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile] [10DE:1C8D]
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 bus_master cap_list
configuration: latency=0
resources: memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:4000(size=128) memory:a4000000-a407ffff
*-display
description: VGA compatible controller
product: UHD Graphics 630 (Mobile) [8086:3E9B]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:128 memory:a2000000-a2ffffff memory:80000000-8fffffff ioport:5000(size=64)
**一些附加信息**
操作系统:
$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
海湾合作委员会(GCC):
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
内核版本:
$ uname -a
Linux centos 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
安全启动已关闭:
$ mokutil --sb-state
SecureBoot disabled
显卡:
$ nvidia-detect -v
Probing for supported NVIDIA devices...
[8086:3e9b] Intel Corporation UHD Graphics 630 (Mobile)
[10de:1c8d] NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile]
This device requires the current 418.74 NVIDIA driver kmod-nvidia
An Intel display controller was also detected
有关显卡的详细信息
$ sudo lspci -v -s 01:00.0
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
Subsystem: ASUSTeK Computer Inc. Device 1fc0
Flags: bus master, fast devsel, latency 0, IRQ 255
Memory at a3000000 (32-bit, non-prefetchable) [size=16M]
Memory at 90000000 (64-bit, prefetchable) [size=256M]
Memory at a0000000 (64-bit, prefetchable) [size=32M]
I/O ports at 4000 [disabled] [size=128]
Expansion ROM at a4000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [250] Latency Tolerance Reporting
Capabilities: [258] L1 PM Substates
Capabilities: [128] Power Budgeting <?>
Capabilities: [420] Advanced Error Reporting
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Capabilities: [900] #19
Kernel modules: nouveau
$ sudo lspci -v -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Device 1fc0
Flags: bus master, fast devsel, latency 0, IRQ 127
Memory at a2000000 (64-bit, non-prefetchable) [size=16M]
Memory at 80000000 (64-bit, prefetchable) [size=256M]
I/O ports at 5000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [100] Process Address Space ID (PASID)
Capabilities: [200] Address Translation Service (ATS)
Capabilities: [300] Page Request Interface (PRI)
Kernel driver in use: i915
Kernel modules: i915
已安装(?)驱动程序:
$ yum list installed | grep nvidia
dkms-nvidia.x86_64 3:418.67-1.el7 @cuda
nvidia-detect.x86_64 418.74-2.el7.elrepo @elrepo
nvidia-driver.x86_64 3:418.67-4.el7 @cuda
nvidia-driver-NVML.x86_64 3:418.67-4.el7 @cuda
nvidia-driver-NvFBCOpenGL.x86_64 3:418.67-4.el7 @cuda
nvidia-driver-cuda.x86_64 3:418.67-4.el7 @cuda
nvidia-driver-cuda-libs.x86_64 3:418.67-4.el7 @cuda
nvidia-driver-devel.x86_64 3:418.67-4.el7 @cuda
nvidia-driver-libs.x86_64 3:418.67-4.el7 @cuda
nvidia-libXNVCtrl.x86_64 3:418.67-1.el7 @cuda
nvidia-libXNVCtrl-devel.x86_64 3:418.67-1.el7 @cuda
nvidia-modprobe.x86_64 3:418.67-1.el7 @cuda
nvidia-persistenced.x86_64 3:418.67-1.el7 @cuda
nvidia-settings.x86_64 3:418.67-1.el7 @cuda
nvidia-xconfig.x86_64 3:418.67-1.el7 @cuda
Nvcc 编译器:
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168
先感谢您!!!
答案1
我修复了这个问题。我的错,我忘了安装 kernel-devel 包。
安装后:
sudo yum install kernel-devel-$(uname -r)
重新启动后,驱动程序即可正常工作。
$ nvidia-smi
Tue Jun 11 23:15:28 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 44C P8 N/A / N/A | 0MiB / 4042MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$ sudo lshw -numeric -C display
*-display
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile] [10DE:1C8D]
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 bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:508 memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:4000(size=128) memory:a4000000-a407ffff
*-display
description: VGA compatible controller
product: UHD Graphics 630 (Mobile) [8086:3E9B]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:128 memory:a2000000-a2ffffff memory:80000000-8fffffff ioport:5000(size=64)
ll /dev/nvidia*
crw-rw-rw-. 1 root root 195, 0 Jun 11 23:12 /dev/nvidia0
crw-rw-rw-. 1 root root 195, 255 Jun 11 23:12 /dev/nvidiactl
crw-rw-rw-. 1 root root 195, 254 Jun 11 23:12 /dev/nvidia-modeset
crw-rw-rw-. 1 root root 241, 0 Jun 11 23:12 /dev/nvidia-uvm
crw-rw-rw-. 1 root root 241, 1 Jun 11 23:12 /dev/nvidia-uvm-tools