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. DKMS only works with the nVIDIA driver if you have compiled your own kernel version and not with the default openSUSE kernel, even if you have installed the kernel sources. Please have a look at the following blog on compiling your own kernel:
S.A.N.D.I. works with openSUSE 11.4, 12.1 and with our latest version, 12.2. 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.
For more info on getting into Run Level 3, have a look at my blog on the subject: How to Start openSUSE 12.3 with Grub 2 into Run Level 3 - Blogs - openSUSE Forums
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
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.
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:
sudo rm /usr/local/bin/sandi
sudo wget -nc http://paste.opensuse.org/view/download/88011425 -O /usr/local/bin/sandi
Next, you need to mark the file sandi as executable with the following command:
sudo chmod +x /usr/local/bin/sandi
You can add all three commands above and run it as one. Just copy and paste the following command into a terminal session:
sudo rm /usr/local/bin/sandi ; sudo wget -nc http://paste.opensuse.org/view/download/88011425 -O /usr/local/bin/sandi ; sudo chmod +x /usr/local/bin/sandi
To use S.A.N.D.I., download the most recent nVIDIA driver to your downloads folder from World Leader in Visual Computing Technologies | NVIDIA, restart your PC into runlevel 3, log in as root and run the terminal command:
You can also run S.A.N.D.I. from within your selected desktop as in the picture above. Just open up a terminal session and run the same sandi command as stated before. You can not do a full installation of the nVIDIA driver, but you can load the selected nVIDIA driver into DKMS. If you have already done a full installation of the nVIDIA driver and have the driver already loaded, S.A.N.D.I. will not replace that already loaded video driver and so an error message will be seen after the driver is built. That is normal and is not a problem.
You MUST edit the S.A.N.D.I. bash script file and enter where you have downloaded the nvidia driver files. If you fail to edit the bash script, you will see this error upon startup.
************ > Folder /home/username/Downloads does not exist < ************
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):
# # 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
Look at these lines and modify if you wish:
# # 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"
To edit the sandi bash script after it is installed, run one of the following commands:
For KDE or GNOME do** Alt-F2** and then enter:
For KDE: kdesu kwrite /usr/local/bin/sandi
For GNOME: gnomesu gedit /usr/local/bin/sandi
For more information on installing the nVIDIA driver the hard way, please consult the following web link: Installing the nVIDIA Video Driver the Hard Way - Blogs - openSUSE Forums
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:
cd /lib/modules/<kernel name>/source/arch/x86/include ; sudo cp generated/asm/*.h ./asm
My /usr/local/bin/userfix bash script file I am running in order to install the present nVIDIA driver into kernel-3.3-rcx is as follows:
#!/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
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!