리눅스

본문 바로가기
사이트 내 전체검색


리눅스
리눅스

13. Cent OS 7.x Linux Nvidia 그래픽 드라이버 설치

페이지 정보

작성자 관리자 댓글 0건 조회 719회 작성일 22-07-08 17:06

본문

13. Cent OS 7.x Linux Nvidia 그래픽 드라이버 설치

1. yum 업데이트


# yum update



2. lshw 설치

그래픽 카드 모델 확인


 


# yum install lshw


해당 명령어로 모델 확인

# lshw -numeric -C display


[root@localhost ~]# lshw -numeric -C display

  *-display

       description: VGA compatible controller

       product: GP102 [GeForce GTX 1080 Ti] [10DE:1B06]

       vendor: NVIDIA Corporation [10DE]

       physical id: 0

       bus info: pci@0000:02:00.0

       version: a1

       width: 64 bits

       clock: 33MHz

       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom

       configuration: driver=nouveau latency=0

       resources: iomemory:3bf0-3bef iomemory:3bf0-3bef irq:104 memory:91000000-91ffffff memory:3bfe0000000-3bfefffffff memory:3bff0000000-3bff1ffffff ioport:2000(size=128) memory:92080000-920fffff

  *-display

       description: VGA compatible controller

       product: G200eR2 [102B:534]

       vendor: Matrox Electronics Systems Ltd. [102B]

       physical id: 0

       bus info: pci@0000:09:00.0

       version: 01

       width: 32 bits

       clock: 33MHz

       capabilities: pm vga_controller bus_master cap_list rom

       configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16

       resources: irq:17 memory:90000000-90ffffff memory:93000000-93003fff memory:92800000-92ffffff

  *-display

       description: VGA compatible controller

       product: GP102 [GeForce GTX 1080 Ti] [10DE:1B06]

       vendor: NVIDIA Corporation [10DE]

       physical id: 0

       bus info: pci@0000:84:00.0

       version: a1

       width: 64 bits

       clock: 33MHz

       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom

       configuration: driver=nouveau latency=0

       resources: iomemory:3ff0-3fef iomemory:3ff0-3fef irq:106 memory:c8000000-c8ffffff memory:3ffe0000000-3ffefffffff memory:3fff0000000-3fff1ffffff ioport:8000(size=128) memory:c9080000-c90fffff



driver 부분에 nouveau latency=0 이면 블랙리스트를 등록 해주어야 한다.


GPU 드라이버 설치하면 nvidia latency=0로 변경


3. 필수 패키지 설치

# yum groups mark install -y "Development Tools"

# yum install -y kernel-devel

# yum install -y epel-release

# yum install -y dkms


"Development Tools" - 개발 툴 라이브러리 그룹 설치


kernel-devel - 커널패키지 대해 빌드를 모듈하기 위해 커널헤더와 충분한 파일을 제공

epel-release - 리눅스 추가 패키지 설치

dkms - nvidia 모듈을 생성


 


4. nouveau driver Disable진행


# vi /etc/default/grub


GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"

GRUB_DEFAULT=saved

GRUB_DISABLE_SUBMENU=true

GRUB_TERMINAL_OUTPUT="console"

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet nouveau.modeset=0"

GRUB_DISABLE_RECOVERY="true"

~

GRUB_CMDLINE_LINUX 줄에 nouveau.modeset=0 추가




GRUB적용


# grub2-mkconfig -o /boot/grub2/grub.cfg

# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Done이 나오면 제대로 적용



