手順1と2はUbuntuの手順と同じです

1.Debianがグラフィックボードを認識しているか確認

1
2
3
$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)

2.nouveauがオンになっていたら無効にする

lsmodして何か表示されたらnouveauを無効にします(何も表示されなければ3へ)

1
2
3
4
5
6
7
8
9
10
11
// 何か表示されたらnouveauが有効になってる
$ lsmod | grep -i nouveau
nouveau 2179072 3
mxm_wmi 16384 1 nouveau
wmi 28672 2 mxm_wmi,nouveau
ttm 131072 1 nouveau
drm_kms_helper 208896 1 nouveau
drm 495616 6 drm_kms_helper,ttm,nouveau
i2c_algo_bit 16384 1 nouveau
video 45056 1 nouveau
button 16384 1 nouveau
1
2
3
4
// ファイルがなければ作成
$ sudo vim /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
1
2
3
// initramfsの更新をして再起動
$ sudo update-initramfs -u
$ sudo reboot

3. インストール

1
2
3
4
5
6
7
8
9
10
11
// sources.listにtestingを追加
echo 'deb http://deb.debian.org/debian/ testing main non-free contrib' >> /etc/apt/sources.list
echo 'deb http://deb.debian.org/debian/ unstable main non-free contrib' >> /etc/apt/sources.list
echo 'deb http://deb.debian.org/debian/ experimental main non-free contrib' >> /etc/apt/sources.list

// デフォルトをstableにする
echo 'APT::Default-Release "stable";' >> /etc/apt/apt.conf.d/00mydefaultrelease

// インストール
sudo apt update
sudo apt install -t experimental nvidia-driver nvidia-smi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 確認
$ nvidia-smi
Fri Mar 13 22:14:51 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: N/A |
|-------------------------------+----------------------+----------------------+
| 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 On | 00000000:01:00.0 Off | N/A |
| 40% 24C P8 N/A / 75W | 84MiB / 1999MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 584 G /usr/lib/xorg/Xorg 39MiB |
| 0 612 G /usr/bin/gnome-shell 41MiB |
+-----------------------------------------------------------------------------+

4. CUDAも使う場合(任意)

1
$ sudo apt -t experimental install nvidia-cuda-toolkit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ nvidia-smi
Fri Mar 13 22:38:57 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| 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 On | 00000000:01:00.0 Off | N/A |
| 40% 24C P8 N/A / 75W | 203MiB / 1999MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 584 G /usr/lib/xorg/Xorg 18MiB |
| 0 612 G /usr/bin/gnome-shell 42MiB |
| 0 1670 G /usr/lib/xorg/Xorg 39MiB |
| 0 1836 G /usr/bin/gnome-shell 98MiB |
+-----------------------------------------------------------------------------+