How to disable the Nouveau driver and install the Nvidia driver in RHEL 7
https://access.redhat.com/solutions/1155663
환경
- Red Hat Enterprise Linux 7
- Grub2
- Nouveau Driver
- Nvidia Driver
문제
- Disable Nouveau driver in RHEL 7
- Install Nvidia driver in RHEL 7
해결
This information is provided for your convenience. Use of the third party Nvidia graphics driver is outside of the Production Support Scope of Coverage
1. Acquire the Nvidia driver:
- Download the appropriate driver for your graphics controller from http://www.nvidia.com
- Ensure that this driver is saved to the local disk of the target system. Installing from an external device, such as a flash drive, has been known to cause issues up to and including installation failure.
2. Edit Grub2 to blacklist the Nouveau driver:
- Edit
/etc/default/grub
and add the following to theGRUB_CMDLINE_LINUX
line:
modprobe.blacklist=nouveau
- Rebuild the grub config and restart the system:
# grub2-mkconfig -o /boot/grub2/grub.cfg
# reboot
- Sometimes even after following the above steps to blacklist
nouveau
module, it is seen loaded at boot.# lsmod | grep -i nouveau
.
Most likely, this gets loaded frominitramfs
.
In such cases, follow How to blacklist nouveau module on Red Hat Enterprise Linux 7? - The driver can not be installed if the X server running on system. So make sure the system is started in text mode(runlevel 3).
3. Install your nvidia driver:
# sh nvidia_filename.run
4. At this point you will need to rebuild initramfs:
- Back up the current initramfs
# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
- Build the new one
# dracut /boot/initramfs-$(uname -r).img $(uname -r)
5. Reboot the system:
# reboot
This article may need some revision. On case 01635125, the steps had to be slightly modified in order for the customer to successfully install the drivers:
1) Create the blacklist file:
vi /etc/modprobe.d/blacklist.conf
It should only contain the following line:
blacklist nouveau
That has to be the ONLY thing in the file.
2) Create a new initramfs:
mv /boot/initramfs-uname -r
.img /boot/initramfs-uname -r
.img.bak
dracut -v /boot/initramfs-uname -r
.img uname -r
3) Reboot the system into runlevel 3
init 3
4) Install the NVIDIA driver
5) Reboot
How to uninstall proprietary "Nvidia" module and switch back to Red Hat shipped "Nouveau" module ?
https://access.redhat.com/solutions/421683
환경
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Proprietary
Nvidia
module ( nvidia.ko ) - Red Hat shipped
Nouveau
module ( nouveau.ko ) - xorg-x11-drv-nouveau
문제
- What are the steps required to uninstall proprietary Nvidia module and switch back to Red Hat shipped Nouveau module ?
- How to set correct screen resolution with Nouveau driver ?
해결
Note: Before replacing nVIDIA proprietary driver with nouveau driver ensure that hardware is certified to run RHEL-6.X. The xorg-x11-drv-nouveau package shipped with RHEL-6.X doesn't support some nVIDIA Graphics chip that are too old. Use hardware certification link to check all certified hardware's.
Note: Steps for RHEL 7 can be found at How to disable the Nouveau driver and install the Nvidia driver in RHEL 7
Step 1: Start the procedure of cleaning NVIDIA proprietary driver.
a) Execute nvidia installation script with --uninstall argument.
Eg:
# ./Nvidia-???.run --uninstall
b) Remove and re-install "mesa-libGL" package.
Eg:
# rpm -ev --nodeps mesa-libGL
# yum install -y mesa-libGL
c) Remove or rename /etc/X11/xorg.conf file.
Eg:
# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.save
Step 2: Installation of NVIDIA proprietary driver blacklists nouveau driver hence during post un-installation of NVIDIA driver go through the following check list.
a1) (RHEL 6 and prior)Remove kernel parameters "rdblacklist=nouveau nomodset=0" from /boot/grub/grub.conf file
- Basically remove any commands that blacklist or disable nouveau and set modeset to "0" or "off"
a2)(RHEL7) Remove the kernel parameters "rd.blacklist.nouveau" "nouveau.modeset=0" and similar arguments from the GRUB_CMDLINE_LINUX
line in /etc/default/grub
- Rebuild your grub.cfg file with the command: grub2-mkconfig -o /boot/grub2/grub.cfg
on legacy installations, or grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
for EFI installations
b) Remove or comment the line "blacklist nouveau" from /etc/modprobe.d/blacklist.conf file.
Eg:
# vim /etc/modprobe.d/blacklist.conf
# blacklist nouveau
c) Remove files inside /etc/modprobe.d/
which belong to nvidia for e.g files like nvidia-blacklist*.conf
d) Reboot the system.
Eg:
# reboot
Step 3: Verify nouveau module is properly loaded.
a) Verify nouveau module is loaded.
Eg:
# lsmod | grep "nouveau"
b) If nouveau module is not present in the result of lsmod command output then load it manually.
- You may also have to reinstall the 'xort-x11-drv-nouveau' package. Please ensure that you are installing the version of this package that corresponds to the version of your xorg server and kernel version.
Eg:
# modprobe -i nouveau
Step 4: Verify correct screen resolution.
a) Check the maximum screen resolution supported by the hardware chip.
Eg:
# xrandr | grep "max"
b) To get more information about monitors attached and screen resolutions.
Eg:
# xrandr
c) To get names of connected displays.
# xrandr | grep -i "connected" | grep -v "disconnected" | cut -d " " -f1
d) Add custom screen resolution with xrandr if its not detected by default.
Eg: To set screen resolution of 1920 x 1200
pixels, execute the following command.
# gtf 1920 1200 60.0
e) Copy whole string after Modeline
from the result of above command and do like this;
Eg:
# xrandr --newmode "1920x1200_60.00" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -HSync +Vsync
# xrandr --addmode DVI-I-1 1920x1200_60.00
# xrandr --output DVI-I-1 --mode 1920x1200_60.00
f) After above step try switch modes to any default mode detected and then to the required mode.
Eg:
# xrandr -s 1024x768
# xrandr -s 1920x1200
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
How to remove Nvidia drivers and switch back to nouveau for Red Hat Enterprise Linux 7?
How to remove Nvidia drivers and switch back to nouveau for Red Hat Enterprise Linux 7?
환경
- Red Hat Enterprise Linux 7
- Nvidia
문제
- How to
remove nvidia drivers
?
해결
- Remove nouveau related parameters from grub cmd line:-
Edit /etc/default/grub and remove the following from the GRUB_CMDLINE_LINUX line
rd.driver.blacklist=nouveau nouveau.modeset=0
- Rebuild the grub
#grub2-mkconfig -o /boot/grub2/grub.cfg
- Run the nvidia installation script with uninstall option
#./Nvidia-???.run --uninstall
- Rebuilding the initramfs for nouveau
#mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-preavous.img
#dracut /boot/initramfs-$(uname -r).img $(uname -r)
- Reinstalling the mesa-libgl packages
#yum reinstall mesa-libGL
- Remove or rename /etc/X11/xorg.conf file.
# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.save
- Reboot the system.
#reboot
Note:- Remove any configuration you have to block the nouveau from /etc/modprobe.d
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
'IBM PowerLinux > REDHAT' 카테고리의 다른 글
RHV RHVM 관련 (0) | 2018.08.07 |
---|---|
Hot add, remove, rescan of SCSI devices on Linux (0) | 2018.07.09 |
CentOS 7 bonding nmcli (0) | 2017.11.01 |
gnome login screen id (0) | 2016.08.11 |
Linux semaphore (0) | 2016.07.11 |