20
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu18.04にNVIDIAドライバーをインストール

Posted at

Ubuntu18.04でNVIDIAドライバを入れるのがぐっとかんたんになった。

推奨ドライバ確認

まずはUbuntu大先生のおすすめのドライバを確認。

$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000013BBsv000010DEsd00001098bc03sc00i00
vendor   : NVIDIA Corporation
model    : GM107GL [Quadro K620]
driver   : nvidia-340 - distro non-free
driver   : nvidia-driver-390 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

自分のマシンのGPUの型番がmodelに正しく出力されていることを確認。

インストール

以下のコマンドでUbuntu大先生おすすめのドライバをインストール。

$ sudo ubuntu-drivers autoinstall

動作確認

再起動して以下のコマンドを実行。

$ nvidia-smi 
Sun Mar  3 20:49:35 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.77                 Driver Version: 390.77                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro K620         Off  | 00000000:01:00.0  On |                  N/A |
| 34%   47C    P0     2W /  30W |    134MiB /  2000MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1068      G   /usr/lib/xorg/Xorg                            65MiB |
|    0      1208      G   /usr/bin/gnome-shell                          66MiB |
+-----------------------------------------------------------------------------+

神かよ。

参考文献

20
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?