1. cmos의 secure boot option은 disable 해둘것 (간혹 window boot option의 상세항목에 있을수있음)
2. centos7의 minimal install을 이용하면 nouveau에대한 blacklist를 굳이 만질 필요가 없다.
3. 2번의 nouveau blacklist는 반드시 해줘야하지만 부팅디스크넣고 설치시 e option을 통해 nomodeset을 사용하면
nouveau는 설치되지않는다. nomodeset은 quiet로 끝나는 문장 뒷부분에 한칸띄고 넣자. 그후 아래의 설치법을따랐다. dkms 설치는 필수이다.
How to install Nvidia driver on CentOS 7 Linux
last updated December 12, 2018 in CategoriesCentOS, Hardware, Linux
Iam a new CentOS 7 Linux desktop user. I need to use Nvidia software for my video editing software and other purposes. How do I install the Nvidia driver on CentOS 7 Linux?
Introduction: Nvidia drivers used for gaming, video editing, visualization, artificial intelligence and more. This page shows how to install Nvidia GPU drivers on a CentOS 7 Linux desktop.
How to install Nvidia driver on CentOS 7 Linux
The procedure to install proprietary Nvidia GPU Drivers on CentOS 7 Linux is as follows:
- Update your system running yum command
- Blacklist nouveau driver
- Download the Nvidia driver for CentOS 7
- Install required software to install the proprietary Nvidia driver on CentOS
- Disable Nouveau driver in CentOS 7
- Switch to CentOS 7 to text mode
- Run the NVIDIA driver installer
- Reboot the CentOS 7 to use the NVIDIA driver
Let us see all steps in details for installing NVIDIA drivers on CentOS 7.
How to update CentOS 7 desktop
It is essential that you use the latest Linux kernel and other drivers. Open the terminal application and run:
$ sudo yum update
How to find out info about the Nvidia GPU on CentOS 7
Execute the lspci command with grep command
$ lspci | grep -i --color 'vga\|3d\|2d'
OR
$ sudo lshw -class display
From the above outputs, it is clear that I have NVIDIA Corporation GK104GLM [Quadro K5000M] and the nouveau driver loaded for the device. For more info see “Linux Find Out Graphics Card Installed In My System“.
Download the NVIDIA driver
Visit this page and grab the drivers for your Linux system:
One must install kernel-devel and gcc kernel on a CentOS 7:How to install kernel-devel and other software
$ sudo yum group install "Development Tools"
$ sudo yum install kernel-devel
Turn on and install EPEL Repo on a CentOS 7.x
You must install dkms for registering the NVIDA kernel module with DKMS:
$ sudo yum -y install epel-release
$ sudo yum -y install dkms
How to disable nouveau driver
If the nouveau kernel driver used by the CentOS 7, installer would not work as this driver is incompatible with the NVIDIA driver and it must be disabled. Edit a file named /etc/default/grub as follows:
$ sudo vi /etc/default/grub
Append the following to the GRUB_CMDLINE_LINUX line:
modprobe.blacklist=nouveau
Save and close the file. Rebuild the grub config and restart the system as per BIOS or UEFI system.
BIOS USER run this
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
UEFI USER run this
$ sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Reboot the Linux box now:
$ sudo reboot
How to switch to CentOS 7 to text mode from GUI
To install the Nvidia driver switch to console mode. The Nvidia installer refuse to work if you are running from GUI:
You appear to be running an X server; please exit X before installing.
Hence, it is necessary to switch to text mode. Open a terminal Window and run:
$ sudo systemctl isolate multi-user.target
Installing Nvidia driver on CentOS 7
Log in and type the following command:
$ sudo bash NVIDIA-Linux-x86_64-410.78.run
Installing Nvidia driver in CentOS 7
Just follow on-screen instructions. Once installed reboot the machine again:
$ sudo reboot
Verification
You must log in and run the nvidia-settings from GUI to verify that everything working fine:
Run the following nvidia-smi command to see what apps are using the NVIDIA GPU on CentOS 7 box:
$ nvidia-smi
Conclusion
This page demonstrated how to disable the open-source Nouveau driver and install the proprietary Nvidia driver in CentOS 7 Linux.
4. 1의 이유로 dkms설치후 nvidia-driver 설치과정중 nvidia-drm unable to load라는 메시지와 함께 설치 오류가 날수있음
5. 2에서 minimal install 후 xfce 같은 가벼운 gui를 설치하는것을 권장 아래의 line을 실행
[root@centos7 ~]# yum install epel-release -y
[root@centos7 ~]# yum groupinstall "Server with GUI" -y
[root@centos7 ~]# yum groupinstall "Xfce" -y
Start The GUI
systemctl get-default
multi-user.target -> Text mode
systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target. Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
change to GUI
systemctl isolate graphical.target
Removing Xfce
If you’ve installed the GUI on a server and realized that it was a terrible mistake, don’t worry! We can also undo this by simply using yum to remove the “Xfce Desktop” package group
[root@centos7 ~]# yum groupremove "Xfce"