#author("2024-06-11T16:56:08+09:00","default:honma","honma") #author("2024-06-11T17:06:25+09:00","default:honma","honma") * ubuntu22.04にnvidia-driver-390の導入 [#a28bc48e] 自宅のWindows10マシンが昇天したので、Ubuntuマシンとして人生を再スタート。~ メインで使用していたノートパソコンはNVIDIA搭載なので、みんなもちゃちゃっと入れているメーカードライバを導入してみる。 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy はい、ubuntu 22.04 となっていることを確認。~ 次はPCIデバイスの確認。 $ lspci -nn 00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09) 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09) 00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) 00:1c.2 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 [8086:1e14] (rev c4) 00:1c.3 PCI bridge [0604]: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 4 [8086:1e16] (rev c4) 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) 00:1f.0 ISA bridge [0601]: Intel Corporation HM77 Express Chipset LPC Controller [8086:1e57] (rev 04) 00:1f.2 RAID bus controller [0104]: Intel Corporation 82801 Mobile SATA Controller [RAID mode] [8086:282a] (rev 04) 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller [8086:1e22] (rev 04) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 650M] [10de:0fd1] (rev a1) 08:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01) 0a:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 2230 [8086:0887] (rev c4) 0b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 07) 詳細情報を確認。~ nouveau が現在のドライバ。 $ lspci -d 10de:0fd1 -v 01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M] (rev a1) (prog-if 00 [VGA controller]) DeviceName: NVIDIA N13P-GT Subsystem: Hewlett-Packard Company GK107M [GeForce GT 650M] Flags: bus master, fast devsel, latency 0, IRQ 33 Memory at d2000000 (32-bit, non-prefetchable) [size=16M] Memory at a0000000 (64-bit, prefetchable) [size=256M] Memory at b0000000 (64-bit, prefetchable) [size=32M] I/O ports at 4000 [size=128] Expansion ROM at b2000000 [disabled] [size=512K] Capabilities: <access denied> Kernel driver in use: nouveau Kernel modules: nvidiafb, nouveau 推奨ドライバの確認。 $ ubuntu-drivers devices == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00000FD1sv0000103Csd0000181Bbc03sc00i00 vendor : NVIDIA Corporation model : GK107M [GeForce GT 650M] driver : nvidia-driver-418-server - distro non-free driver : nvidia-driver-390 - distro non-free recommended driver : xserver-xorg-video-nouveau - distro free builtin ということで、nvidia-driver-390を導入することになるのですが... **カーネルのダウングレード [#m9d35306] 結論から書くと、カーネルをlinux-6.2系にダウングレードしないとはインストールできない。~ ニュースソースは [[new kernel 6.5.0-14(22.04) can not compile NVIDIA display card driver:https://ubuntuforums.org/showthread.php?t=2494273&page=2]]から。 Old outdated work-around Legacy Drivers: Use 6.2.0 series kernels... ということで、カーネルのダウングレードの実施。 $ uname -r 6.5.0-35-generic ということで、6.2系の導入をまずは実施。 $ sudo apt search linux-image-6.2.*-generic linux-image-6.2.0-39-generic/jammy-updates,jammy-security 6.2.0-39.40~22.04.1 amd64 Signed kernel image generic aptでインストール。 $ sudo apt install linux-headers-6.2.0-39-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-39-generic 6.5系カーネルの削除。 $ sudo apt remove --purge linux-headers-6.5.0-35-generic linux-image-6.5.0-35-generic linux-modules-6.5.0-35-generic linux-modules-extra-6.5.0-35-generic 他もいないか確認。 $ dpkg -l | grep linux-image ii linux-image-5.15.0-25-generic 5.15.0-25.25 amd64 Signed kernel image generic hi linux-image-6.2.0-39-generic 6.2.0-39.40~22.04.1 amd64 Signed kernel image generic rc linux-image-6.5.0-25-generic 6.5.0-25.25~22.04.1 amd64 Signed kernel image generic rc linux-image-6.5.0-27-generic 6.5.0-27.28~22.04.1 amd64 Signed kernel image generic ii linux-image-6.5.0-28-generic 6.5.0-28.29~22.04.1 amd64 Signed kernel image generic 6.5.0-28 もサヨウナラ...。 $ sudo apt remove --purge linux-headers-6.5.0-28-generic linux-image-6.5.0-28-generic linux-modules-6.5.0-28-generic linux-modules-extra-6.5.0-28-generic 再度、確認。 $ dpkg -l | grep linux-image ii linux-image-5.15.0-25-generic 5.15.0-25.25 amd64 Signed kernel image generic hi linux-image-6.2.0-39-generic 6.2.0-39.40~22.04.1 amd64 Signed kernel image generic rc linux-image-6.5.0-25-generic 6.5.0-25.25~22.04.1 amd64 Signed kernel image generic rc linux-image-6.5.0-27-generic 6.5.0-27.28~22.04.1 amd64 Signed kernel image generic 用心のため、カーネルをアップデートしないようにオマジナイ。 $ sudo apt-mark hold linux-headers-6.2.0-39-generic linux-image-6.2.0-39-generic linux-modules-6.2.0-39-generic linux-modules-extra-6.2.0-39-generic これで、再起動してlinux-6.2系で起動。 ** nvidia-driver-390のインストール [#u6956555] まずは、カーネルバージョンの確認。 $ uname -r 6.2.0-39-generic nouveau の無効化。 $ sudo nano /etc/modprobe.d/blacklist-nouveau.conf $ cat /etc/modprobe.d/blacklist-nouveau.conf blacklist nouveau options nouveau modeset=0 initramfsの更新 $ sudo update-initramfs -u ppaを追加してaptから導入 $ sudo add-apt-repository ppa:graphics-drivers/ppa $ sudo apt update $ sudo apt install nvidia-driver-390 これで、すんなり導入できたはず。~ 一応、再起動してから NVIDIAのシステム管理インターフェイスで確認。 $ nvidia-smi Tue Jun 11 14:06:37 2024 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 390.157 Driver Version: 390.157 | |-------------------------------+----------------------+----------------------+ | 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 GT 650M Off | 00000000:01:00.0 N/A | N/A | | N/A 43C P8 N/A / N/A | 46MiB / 1999MiB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+ 一応、lspciでも確認。 $ lspci -d 10de:0fd1 -v 01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M] (rev a1) (prog-if 00 [VGA controller]) DeviceName: NVIDIA N13P-GT Subsystem: Hewlett-Packard Company GK107M [GeForce GT 650M] Flags: bus master, fast devsel, latency 0, IRQ 35 Memory at d2000000 (32-bit, non-prefetchable) [size=16M] Memory at a0000000 (64-bit, prefetchable) [size=256M] Memory at b0000000 (64-bit, prefetchable) [size=32M] I/O ports at 4000 [size=128] Expansion ROM at b2000000 [virtual] [disabled] [size=512K] Capabilities: <access denied> Kernel driver in use: nvidia Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia という感じ。 #htmlinsert(amazon_pc.html);