터미널에서 내 하드웨어에 설치된 드라이버를 찾습니다.
$ sudo lshw -C display
oem@swift:~/workspace/code/vscode$ sudo lshw -c display
[sudo] password for oem:
*-display
description: VGA compatible controller
product: GP104 [GeForce GTX 1070]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
logical name: /dev/fb0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom fb
configuration: depth=32 driver=nouveau latency=0 resolution=3840,2160
resources: irq:138 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff
검색결과 모델은 GP104이며, GeForce GTX 1070 그래픽 카드 시리즈입니다.
다음 명령어를 사용하여 그래픽카드에 적합한 드라이버를 검색할 수 있습니다.
$ sudo ubuntu-drivers devices
oem@swift:~/workspace/code/vscode$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B81sv000010DEsd0000119Dbc03sc00i00
vendor : NVIDIA Corporation
model : GP104 [GeForce GTX 1070]
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-510 - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-525-server - distro non-free
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-525 - distro non-free recommended
driver : nvidia-driver-515-server - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-515 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
드라이버중 추천해주는 모델을 설치합니다.
$ sudo apt-get install nvidia-driver-525
oem@swift:~/workspace/code/vscode$ sudo apt-get install nvidia-driver-525
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
libffi7
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
cpp-12 dkms gcc-12 libasan8 libatomic1:i386 libbsd0:i386 libdrm-amdgpu1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386
libelf1:i386 libexpat1:i386 libffi8:i386 libgcc-12-dev libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386 libglvnd0:i386 libglx-mesa0:i386
libglx0:i386 libicu70:i386 libllvm13:i386 libmd0:i386 libnvidia-cfg1-525 libnvidia-common-525 libnvidia-compute-525 libnvidia-compute-525:i386
libnvidia-decode-525 libnvidia-decode-525:i386 libnvidia-egl-wayland1 libnvidia-encode-525 libnvidia-encode-525:i386 libnvidia-extra-525
libnvidia-fbc1-525 libnvidia-fbc1-525:i386 libnvidia-gl-525 libnvidia-gl-525:i386 libsensors5:i386 libstdc++6:i386 libtinfo6:i386 libtsan2 libvdpau1
libvulkan1:i386 libwayland-client0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386
libxcb-present0:i386 libxcb-randr0:i386 libxcb-shm0:i386 libxcb-sync1:i386 libxcb-xfixes0:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386
libxfixes3:i386 libxml2:i386 libxnvctrl0 libxshmfence1:i386 libxxf86vm1:i386 mesa-vdpau-drivers mesa-vulkan-drivers:i386 nvidia-compute-utils-525
nvidia-dkms-525 nvidia-kernel-common-525 nvidia-kernel-source-525 nvidia-prime nvidia-settings nvidia-utils-525 pkg-config screen-resolution-extra
vdpau-driver-all xserver-xorg-video-nvidia-525 zlib1g:i386
Suggested packages:
gcc-12-locales menu gcc-12-multilib gcc-12-doc lm-sensors:i386 libvdpau-va-gl1
Recommended packages:
libgl1-amber-dri:i386
The following NEW packages will be installed:
cpp-12 dkms gcc-12 libasan8 libatomic1:i386 libbsd0:i386 libdrm-amdgpu1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libedit2:i386
libelf1:i386 libexpat1:i386 libffi8:i386 libgcc-12-dev libgl1:i386 libgl1-mesa-dri:i386 libglapi-mesa:i386 libglvnd0:i386 libglx-mesa0:i386
libglx0:i386 libicu70:i386 libllvm13:i386 libmd0:i386 libnvidia-cfg1-525 libnvidia-common-525 libnvidia-compute-525 libnvidia-compute-525:i386
libnvidia-decode-525 libnvidia-decode-525:i386 libnvidia-egl-wayland1 libnvidia-encode-525 libnvidia-encode-525:i386 libnvidia-extra-525
libnvidia-fbc1-525 libnvidia-fbc1-525:i386 libnvidia-gl-525 libnvidia-gl-525:i386 libsensors5:i386 libstdc++6:i386 libtinfo6:i386 libtsan2 libvdpau1
libvulkan1:i386 libwayland-client0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386
libxcb-present0:i386 libxcb-randr0:i386 libxcb-shm0:i386 libxcb-sync1:i386 libxcb-xfixes0:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386
libxfixes3:i386 libxml2:i386 libxnvctrl0 libxshmfence1:i386 libxxf86vm1:i386 mesa-vdpau-drivers mesa-vulkan-drivers:i386 nvidia-compute-utils-525
nvidia-dkms-525 nvidia-driver-525 nvidia-kernel-common-525 nvidia-kernel-source-525 nvidia-prime nvidia-settings nvidia-utils-525 pkg-config
screen-resolution-extra vdpau-driver-all xserver-xorg-video-nvidia-525 zlib1g:i386
0 upgraded, 79 newly installed, 0 to remove and 0 not upgraded.
Need to get 634 MB of archives.
After this operation, 1,872 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 cpp-12 amd64 12.1.0-2ubuntu1~22.04 [63.8 MB]
Get:2 http://kr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libasan8 amd64 12.1.0-2ubuntu1~22.04 [2,455 kB]
Get:3 http://kr.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libtsan2 amd64 12.1.0-2ubuntu1~22.04 [2,477 kB]
.
.
.
Setting up dkms (2.8.7-2ubuntu2.1) ...
Setting up nvidia-dkms-525 (525.78.01-0ubuntu0.22.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Loading new nvidia-525.78.01 DKMS files...
Building for 5.15.0-58-generic
Building for architecture x86_64
Building initial module for 5.15.0-58-generic
Can't load /var/lib/shim-signed/mok/.rnd into RNG
409764DBB37F0000:error:12000079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:106:Filename=/var/lib/shim-signed/mok/.rnd
.+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+............+.........+...+.+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.......+.+.........+...........+....+.........+.........+..+......+..................+....+...+........+....+.....+......+.+...............+...+..+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...+......+.+..+.+.....+.+..............+......+....+.........+..+.+...+...........+......+....+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.............+..+......+...+......+.+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+...+......+...+.....+......+......................+...+.........+..+...+......+....+...+............+..................+.....+.........+.+........+....+..+.+........+....+..+.+.......................+..........+.....+.+.....................+..+.+.....+.........+...+...+.+.....+.........................+...........+....+...+...+..............+.+...+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
Done.
nvidia.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.15.0-58-generic/updates/dkms/
nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.15.0-58-generic/updates/dkms/
nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.15.0-58-generic/updates/dkms/
nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.15.0-58-generic/updates/dkms/
nvidia-peermem.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.15.0-58-generic/updates/dkms/
depmod....
Setting up libnvidia-encode-525:i386 (525.78.01-0ubuntu0.22.04.1) ...
Setting up libglx-mesa0:i386 (22.0.5-0ubuntu0.3) ...
Setting up libglx0:i386 (1.4.0-1) ...
Setting up libgl1:i386 (1.4.0-1) ...
Setting up nvidia-driver-525 (525.78.01-0ubuntu0.22.04.1) ...
Setting up libnvidia-fbc1-525:i386 (525.78.01-0ubuntu0.22.04.1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for initramfs-tools (0.140ubuntu13.1) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-58-generico
재부팅하고 설치 결과를 확인합니다. 아래와 같은 화면으로 smi 정보가 표시되어야 정상적으로 설치가 된 것입니다.
$ nvidia-smi
oem@swift:~$ nvidia-smi
Thu Jan 26 09:28:44 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.78.01 Driver Version: 525.78.01 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 ... Off | 00000000:01:00.0 On | N/A |
| 28% 44C P0 34W / 151W | 843MiB / 8192MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1268 G /usr/lib/xorg/Xorg 480MiB |
| 0 N/A N/A 1440 G /usr/bin/gnome-shell 159MiB |
| 0 N/A N/A 2794 C+G ...283084608530478618,131072 166MiB |
+-----------------------------------------------------------------------------+
728x90
'엔지니어링 > 임베디드' 카테고리의 다른 글
OPKG 사용법 (0) | 2021.05.29 |
---|---|
우분투 리눅스에서 Could not get lock /var/lib/dpkg/lock-frontend 에러 해결방법 (0) | 2021.03.14 |
[PX4 개발자] Ubuntu 18.04에 ROS(Melodic)/Gazebo 설치하기 (0) | 2020.11.25 |
Betaflight 이클립스 개발환경 설정 - 2 (0) | 2020.04.15 |
Betaflight 이클립스 개발환경 설정 - 1 (0) | 2020.04.15 |
댓글