View RSS Feed

James' openSUSE Bash Scripting (and other things) Blog - Your Comments are Welcome!

S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50

Rate this Entry


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:

openSUSE and Installing New Linux Kernel Versions - Blogs - openSUSE Forums

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.

S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50

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/88011425 -O /usr/local/bin/sandi
Next, you need to mark the file sandi as executable with the following command:

Code:
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:

Code:
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:

Code:
sandi
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):

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
Look at these lines and modify if you wish:

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"
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:

Code:
For KDE: kdesu kwrite /usr/local/bin/sandi
OR

Code:
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:

Code:
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:

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
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,

Submit "S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50" to Digg Submit "S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50" to del.icio.us Submit "S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50" to StumbleUpon Submit "S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50" to Google Submit "S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50" to Facebook Submit "S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer - Version 1.50" to Twitter

Updated 06-Jan-2014 at 09:58 by kgroneman

Categories
Uncategorized

Comments

Page 2 of 2 FirstFirst 12
  1. lovetoflyguy's Avatar
    Hi James, Thanks for your response.

    OK, to make a short story long... I've had an openSUSE (was 10.3, ... 11.4) fileserver for quite a while, and I was happy enough with the Nvidia mx4000 that I originally built it with. Recently however, we decided to cancel our cable TV subscription as it cost way more than it was worth, so I decided to add the role of media server (XBMC 11.0) to my existing fileserver, which I would then hook up to our existing TV cable network (via S-video out through a RF modulator to coax). I soon confirmed my suspicion that I would need to upgrade the video card for XBMC to be usable, so I bought a cheap (~$12) GeForce 6200 AGP on Ebay, and proceeded to open the case...

    Two days later, I had it back up & running with oS 12.2 and all of my samba shares restored. Unfortunately, the nouveau driver doesn't seem able to cope with the increased video demands of the XBMC platform, so I tried to install the Nvidia driver. First I tried the 'easy' method (1-click) which didn't work. I followed the subsequent directions to reinstall the driver in runlevel 3 through YaST (x11-video-nvidiaG02) but that didn't work either.

    Suffering from utter frustration, I came across your blog and decided to try it one more time. Your LNVHW script worked perfectly, and within a few minutes I was running the Nvidia 304.64 driver! To answer your question about the version I used, as near as I can tell the 304.64 is the latest version to support my GeForce 6200 AGP. Disaster struck when I connected the s-video cable, resulting in a system which can only be booted to the desktop in failsafe mode. This is my current predicament. Perhaps i made a mistake by not having the s-video cable connected to a TV when I installed the driver?

    Great minds must think alike, because I have always set up my Linux rigs with / on a separate hdd, just in case something goes sideways and I need to reinstall. I also take great care to screenshot just about all of my specific config settings (network, samba, etc) before I proceed, thus minimizing headaches. :)

    Thanks for your excellent and very clear instructions to restore the default driver - I could probably just about manage it! At this point, I've edited/replaced so many different config files trying to get back to nouveau, that I'm probably better off just reinstalling, which as you said will be fairly painless for me as I'm already prepared!

    Sorry for being so long winded, I just wanted to explain what I'm trying to do as thoroughly as possible. My one remaining question involves the s-video output to TV; did I screw up by not having a TV connected when I ran LNVHW, or is there something else that would cause the Nvidia driver act up?

    I would welcome any suggestions you may have!

    Thanks!
  2. jdmcdaniel3's Avatar
    [QUOTE=lovetoflyguy;bt616]Hi James, Thanks for your response.

    OK, to make a short story long... I've had an openSUSE (was 10.3, ... 11.4) fileserver for quite a while, and I was happy enough with the Nvidia mx4000 that I originally built it with. Recently however, we decided to cancel our cable TV subscription as it cost way more than it was worth, so I decided to add the role of media server (XBMC 11.0) to my existing fileserver, which I would then hook up to our existing TV cable network (via S-video out through a RF modulator to coax). I soon confirmed my suspicion that I would need to upgrade the video card for XBMC to be usable, so I bought a cheap (~$12) GeForce 6200 AGP on Ebay, and proceeded to open the case...

    Two days later, I had it back up & running with oS 12.2 and all of my samba shares restored. Unfortunately, the nouveau driver doesn't seem able to cope with the increased video demands of the XBMC platform, so I tried to install the Nvidia driver. First I tried the 'easy' method (1-click) which didn't work. I followed the subsequent directions to reinstall the driver in runlevel 3 through YaST (x11-video-nvidiaG02) but that didn't work either.

    Suffering from utter frustration, I came across your blog and decided to try it one more time. Your LNVHW script worked perfectly, and within a few minutes I was running the Nvidia 304.64 driver! To answer your question about the version I used, as near as I can tell the 304.64 is the latest version to support my GeForce 6200 AGP. Disaster struck when I connected the s-video cable, resulting in a system which can only be booted to the desktop in failsafe mode. This is my current predicament. Perhaps i made a mistake by not having the s-video cable connected to a TV when I installed the driver?

    Great minds must think alike, because I have always set up my Linux rigs with / on a separate hdd, just in case something goes sideways and I need to reinstall. I also take great care to screenshot just about all of my specific config settings (network, samba, etc) before I proceed, thus minimizing headaches.

    Thanks for your excellent and very clear instructions to restore the default driver - I could probably just about manage it! At this point, I've edited/replaced so many different config files trying to get back to nouveau, that I'm probably better off just reinstalling, which as you said will be fairly painless for me as I'm already prepared!

    Sorry for being so long winded, I just wanted to explain what I'm trying to do as thoroughly as possible. My one remaining question involves the s-video output to TV; did I screw up by not having a TV connected when I ran LNVHW, or is there something else that would cause the Nvidia driver act up?

    I would welcome any suggestions you may have!

    Thanks![/QUOTE]

    So I do recall having such issues trying to get s-video to work in that time frame of AGP cards. Niether the video cards nor the TV's worked all that well. When VGA on a TV become common and video cards supported two connections, I have never looked back sense. Since TV s-video is an analog device, it does need to be connected to be detected and even then on some video cards, you had to select a TV was there because it could not be detected. I am not sure that this should cause the whole setup to blow up, but having problems with s-video connections is not a new issue. Unfortunately, I was a Windows user back then when I was using such equipement, but it did not work all that well. I recall having problems with overscan (where the picture goes over all four edges of the TV screen), linearity issues and the inability to read even 80 charater across text on the TV screen. Of course, playing a movie is less of a problem, if you can get a picture at all. So do indeed connect, power up and select s-video on the TV to see if that helps during the install and video detection of openSUSE. Anytime you are going with the built-in open source video driver, the newer the kernel, the newer the video driver.

    Thank You,
  3. spmaster's Avatar
    Hi!
    Need help!
    I'm trying to use sandy on tumbleweed with NVIDIA-Linux-x86_64-313.18 / 310.32 and 3.7.7-24-desktop. Always get the message "No nVIDIA Driver Files were found".
    nVidia_folder="/home/spmaster/nvidia"
    What am I doing wrong?
    Thx!
  4. jdmcdaniel3's Avatar
    [QUOTE=spmaster;bt657]Hi!
    Need help!
    I'm trying to use sandy on tumbleweed with NVIDIA-Linux-x86_64-313.18 / 310.32 and 3.7.7-24-desktop. Always get the message "No nVIDIA Driver Files were found".
    nVidia_folder="/home/spmaster/nvidia"
    What am I doing wrong?
    Thx![/QUOTE]

    So Normally, the default would be /home/yourname/Downloads and so either 1) No nVIDIA proprietary video driver files are being downloaded to "/home/spmaster/nvidia", which is normally true as the Downloads folders is where they would go OR 2) SANDI does not like looking in a folder called nvidia for files that start with NVIDIA, but I am not sure about that. Since Downloads is the default download folder, why not set the nVidia_folder="/home/spmaster/Downloads"? And of course, I assume your user is called spmaster? Do you really keep or move your nVIDIA driver files to "/home/spmaster/nvidia"? Consider that SANDI can be particular with where she wants to put her things.

    Thank You,
  5. spmaster's Avatar
    Hi and thanks for your response.

    I already tried /home/spmaster/Downloads - the same result.
    I even tried to put the drivers in /usr/local/bin/ :(

    spmaster@sac:~> ls /home/spmaster/Downloads/
    NVIDIA-Linux-x86_64-310.32.bin NVIDIA-Linux-x86_64-313.18.bin

    its a kind of magic
  6. jdmcdaniel3's Avatar
    [QUOTE=spmaster;bt659]Hi and thanks for your response.

    I already tried /home/spmaster/Downloads - the same result.
    I even tried to put the drivers in /usr/local/bin/

    spmaster@sac:~> ls /home/spmaster/Downloads/
    NVIDIA-Linux-x86_64-310.32.bin NVIDIA-Linux-x86_64-313.18.bin

    its a kind of magic[/QUOTE]

    If this was me, I would download sandi again using this command:

    [CODE]sudo rm /usr/local/bin/sandi ; sudo wget -nc http://paste.opensuse.org/view/download/53816310 -O /usr/local/bin/sandi ; sudo chmod +x /usr/local/bin/sandi[/CODE]

    I would then download this bash script and use it to edit sandi:

    [CODE]sudo rm /usr/local/bin/sysedit ; sudo wget -nc http://paste.opensuse.org/view/download/88360942 -O /usr/local/bin/sysedit ; sudo chmod +x /usr/local/bin/sysedit[/CODE]

    Then in Terminal run the command:

    [CODE]sysedit[/CODE]

    Then see what you get after you edit the sandi script again. Most often errors that make no sense happens due to a corruption in the bash script. Lets try again and then get back with me.

    Thank You,
  7. spmaster's Avatar
    Nothing :'(
    I did everything by your instructions.

    I'v tried something else: put the driver in the home directory of the root and used $HOME - didn't help toо

    May be something wrong because
    locale
    LANG=ru_RU.UTF-8 ?



    Thank You
  8. jdmcdaniel3's Avatar
    [QUOTE=spmaster;bt662]Nothing
    I did everything by your instructions.

    I'v tried something else: put the driver in the home directory of the root and used $HOME - didn't help toо

    May be something wrong because
    locale
    LANG=ru_RU.UTF-8 ?



    Thank You[/QUOTE]

    So I see the problem now. You have renamed your nVIDIA propritary video files files to *.bin from *.run.

    spmaster@sac:~> ls /home/spmaster/Downloads/
    NVIDIA-Linux-x86_64-310.32.bin NVIDIA-Linux-x86_64-313.18.bin

    Will work if it says ...

    spmaster@sac:~> ls /home/spmaster/Downloads/
    NVIDIA-Linux-x86_64-310.32.run NVIDIA-Linux-x86_64-313.18.run

    Just like they come from a nVIDIA site download.

    Thank You,
  9. spmaster's Avatar
    it is not me, I swear! though, who else? lol!
    Thank you very much! It works.

    Another question - userfix will be run every system startup ( after make-dkms-installer was executed) ?

    Thx again!
  10. jdmcdaniel3's Avatar
    [QUOTE=spmaster;bt666]it is not me, I swear! though, who else?
    Thank you very much! It works.

    Another question - userfix will be run every system startup ( after make-dkms-installer was executed) ?

    Thx again![/QUOTE]

    The USERFIX bash script is run before your nVIDIA driver gets compiled into the kernel. If there are any tasks that needs to be run first, USERFIX can do it. I can up with this when a certain kernel version required a modification so that the nVIDIA driver could be installed and USERFIX could do that. Now, its there if you need it.

    Thank You,
  11. khaos337's Avatar
    Awesome script! Really helped me out!!
  12. jdmcdaniel3's Avatar
    S.A.N.D.I. - SuSE Automated NVIDIA Driver Installer has been updated to Version 1.50 and in this release I have moved the run_dkms.service file to "/usr/lib/systemd/system/run_dkms.service" more in tune with how openSUSE 12.3 does it. I have added in a KDE and GNOME icon, for the desktop and for the Applications menu.

    Thank You,
  13. keoshy's Avatar
    "unable to determine the NVIDIA kernel module filename"
    I get this error when I run SANDI script
    I am using OpenSUSE 12.2 (I tryed also 12.3 but it doesn't works) and NVIDIA-Linux-x86-96.43.23-pkg1
    someone can help me.
    thanks..
  14. jdmcdaniel3's Avatar
    [QUOTE=keoshy;bt916]"unable to determine the NVIDIA kernel module filename"
    I get this error when I run SANDI script
    I am using OpenSUSE 12.2 (I tryed also 12.3 but it doesn't works) and NVIDIA-Linux-x86-96.43.23-pkg1
    someone can help me.
    thanks..[/QUOTE]

    nVIDIA driver 96.43.23 is kind of old and may not support dkms. Have you looked at this script: [URL="http://forums.opensuse.org/blogs/jdmcdaniel3/lnvhw-load-nvidia-driver-hard-way-runlevel-3-version-1-10-32/"]LNVHW - Load NVIDIA (driver the) Hard Way from runlevel 3 - Version 1.46 - Blogs - openSUSE Forums[/URL] and what nVIDIA video chipset do you have?

    Thank You,
  15. freebg's Avatar
    Is it possible to use your script to install NVIDIA driver on GeForce2 MX/MX 400?
    OS: OpenSUSE 12.2 32bit
    Kernel: 3.4.47-2.38.1
    KDE: 3.5.10

    lspci -v

    03:02.0 VGA compatible controller: NVIDIA Corporation NV11 [GeForce2 MX/MX 400] (rev b2) (prog-if 00 [VGA controller])
    Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16
    Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
    Memory at f0000000 (32-bit, prefetchable) [size=128M]
    Expansion ROM at fe6f0000 [disabled] [size=64K]
    Capabilities: [60] Power Management version 2
    Kernel driver in use: nouveau
  16. jdmcdaniel3's Avatar
    [QUOTE=freebg;bt918]Is it possible to use your script to install NVIDIA driver on GeForce2 MX/MX 400?
    OS: OpenSUSE 12.2 32bit
    Kernel: 3.4.47-2.38.1
    KDE: 3.5.10

    lspci -v

    03:02.0 VGA compatible controller: NVIDIA Corporation NV11 [GeForce2 MX/MX 400] (rev b2) (prog-if 00 [VGA controller])
    Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16
    Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
    Memory at f0000000 (32-bit, prefetchable) [size=128M]
    Expansion ROM at fe6f0000 [disabled] [size=64K]
    Capabilities: [60] Power Management version 2
    Kernel driver in use: nouveau[/QUOTE]

    I you can install the driver manually, the script should work. If you are not sure, you might start off with the more simple script lnvhw which can be fore at the following link. The card you mention is old and so I just can't say for sure.

    [URL="http://forums.opensuse.org/blogs/jdmcdaniel3/lnvhw-load-nvidia-driver-hard-way-runlevel-3-version-1-10-32/"]LNVHW - Load NVIDIA (driver the) Hard Way from runlevel 3 - Version 1.46 - Blogs - openSUSE Forums[/URL]

    Thank You,
Page 2 of 2 FirstFirst 12