I am happy to present my bash script S.A.N.D.I., SuSE Automated NVIDIA Driver Installer which is written to work with DKMS - Dynamic Kernel Module Support to allow the automatic installation of the nVIDIA proprietary Video Driver each time you upgrade your Kernel version. What DKMS does is to recompile and install any DKMS loaded driver against the running kernel each time a new kernel version is loaded. The normal procedure would be to use S.A.N.D.I. to do a full installation of any new nVIDIA video driver in Runlevel 3 as normal and then run S.A.N.D.I. again to load the same driver into DKMS from Runlevel 3 or from Runlevel 5 in your desktop. This second step (loading the driver into DKMS) can be made with or without your selected desktop being loaded. When you run S.A.N.D.I. in Runlevel 3, the Full video driver installation choice will be available and when selected will work just like LNVHW does.
Here is a picture (shown above) of the new colored Full nVIDIA driver installation menu. You MUST install DKMS from the Packman repository to use this bash script!
You can find the latest nVIDIA driver on my blog here: Installing the nVIDIA Video Driver the Hard Way - Blogs - openSUSE Forums
Recent Revision Release History:
1) Version 1.25 of S.A.N.D.I. has so many fixes I can hardly mention them all here, but the big thing is ... It now works with openSUSE 12.1 !!!!!!! I have added a /usr/local/bin/userfix file for any kernel fixes needed for compiling such as mentioned below.
2) Version 1.27 of S.A.N.D.I. fixes a logic problem in determining the number of kernel modules with the same nVIDIA driver version installed. Many more comments have been added and/or corrected.
3) Version 1.30 of S.A.N.D.I. No longer uses the /etc/init.d/after.local file. This function has been moved to the boot.local file for openSUSE 11.4 and not required due the functionality of systemd in openSUSE 12.1. The userfix file was not running before DKMS was running in openSUSE 11.4 and moving this to the boot.local file now works properly. The creation and activation code for the after.local file has been removed from SANDI 1.30. If you use openSUSE 11.4, you can edit the /etc/init.d/after.local file as root and remove the three lines that loaded the userfix file as it is not required any more in this file only. The command lines used to load the nVIDIA driver from runlevel 3 has also been enhanced to include the ability to read all command line options for the nVIDIA driver and to enter any custom options you wish to use. Other smaller fixes have also been included.
4) Version 1.32 of S.A.N.D.I. now includes a new color display engine that works in Runlevel 3 as well as Runlevel 5 using escape codes and not the tput command. The Full nVIDIA driver installation menu is now shown in full color. In Runlevel 5, when you exit SANDI, you get an option to view the nVIDIA driver HTML help document (Like This README). You must start SANDI as a normal user and enter the root password into SANDI and you must have installed a nVIDIA driver in Runlevel 5 since you updated to version 1.32. The userfix bash script was being added to the boot.local file incorrectly when in openSUSE 12.1 and that has now been fixed. You may wish to edit this file as root and remove the three lines that call userfix to run. Other fixes are included as well.
5) Version 1.40 of S.A.N.D.I. now allows the Full nVIDIA driver install without the installing of DKMS, which might occur when you first install openSUSE. If DKMS is not installed and the Runlevel is at 3, then the nVIDIA full install menu is presented to you. This allows SANDI to be a full nVIDIA driver solution, not requiring LNVHW on a new installation. Other minor fixes are also included.
6) Version 1.45 adds the ability to install a pacth file to the nVIDIA driver and to be able to load the patched nVIDIA driver.
7) Version 1.46 fixes a minor problem on program exit from dkms driver install introduced with version 1.45.
8) Version 1.47 fixes a problem with installing a nVIDIA patch file. Not sure when this was introduced.
If you are running openSUSE 12.1 and systemd is detected as being installed, a DKMS systemd service file will be created and installed for you to get DKMS working. Further, the old Runlevel stuff is removed, the dkms_autoinstaller is moved and there are many other fixes to get S.A.N.D.I. to work with openSUSE 12.1. I was able to get DKMS to work in openSUSE 12.1 AND it will also install your VirtualBox drivers just fine.
I have written the S.A.N.D.I. bash script to reside in the /usr/local/bin folder. Copy and past the following text into the file sandi (as in /usr/local/bin/sandi). You MUST be a root user to complete this task.
S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.47
It is possible to directly download the script from SUSE Paste using the following commands (You must delete the old version of sandi first). Just open up a terminal session and copy the text from any code block show here and past it after the terminal prompt and then press enter:
Code:
sudo rm /usr/local/bin/sandi
Code:
sudo wget -nc http://paste.opensuse.org/view/download/3329140 -O /usr/local/bin/sandi
Code:
sudo chmod +x /usr/local/bin/sandi
Code:
sudo rm /usr/local/bin/sandi ; sudo wget -nc http://paste.opensuse.org/view/download/3329140 -O /usr/local/bin/sandi ; sudo chmod +x /usr/local/bin/sandi
Code:
sandi
You MUST edit the S.A.N.D.I. bash script file and enter where you have downloaded the nvidia driver files. Since sandi is being placed into a system folder, you must enter the root user password in order to change/edit the following line(s):
Code:
# # Where do you keep your nVidia driver downloads? # Please Make Sure this name is correct - Do not include a "/" at the end... # nVidia_folder=/home/yourname/Downloads
Code:
# # How do you want to restart your PC when done loading the driver? # The default is REBOOT="reboot" but can also be set for another program # like REBOOT="fastboot" or REBOOT="pbs" are two example bash scripts. # REBOOT="reboot"
For KDE or GNOME do Alt-F2 and then enter:
Code:
For KDE: kdesu kwrite /usr/local/bin/sandi
Code:
For GNOME: gnomesu gedit /usr/local/bin/sandi
Be aware that with the latest kernel 3.3, a glitch exists with the nVIDIA driver looking for some Kernel source files in the wrong place. I am running the following command right after compiling and installing the new Linux kernel 3.3 version:
Code:
cd /lib/modules/<kernel name>/source/arch/x86/include ; sudo cp generated/asm/*.h ./asm
Code:
#!/bin/bash #: Title : /usr/local/bin/userfix #: Date Created: Tue Feb 28 20:09:40 CST 2012 #: Last Edit : Tue Feb 28 20:09:40 CST 2012 #: Author : James D. McDaniel #: Version : 1.00 #: Description : Run User Pre-dkms Compile Commands #: Options : None echo echo "User Fix File was Executed ..." echo version=$(uname -r | cut -c -3) folder="/lib/modules/$(uname -r)/source/arch/x86/include" if [ "$version" == "3.3" ] ; then if [ -d "$folder" ] ; then cd $folder cp generated/asm/*.h ./asm echo echo "Kernel Fix for nVIDIA driver was executed!" echo fi fi exit 0 # End Of Script
S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.62 - Blogs - openSUSE Forums
As always, I would like to hear about any suggestions or comments you might have about using S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer!
Thank You,
Rate this article