![Asus ラップトップに NVIDIA ドライバーをインストールできません: NVIDIA ドライバーと通信できなかったため、NVIDIA-SMI が失敗しました](https://rvso.com/image/1711455/Asus%20%E3%83%A9%E3%83%83%E3%83%97%E3%83%88%E3%83%83%E3%83%97%E3%81%AB%20NVIDIA%20%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%3A%20NVIDIA%20%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%E3%81%A8%E9%80%9A%E4%BF%A1%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%8B%E3%81%A3%E3%81%9F%E3%81%9F%E3%82%81%E3%80%81NVIDIA-SMI%20%E3%81%8C%E5%A4%B1%E6%95%97%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F.png)
新品の ASUS Vivobook n580gd に NVIDIA CUDA ドライバーをインストールしようとしていますが、うまくいきません。グーグルでいろいろ検索しましたが、まだ解決策が見つかりません。
ご提案やアドバイスをいただければ幸いです。
私のラップトップには、Intel UHD Graphics 630 と NVIDIA GeForce GTX 1050 Mobile の 2 つのグラフィック カードがあります。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」)
- PATH変数にcudaバイナリを追加しました
その後、再起動してドライバーを確認してみました。
$ 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)
**追加情報**
OS:
$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
ギリシャ:
$ 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