ubuntuにnvidiaドライバーを淹れてみる.
OS提供のドライバーとnvidia提供のドライバがある.
root@ubuntu22:~# cat /etc/os-release
:
VERSION="22.04.2 LTS (Jammy Jellyfish)"
:
root@ubuntu22:~#
まずはOS提供のドライバ.
root@ubuntu22:~# apt update
root@ubuntu22:~# ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:16.0/0000:0b:00.0 ==
modalias : pci:v000010DEd00002531sv000010DEsd0000151Dbc03sc00i00
vendor : NVIDIA Corporation
driver : nvidia-driver-525 - distro non-free
driver : nvidia-driver-535-server-open - distro non-free recommended
driver : nvidia-driver-535-server - distro non-free
driver : nvidia-driver-525-server - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-525-open - distro non-free
driver : nvidia-driver-535 - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-535-open - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
(略
root@ubuntu22:~# apt install nvidia-driver-535
535ではなく525を入れるなら(上書き)
root@ubuntu22:~# apt install nvidia-driver-525
root@ubuntu22:~# reboot
これで525にはなる.
ドライバのインストール先は「/lib/modules/5.15.0-78-generic/updates/dkms/」
dkmsに対応って事らしい
root@ubuntu22:~# ls -l /lib/modules/5.15.0-78-generic/updates/dkms/
total 66568
-rw-r--r-- 1 root root 129063 Nov 21 00:02 nvidia-drm.ko
-rw-r--r-- 1 root root 1624535 Nov 21 00:02 nvidia-modeset.ko
-rw-r--r-- 1 root root 20759 Nov 21 00:02 nvidia-peermem.ko
-rw-r--r-- 1 root root 2507711 Nov 21 00:02 nvidia-uvm.ko
-rw-r--r-- 1 root root 63869791 Nov 21 00:02 nvidia.ko
root@ubuntu22:~# dkms status
nvidia/525.125.06, 5.15.0-78-generic, x86_64: installed
root@ubuntu22:~#
削除
apt purge nvidia-*
これでいいみたいだが、、、nvidia docker関係も削れるそうな..