Monday, April 14, 2014

Installing nVidia drivers on OpenSUSE Linux the right way.

It's come to my attention that a lot of people that come to OpenSUSE from other Linux distributions often aren't aware how to install the nVidia binary drivers for their nVidia GPU. Often this is because many of those other Linux distributions either have a complicated install process, or no process at all, forcing users to download the drivers from nVidia and install them manually! Even worse, some of those distros leave the user to deal with kernel module re-compiles and configuration backup every time the kernel or nVidia driver is updated. What a nightmare,
Not to worry. Under OpenSUSE this process is very simple.

Step 1. - Identify your card and GPU

Before you dig into installing drivers, make sure you know what nVidia GPU you have. For example, in my case I have an 8800-GTS. This means I need the 8xxx series driver.
By default at install, OpenSUSE will identify your graphics chipset and install the correct nouveau open source driver. If you can't remember your graphics card model then you can use the information from nouveau to determine your card. I won't go into that process unless someone asks, but it's often as easy as clicking on the info centre on your desktop.

Step 2. - Add the nVidia software repository for OpenSUSE

Remember, 99% of all system administration in OpenSUSE can (and probably should) be handled in YaST2. So lets start by running YaST2 from the start menu and typing in your root password.
Next click on the Software item in the left side menu (it should actually be selected by default) and then click on Software Repositories on the right.

Now you'll see the Configured Software Repositories menu. Down below click Add and click OK.

Now choose Community Repositories and click Next.


This will bring up the repositories menu. Scroll down and click on nVidia Graphics Drivers and click OK.
You will then be ask to trust the key for the new repository. Accept the key and click through until you've exited back to the YaST2 menu.

Step 3. - Choose which nVidia drivers to install

First click on the Software Management item in YaST2 and you'll see the following screen.
Then, at the left near the top there is a View drop-down menu. Click it and choose Repositories.

You'll see the Repositories listed on the left. Click on the nVidia Graphics Drivers item.
Almost done. Just choose the drivers that are appropriate for your GPU model. Remember in my case that was an 8800-GTS so as you can see I've checked the related 8xxx series driver boxes. You'll probably also want to click on the nVidia Compute Module as this installs CUDA and OpenCL drivers. Finally, make sure the matching kernel modules are checked. I usually check both (all) of the matching ones in case I decide to switch SUSE kernels for some reason down the road.
Finally, click Accept and watch as YaST2 downloads, installs, compiles, and configures your fancy nVidia graphics card automatically for you, including switching off the nouveau drivers. Just reboot and you're done.

The best part is that if you install your GPU drivers this way, as opposed to manually, YaST2 will then continue to manage the drivers for you. This means that updates will be installed automatically whenever you install system updates. YaST2 will also manage updating your kernel modules, initrd, and other housekeeping items. No more manual kernel module compiles.

No comments:

Post a Comment