RHEL/CentOS 7 and NVidia Drivers

Red Hat Enterprise Linux (RHEL) and the Community Enterprise Operating System (CentOS), the free alternative to RHEL most faithful to it, have been around for quite some time. They have increased in popularity over the last decade, both for Red Hat’s stellar technical support and for it’s open source nature which allows end user modification at all levels of the OS.

The most recent release, version 7, has a large number of the latest updates across the entire Linux community. This has both huge benefits and huge drawbacks. One simultaneous benefit/drawback is that 7 supports the open source NVidia driver, Nouveau, by default. For someone who just wants a 3D accelerated desktop experience this is wonderful news. For someone who needs to run applications that severely tax the video card, this is another obstacle to avoid before getting to work. Unfortunately, while the Nouveau driver provides acceptable performance, it does not use the full capabilities of the video card because, as of the writing of this article, the Nouveau drivers cannot dynamically change the clock speed. Since NVidia cards typically boot at their most power saving mode, this does not bode well for Linux power users.

All that to say that the Nouveau drivers need to be disabled prior to installing the NVidia drivers, which is a difficult task this time around. I just spent the worst 6 hours of my professional life trying to figure this one out, so let me save you the grief.

This process is made more difficult than previous RHEL versions because there have been a number of improvements this time around. Initialization and system management is performed by systemd instead of the old init system, so commands for reducing the system state have changed. Grub2 is used for the boot loader, which requires more steps when blacklisting the Nouveau drivers. Version 7 supports EFI booting, so if that method is selected, Grub2 will load differently. And lastly a «new» interactive bootsplash, called Plymouth, is used to save the user the confusion of mentally processing the boot messages when performing interactive tasks such as entering an encryption key passphrase. This guide will probably work fine on most other RHEL alternatives, but make sure you backup everything as you go, just in case.

And without further ado:

  1. Disable X Windows
    a) open a terminal and «su» or «sudo -i»
    b) ln -fs /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
    c) reboot
  2. Remove Nouveau
    a) rpm -e xorg-x11-drivers xorg-x11-drv-nouveau
  3. Blacklist Nouveau
    a) edit /etc/modprobe.d/blacklist.conf and add lines:
    blacklist nouveau
    options nouveau modeset=0
    b) edit /etc/default/grub and append to GRUB_CMDLINE_LINUX:
    rdblacklist=nouveau nouveau.modeset=0
    -If you have an encrypted root drive, remove «rhgb» from GRUB_CMDLINE_LINUX. This will allow you to interact with the encryption passphrase prompt, since Plymouth doesn’t seem to run without a framebuffer friendly video driver loaded.
    c) Two options for booting now days are BIOS and EFI
    -If you chose BIOS boot run this command:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    -If EFI boot on CentOS:
    grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
    -If EFI boot on RHEL:
    grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
  4. Reboot and Install NVidia Driver
    -This process has not changed from previous versions. Just execute the binary installer you downloaded and follow the prompts (usually just hitting enter).
  5. Enable X Windows (If Desired)
    -Some like to execute startx after logging in at the terminal prompt… I don’t
    a) ln -fs /lib/systemd/system/graphical.target /etc/systemd/system/default.target
    b) reboot

Something else that hasn’t changed from previous versions of RHEL is that you will need to rerun the NVidia Drivers Installer every time you update your kernel. But don’t worry! I’m sure Nouveau will get that clock speed modifier working by version 7.1 of Red Hat Enterprise Linux. My fingers are certainly crossed in anticipation!

Источник https://www.linkedin.com/today/post/article/20140808222919-219659043-rhel-centos-7-and-nvidia-drivers

Запись опубликована в рубрике *CentOS. Добавьте в закладки постоянную ссылку.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Я не спамер This plugin created by Alexei91