LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2015, 05:23 PM   #1
anthony000
LQ Newbie
 
Registered: Apr 2014
Location: RI
Distribution: RHEL 7.6, OpenSUSE 15.1
Posts: 19
Blog Entries: 1

Rep: Reputation: Disabled
How to install nVidia driver from ElRepo for nVidia GeForce GTX645 in RHEL 7.1


These instructions originate from https://www.linkedin.com/pulse/20140...nvidia-drivers, but I modified them slightly for my desktop environment (64-bit HP Envy Phoenix 810-135qe w/Intel i7-4770 and HP ZR2440w monitor, nVidia GeForce GTX645, Red Hat Enterprise Linux 7.1 w/Gnome3).

The following procedures replace the nouveau drivers with kmod-nvidia drivers from ElRepo.

Install the repository ElRepo from: http://elrepo.org/tiki/tiki-index.php

Install the package nvidia-detect from within Applications>SystemTools>Software

From within the terminal, enter the command nvidia-detect.
Example:
[anthony@hp810135qe ~]$ nvidia-detect
Output is...
Probing for supported NVIDIA devices...
[10de:11c4] NVIDIA Corporation GK106 [GeForce GTX 645 OEM]
This device requires the current 346.59 NVIDIA driver kmod-nvidia

For my system the following software packages will apply (yours maybe slightly different, the key is to note the ###.## version identified for your system using nvidia-detect as explained above): kmod-nvidia-346.59-1.el7.elrepo (64-bit), nvidia-x11-drv-32bit-346.59-1.el7.elrepo (64-bit), nvidia-x11-drv-346.59-1.el7.elrepo (64-bit)

Now do the following steps in the sequence indicated:

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

Note: Another way to disable X Windows is to do the following from within the Terminal # systemctl set-default multi-user.target

To later change back to booting into graphical mode, substitute 'graphical.target' for 'multi-user.target' in the above commands.

c) reboot

2. Remove Nouveau

a) rpm -e xorg-x11-drivers xorg-x11-drv-nouveau

Note: Another way to remove Nouveau is to do the following from within the Terminal

$ yum remove xorg-x11-drivers xorg-x11-drv-nouveau xorg-x11-glamor

See http://elrepo.org/tiki/kmod-nvidia which discusses that glamor still causes a conflict with nVidia in RHEL 7

3. Blacklist Nouveau

a) edit /etc/modprobe.d/blacklist.conf and add line:

blacklist nouveau

Note: A way to edit this file is by doing the following:

# vi /etc/modprobe.d/blacklist.conf
(use INSERT key to make changes in vi; add the line

blacklist nouveau

Hit Esc key to escape INSERT mode, then hit SHIFT Z Z to save and exit with the changes. Hitting :q ENTER leaves vi without saving changes.

b) edit /etc/default/grub and append to GRUB_CMDLINE_LINUX:

rd.driver.blacklist=nouveau

Note: A way to edit this file is by doing the following:

# vi /etc/default/grub and append to GRUB_CMDLINE_LINUX:
(use INSERT key to make changes in vi; add the line

rd.driver.blacklist=nouveau

Hit Esc key to escape INSERT mode, then hit SHIFT Z Z to save and exit with the changes. Hitting :q ENTER leaves vi without saving changes.

IMPORTANT NOTE IF YOU HAVE AN ENCRYPTED BOOTUP DRIVE -

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. IF YOU DON'T THIS, WHEN YOU BOOTUP YOU WILL GET STUCK AT A BLINKING CURSOR AND BLACKSCREEN THAT HAS THE FOLLOWING ERROR MESSAGES:


[5.757276] scsi 7:0:0:0: alua: not attached
[5.759625] sd 7:0:0:0: [sdg] no caching made page found
[5.759668] sd 7:0:0:0: [sdg] assuming drive cache: write through

WHEN THIS HAPPENS IT MEANS PLYMOUTH IS NOT ABLE TO SHOW YOU THE PROMPT FOR ENTERING THE PASSPHRASE FOR THE ENCRYPTED DRIVES. WITHOUT THE PROMPT THE SYSTEM CAN'T ACCEPT THE PASSPHRASE AND YOU ARE STUCK. IF THIS HAPPENS TO YOU, YOU CAN DO CTRL-ALT-DELETE TO REBOOT - THIS ALLOWS YOU TO HIT 'e' AT THE KERNEL LINE IN GRUB TERMINAL TO EDIT (MOST LIKELY THE TOP KERNEL) AND THEN REMOVE 'rhgb' (which stands for Red Hat Graphical Bootsplashcreen or something like that). WHEN DONE HIT THE KEYS 'CTRL X' TO REBOOT - YOU'LL THEN SEE TEXT MESSAGES SCROLLING AND GET AN OPPORTUNITY TO ENTER THE PASSPHRASE. ENTER THE PASSPHRASE AND YOU SHOULD BE GOOD TO GO.

4. Reconfigure the grub.cfg files

Two options for booting nowadays are BIOS and EFI

-If you chose BIOS boot run this command:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Note: I also have this one being auto-updated-configured in my system (?why? It's EFI).

-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
Note: Mine is an EFI system. But I did both this and the BIOS grub.cfg above since it too is being updated by RHEL updates concurrently with the EFI grub.cfg

5. Reboot and Install NVidia Driver - I use ElRepo's kmod-nvidia for this step.

Steps by me to install ElRepo's kmod-nvidia (You should still be in Text mode at this time):

If in multi-user.target mode (text, runlevel 3), then do the following
$ su -
enter root password
# yum install kmod-nvidia - version from above
# yum install nvidia-x11-drv-32bit - version from above (this is for 32bit compatibility)
# yum install nvidia-x11-drv - version from above (this is for Open GL X11 display driver and to be done if kmod didn't already include doing it with the kmod-nvidia installation above)
# exit
$

If still in graphics.target mode (you shouldn't be but if you are) (GUI, runlevel 5),
Use Applications > Software > kmod-nvidia - version from above
Install kmod-nvidia - version from above
Install nvidia-x11-drv-32bit - version from above (this is for 32bit compatibility)
Install nvidia-x11-drv - version from above (this is for Open GL X11 display driver)

6. At this point rebuild initramfs. This recreates initrd w/o nouveau. The existing initrd still has the embedded nouveau drivers if this step is not performed) :

Back up the current initramfs keeping nouveau
# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
Build the new one without nouveau
# dracut /boot/initramfs-$(uname -r).img $(uname -r)

7. Re-Enable X Windows

# systemctl set-default graphical.target

8. Reboot

If you have an encrypted bootup drive, when you bootup you may notice that Plymouth doesn't look so good with its text in a lower resolution and you'll see lines of text scrolling until you get to a stopped cursor waiting for you to enter the passphrase to unencrypt your drive. Maybe eventually there'll be a solution for this to keep things moving with a graphical bootsplash all throughout. Until then, this is a minor inconvenience for me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Instructions on how to make nVidia GTX645 graphics card run using nVidia in RHEL 6.5 anthony000 Linux - Newbie 12 04-11-2014 11:42 AM
Should I install NVIDIA GeForce GT 525M driver on Ubuntu 11.10? jack_green Ubuntu 10 01-23-2012 06:38 PM
Nvidia driver for nVidia G98 [GeForce 9300 GE] Video card rhbegin Linux - Hardware 2 12-27-2011 10:12 AM
install nvidia driver for GeForce 8600 fedora9 jonaskellens Linux - Hardware 6 10-16-2008 02:39 AM
help editing xf86config for nvidia geforce mx440 after installing nvidia driver linguist Linux - Newbie 11 06-13-2006 06:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration