// このコマンドを実行して何か表示されたらnouveauが有効になっている $ lsmod | grep -i nouveau nouveau 2433024 4 i2c_algo_bit 16384 1 nouveau drm_display_helper 184320 1 nouveau drm_ttm_helper 16384 1 nouveau ttm 94208 2 drm_ttm_helper,nouveau drm_kms_helper 204800 2 drm_display_helper,nouveau drm 614400 8 drm_kms_helper,drm_display_helper,drm_ttm_helper,ttm,nouveau mxm_wmi 16384 1 nouveau video 65536 2 asus_wmi,nouveau wmi 36864 5 video,asus_wmi,wmi_bmof,mxm_wmi,nouveau button 24576 1 nouveau
nouveauが有効になっていた場合、以下の手順で無効化します
1 2
// ファイルが無ければ新規作成 $ sudo vim /etc/modprobe.d/blacklist-nouveau.conf
blacklist-nouveau.conf に以下の通り記述
1 2 3
# nouveauを無効にする blacklist nouveau options nouveau modeset=0
変更内容を反映して再起動
1 2 3 4 5
// initramfsの更新 $ sudo update-initramfs -u
// 再起動 $ sudo reboot
再起動後、もう一度 lsmod | grep -i nouveau を実行して、nouveauが無効化されているか確認する
1
$ lsmod | grep -i nouveau
Nvidia製のドライバをインストール
設定: apt/source.list
1
$ sudo vim /etc/apt/sources.list
contrib non-free を追加します
1 2
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
Wed Feb 21 21:10:50 2024 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.0 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A | | 30% 25C P8 13W / 180W | 27MiB / 4096MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 747 G /usr/lib/xorg/Xorg 11MiB | | 0 N/A N/A 804 G /usr/bin/sddm-greeter 11MiB | +-----------------------------------------------------------------------------+
$ docker run --rm --gpus all nvidia/cuda:12.1.1-runtime-ubuntu22.04 nvidia-smi ========== == CUDA == ==========
CUDA Version 12.1.1
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License. By pulling and using the container, you accept the terms and conditions of this license: https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
Wed Feb 21 12:14:59 2024 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A | | 30% 25C P8 13W / 180W | 27MiB / 4096MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| +-----------------------------------------------------------------------------+