How to install nvidia driver in Slackware Linux

This is a guide on how to install nvidia driver in Slackware Linux. The video card is a GeForce 8 Series, and the Slackware Linux is a 32-bit version. There are two ways where you can find nvidia driver for Slackware Linux. You can download the driver directly from nvidia website or you can build nvidia driver with the helps of slackbuilds.org. We are going to learn both ways in this tutorial.

Download nvidia driver from nvidia official website

You can find the nvidia driver for Linux in nvidia official website download page. You can even manually find your driver by selecting product type, product series, operating system type and language from dropdown list and let nvidia find the driver for you. Below is the link for the page and an example screenshot of the nvidia search driver download page.

NVIDIA Driver Downloads

Here is the driver search screenshot example:

nvidia driver search screenshot image

When you finish, click Search button. Nvidia will find the driver for you.

Download nvidia driver source and scripts from slackbuilds.org

You can find nvidia driver and kernel driver for Slackware Linux from slackbuilds.org website. In the slackbuilds.org website, type nvidia driver in the search box and download the nvidia driver and kernel driver from the result page. See the example from the screenshots below:

nvidia driver search in slackbuilds.org screenshot image

Hit search button to find nvidia driver and slackbuild scripts. Here is the result example:

nvidia driver search result screenshot image

Click on nvidia driver to download nvidia driver and slackbuild scripts.

Links to download nvidia source and slackbuild scripts screenshot image

Now you can download both the nvidia driver source and slackbuild scripts to build Slackware package. After finish downloading nvidia driver, you can download the kernel driver. Refer to the download nvidia driver screenshots above.

Install nvidia driver in Slackware Linux

Before begin the nvidia driver installation, you must make a copy of the original /etc/X11/xorg.conf as a backup. Use the copy command example below:

root@slackware:~# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.ori

If you choose to install the nvidia driver that you download from nvidia website, you must close kde or x-window and install the driver from Linux command line terminal.

Copy the driver to the directory that you placed all third party software such as /usr/local/src. This is not necessary, just a good habit. To install the driver, run the nvidia driver with the sh command like in the example below.

root@slackware:/usr/local/src# cp /home/luzar/Desktop/NVIDIA-Linux-x86-180.29-pkg1.run /usr/local/src/
root@slackware:~# cd /usr/local/src/
root@slackware:/usr/local/src# sh NVIDIA-Linux-x86-180.29-pkg1.run

Now, you just need to answer all the questions to configure nvidia driver and the nvidia installation program will do the driver and kernel installation for you.

Build nvidia driver package with slackbuild

These are the steps to build nvidia driver and kernel driver with the slackbuild scripts from slackbuilds.org. Copy or move the slackbuild scripts to the proper place to build slackware package.

root@slackware:/home/slackware/source/myslackware# tar zxvf nvidia-legacy173-driver.tar.gz

Copy the nvidia source into the extracted slackbuild driver package. Run the slackbuild installer scripts to create nvidia driver package. See the example below:

root@slackware:/home/slackware/source/myslackware# cd nvidia-legacy173-driver
root@slackware:/home/slackware/source/myslackware/nvidia-legacy173-driver# cp /home/luzar/Desktop/NVIDIA-Linux-x86-173.14.12-pkg1.run .
root@slackware:/home/slackware/source/myslackware/nvidia-legacy173-driver# ./nvidia-legacy173-driver.SlackBuild

When the slackbuild scripts finished, you can get the nvidia driver package from /tmp directory. You can install the driver package with installpkg command like in the example below:

root@slackware:/tmp# cd /tmp/
root@slackware:/tmp# installpkg nvidia-legacy173-driver-173.14.12-i586-1_SBo.tgz

Repeat the same steps for the kernel driver. After you installed both invidia driver and kernel driver, open /etc/X11/xorg.conf file and change the "Graphics device section" driver to nvidia.

# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

Section "Device"
Identifier "VESA Framebuffer"
# Driver "vesa"
Driver "nvidia"
VideoRam 4096
# Insert Clocks lines here if appropriate
EndSection

Error and troubleshooting

If there is an error and nvidia driver cannot be installed, you should get the error name or error code. Write down that error. Before you start searching the Internet for the solution, you should check the nvidia driver installation log. The nvidia-installer log file is /var/log/nvidia-installer.log. Open the log file and carefully scan for the error. What I mean 'scan' is, you don't have to read everything, just go through the log looking for the error. When you found the error, check all the details. Normally, there will be suggestion to fix the error. Try that first. If you think the suggestion is out of your league, then try google for that error.

Nvidia driver installation failed often related to the Linux kernel source. If you got an error says there is no kernel source or Kernel configuration is invalid, that means some files are missing. You can try repairing the kernel source or re-install it from the Slackware installer.

That's all. Good luck!

Comments

5

This is a great tutorial. I've been using Slackware default graphic driver until I saw a thread in a forum that take me to this tutorial.

I successfully build my own slackware nvidia driver package, thanks to this easy step by step tutorial. Keep up the good work!

Just want to add a note. If you upgrade Linux kernel in the future, you need to recompile the nvidia driver otherwise you wouldn't be able to access x-window. It's not a big deal. Nvidia has made it easier to compile the driver in Linux too. Just download the right driver for your video card from nvidia website and run 'sh NVIDIA-Linux-x86-XXX.XX-pkg1.run' again.

Thanks for the great tutorial. Installing the driver was a snap!

"Repeat the same steps for the kernel driver."

I followed up to the quote above, but where do I get the kernel driver?

Nevermind. Found it.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.