[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-3.10.0-1160.71.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.71.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.62.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.62.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.59.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.59.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.53.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.53.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.49.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.49.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-0-rescue-8fad5d98da744d9d887eda2112c283a3

Found initrd image: /boot/initramfs-0-rescue-8fad5d98da744d9d887eda2112c283a3.img

done

[root@localhost ~]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-3.10.0-1160.71.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.71.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.62.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.62.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.59.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.59.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.53.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.53.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-3.10.0-1160.49.1.el7.x86_64

Found initrd image: /boot/initramfs-3.10.0-1160.49.1.el7.x86_64.img

Found linux image: /boot/vmlinuz-0-rescue-8fad5d98da744d9d887eda2112c283a3

Found initrd image: /boot/initramfs-0-rescue-8fad5d98da744d9d887eda2112c283a3.img

done

[root@localhost ~]# reboot


재부팅 후, lshw 명령어 확인해 nouveau설정 해제 확인.


[root@localhost ~]# lshw -numeric -C display

  *-display UNCLAIMED

       description: VGA compatible controller

       product: GP102 [GeForce GTX 1080 Ti] [10DE:1B06]

       vendor: NVIDIA Corporation [10DE]

       physical id: 0

       bus info: pci@0000:02:00.0

       version: a1

       width: 64 bits

       clock: 33MHz

       capabilities: pm msi pciexpress vga_controller cap_list

       configuration: latency=0

       resources: iomemory:3bf0-3bef iomemory:3bf0-3bef memory:91000000-91ffffff memory:3bfe0000000-3bfefffffff memory:3bff0000000-3bff1ffffff ioport:2000(size=128) memory:92080000-920fffff

  *-display

       description: VGA compatible controller

       product: G200eR2 [102B:534]

       vendor: Matrox Electronics Systems Ltd. [102B]

       physical id: 0

       bus info: pci@0000:09:00.0

       version: 01

       width: 32 bits

       clock: 33MHz

       capabilities: pm vga_controller bus_master cap_list rom

       configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16

       resources: irq:17 memory:90000000-90ffffff memory:93000000-93003fff memory:92800000-92ffffff

  *-display UNCLAIMED

       description: VGA compatible controller

       product: GP102 [GeForce GTX 1080 Ti] [10DE:1B06]

       vendor: NVIDIA Corporation [10DE]

       physical id: 0

       bus info: pci@0000:84:00.0

       version: a1

       width: 64 bits

       clock: 33MHz

       capabilities: pm msi pciexpress vga_controller cap_list

       configuration: latency=0

       resources: iomemory:3ff0-3fef iomemory:3ff0-3fef memory:c8000000-c8ffffff memory:3ffe0000000-3ffefffffff memory:3fff0000000-3fff1ffffff ioport:8000(size=128) memory:c9080000-c90fffff



5. Xorg server 정지

※ Nvidia 그래픽 드라이버 설치시 Xorg server 정지상태여야 설치가능


# systemctl isolate multi-user.target

 

6. 원하는 Nvidia 그래픽 드라이버 설치


드라이버를 검색했습니다.


https://www.nvidia.com/Download/Find.aspx?lang=en-us 





1.PNG


2.PNG


3.PNG


4.PNG


5.PNG

다운로드 링크를 복사하여 리눅스에서 wget으로 다운받는다.



7. Nvidia 그래픽 드라이버 리눅스환경에 설치

wget를 통해 설치 


wget없으면 yum install -y wget 후 설치


[root@localhost ~]# wget https://us.download.nvidia.com/XFree86/Linux-x86_64/515.57/NVIDIA-Linux-x86_64-515.57.run

--2022-07-08 17:12:58--  https://us.download.nvidia.com/XFree86/Linux-x86_64/515.57/NVIDIA-Linux-x86_64-515.57.run

Resolving us.download.nvidia.com (us.download.nvidia.com)... 192.229.232.112, 2606:2800:247:2063:46e:21d:825:102e

Connecting to us.download.nvidia.com (us.download.nvidia.com)|192.229.232.112|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 363365091 (347M) [application/octet-stream]

Saving to: ‘NVIDIA-Linux-x86_64-515.57.run’


100%[======================================>] 363,365,091 27.4MB/s   in 13s


2022-07-08 17:13:11 (26.8 MB/s) - ‘NVIDIA-Linux-x86_64-515.57.run’ saved [363365091/363365091]


[root@localhost ~]#



# sh NVIDIA-Linux-x86_64-450.119.03.run

설치중 모두 Yes를 누르고 설치하시면 설치됩니다.

※ 리눅스 커널 버젼에 맞게 설치하셔야 합니다.

[root@localhost ~]# ls NVIDIA-Linux-x86_64-515.57.run

NVIDIA-Linux-x86_64-515.57.run

[root@localhost ~]# sh NVIDIA-Linux-x86_64-515.57.run

Verifying archive integrity... OK

Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 515.57................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................



6.PNG


7.PNG


8.PNG


9.PNG


10.PNG


11.PNG




8. Nvidia 그래픽 확인

설치된 부분 확인


[root@localhost ~]# nvidia-smi


12.PNG


댓글목록

등록된 댓글이 없습니다.


개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.