how to install nvidia optimus in rhel 7.4

Latest response

as i new to RHEL 7.4 i am unable to install nvidia driver in my LENOVO Ideapad 510.
i have a nvidia optimus graphics card. NVIDIA GeForce 940MX - 2048 MB, Core: 1122-1202 MHz, Memory: 900 MHz, DDR3, Optimus.
can anyone give me step by step procedure if possible?

Responses

Hi Sanjay,

First thing, you cannot "install optimus", Optimus is a feature provided by NVIDIA to make use of the dedicated graphics adapter only when it is necessary, otherwise the integrated graphics adapter is in use. Secondly, Optimus technology is supported by the (already installed) open source nouveau drivers out-of-the-box. Launch an application by executing this command : DRI_PRIME=1 <application> ... now the application is running on the dedicated NVIDIA graphics adapter.

The proprietary NVIDIA drivers unfortunately can't provide this on Linux systems yet. When you install the NVIDIA drivers, both graphics chips are always in use and there is no way to change this. In case you want to install the NVIDIA drivers nevertheless, because you need the higher performance capabilities, here's how to do it, execute the following commands :

sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
(In case you use a different edition than Server, replace "server" with "desktop" or "workstation" accordingly.)

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo rpm -Uvh https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm

Then logout of the GUI and login to a virtual console - press Ctrl + Alt +F3.

Switch to non-GUI mode - execute :

sudo systemctl set-default multi-user.target
sudo reboot

Install the NVIDIA drivers - execute :

sudo yum update
sudo yum install akmod-nvidia kernel-devel
sudo reboot

Switch back to GUI mode - execute :

sudo systemctl set-default graphical.target
sudo reboot

Regards,
Christian

i installed in my laptop in the same steps you gave me. but finally got the "Oh no! Something has gone wrong." page with logout in it. now i reinstalled the OS and kept it without graphics card installed. is there anyother way?

Hi Sanjay,

Yes there is another way, you can install the NVIDIA drivers from another repository, to do it execute :

sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
(Replace "server" with "desktop" or "workstation" ... when you use one of those editions.)

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum-config-manager --add-repo=https://negativo17.org/repos/epel-nvidia.repo
sudo yum update

sudo yum install kernel-devel
sudo yum install nvidia-driver nvidia-settings
sudo reboot

Regards,
Christian

Hi Sanjay,

Just in case that installing the drivers from both repositories fails, boot the system with nouveau drivers disabled.

Highlight the Red Hat Enterprise Linux kernel boot entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 at the end of the line beginning with linux - press Ctrl + X to boot.
On the login screen press Ctrl + Alt + F3 - enter your user name and your password.

Now install the NVIDIA drivers and then reboot the system, this method is proven to work perfectly in such cases. :)

Regards,
Christian

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.