techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 776
Location: East Coast, West Coast? I know it's one of them.
Back to top
Posted: Aug 10, 07, 18:22    Debian nVidia / ATI graphics driver installer script sgfxi
(Page last updated 2008-06-03)
sgfxi Debian sid/testing + sidux nVidia, fglrx + xorg driver installer/configuration
While this script is primarily designed for sidux and Debian sid, it should also work for Debian testing and maybe stable, although I haven't tested stable recently.

New Features:
  • Support for new vanilla/default Debian Xen enabled kernels (kernels > 2.6.25 now in Debian sid/testing) + driver installer run packages from ATI/Nvidia (patch source).
  • Install onto new kernel from old kernel, using -K option, like this:
    :: Code ::
    sgfxi -c -K 2.6.25-2

    This would enable composite (-c) and install to kernel 2.6.25-2 no matter what kernel you're in now.
  • Much improved patch handling, now downloads and runs patches as required for nvidia/fglrx (when fglrx actually works, of course).

Important things to know before starting
  • Ubuntu is NOT Debian, so don't try to use this on Ubuntu type systems!

script information and resources:
  • script documentation. Useful items:

  • script svn - Home to smxi, svmi, and sgfxi code. This is always the current code. Includes most script development tools, patches, and all script files.
  • #smxi on irc.oftc.net - irc smxi / sgfxi / svmi support for all Debian based distro users trying out smxi or other scripts - bughunters with output welcomed. If someone is in the channel, ask a question, then check back later, it might take some time to get an answer. To check available factoids from the Amy bot, type in: !categories in your irc client.

Script functions
This script downloads the binary graphic driver installers from either nvidia or ATI, prepares system, installs, then sets up xorg.conf, all in a fairly clean, reasonably intuitive way.

sgfxi allows you to easily switch between proprietary non free drivers like ATI's fglrx and nVidia's nvidia driver and the free xorg drivers. Simply use the -n option to do any automatic install for nvidia, ati, intel, and 3dfx, or -N <xorg driver name> for others.

Debian packaged nvidia or ati drivers tend to be fairly unreliable for cutting edge kernels and systems, but the script makes it easy to install either the run installer from nVidia/ATI, or using Debian methods.

If you want to switch between the debian nvidia/fglrx drivers and the straight installs from ATI/Nvidia, you can easily do that by using: sgfxi -s
-s forces debian driver method instead of downloaded binaries. You can switch back and forth easily, in case one works and another doesn't.

Script requirements
  • Must be run as root/su (except to view help -h menu)
  • Script does not run in x, must be in console, and it will shut down detected instances of kde/gnome etc
  • Please run script from /usr/local/bin to avoid errors in the future. That's where it expects to be
  • Debian sid and testing systems only offiicially supported, but feel free to try it with Etch/stable and report if it works or not.
  • Must have a working internet connection to update itself and download drivers if required.

Script download / install
Download the sgfxi script here or just run the following command string as root user in terminal/console [recommended]:

:: Code ::
cd /usr/local/bin;wget -Nc techpatterns.com/sgfxi;chmod +x sgfxi;sgfxi -h

Script features the following:
  • sgfxi -h shows available drivers, options, and if your system is supported.
  • Script updates itself automatically every time to latest version
  • Full logging of install located /var/log/sgfxi/<time stamped log of install>
  • sgfxi will also detect multiple video cards and ask which you want to install a driver for.
  • Pre setup configuration
  • Script detects card type and determines which driver and driver version to install, for example, for legacy nvidia cards, it will automatically select the proper legacy nvidia driver.
  • Download/extraction of binary installers from either ATI or nVidia. Note: script will download to this location: /usr/src and will then reuse the driver if you need to reinstall it due to xorg or kernel updates.
  • System cleanup, removes all previously installed graphics drivers
  • Installs drivers - or creates debs for driver install (ATI only)
  • Configures and installs driver debs (ATI only)
  • Creates a time stamped backup of xorg.conf, like so: xorg.conf-bu-20070812....
  • Reconfigures xorg.conf, cleans up all legacy cruft that it can find, then redoes it to work as expected
  • Script also features option to simply install xorg drivers such as intel, nv, ati, radeon, etc.

Script options
Here are some examples of typical installs and useage:
:: Code ::
# for normal nvidia install, with composite enabled
sgfxi -c
# for normal fglrx install
sgfxi
# for installing normal ati xorg driver
sgfxi -n
# for installing special xorg radeon driver
sgfxi -N radeon
# for installing an older nvidia driver, with composite
sgfxi -co 100.14.19

The following is what the -h help menu gives as options and system information, as an example.

Latest nvidia stable/beta drivers are usually added the day of release, unless there are problems. Generally only current fglrx version, sometimes also one prior, is supported due to consistent problems with fglrx drivers and cutting edge distros:

:: Code ::
sgfxi -h
This script will not run in X! Make sure to run it in terminal only.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Script Requirements: Debian Sid or Sidux. No other distro supported!
Xorg version required: 7.1/1.1 or greater - Your X version: 1.4
Linux Kernel required: 2.6.18 or greater - Your kernel:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
'default:' - This is the driver installed automatically unless it is not supported by
your card. Some older cards will force an override of this basic default. Script will
print out what driver it will install when you start it up, with option to exit.

'supported-drivers:' choices require -o <see -o for correct syntax> to install.
fglrx: default: 8-5 supported-drivers: 8-5
nvidia: default: 169.12 supported-drivers: 169.12 100.14.19 96.43.05 71.86.04 100.14.23 100.14.19
The following drivers are available for testing purposes:
nvidia: 173.08 171.06
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
These are your supported options:
-A Run the install non-interactively. Will not restart x at end.
-b Enable tripleBuffer (nvidia only). triplebuffer can reduce 3d performance on cards
   with low graphics memory (64 mB or less). Default is disabled/off.
-c Use composite mode. For things like Beryl/Compiz (nVidia cards only).
-C Skip Xorg configuration. Only use this if your Xorg is already working with your driver.
   Main use is if you have dual card output and don't want xorg.conf changed.
-d Remove IgnoreDisplayDevices, allow TV for example (nVidia cards only).
-h View this help menu.
-K Installs nVidia/fglrx driver for another kernel. Syntax: sgfxi -K 2.6.25-2 (the full kernel name)
-n Automatically installs correct native xorg nv, intel, or ati driver for your system.
   Cleans up old binary driver stuff, updates xorg.conf with new driver information,
   and cleans nvidia and fgrlx stuff out of xorg.conf
-N Force install of specific xorg driver. Syntax: sgfxi -N <one of the drivers from the list, like -N radeon>
   Supported Xorg drivers: ati i128 i740 i810 i810-modesetting intel mga neomagic nv radeon radeohd sis tdfx vesa vga voodoo
   Also configures xorg.conf as required. Full radeon xorg 3d configuration automatically.
-o Override default: install a specific driver, this is an absolute override - syntax:
   -o 169.12 or: -o 8-4 (for fglrx)
-Q Skip start X Question, automatically start X post driver install.
-r Remove mode lines from xorg.conf
-t Enables dynamic twinview (nVidia only) - LEGACY, unused now. Default is on, enabled.
-R Skips self updating feature. No restart.
-s Installs Debian Sid fglrx drivers. ATI/nVidia cards only.
-S Skips automatic logout and X startup when script is run in standalone mode.
-U Forces sgfxi to update itself, must be root, but can be in x. Exits after.
-v Prints sgfxi current version information. Exits after.
-W Skip all wget downloads and connection tests. Only use this to reinstall a driver
   that has already been downloaded using sgfxi at least once previously.
-x Reverts to default libXvMC.so.1 for system instead of nVidia package (nVidia only)
-X Use to skip auto X start/stop. Do not use this unless you have a good reason to not
   want X start/stop tests to run. Gives start X option on completion if not in X.
-Z Skips connection test. Use this if sgfxi gives you connection failed error but
   you are sure your connection is fine.

This script is actively maintained, and usually includes support for the latest drivers when they come out, except sometimes for ATI, when their drivers totally break, which seems to be about as often as they work, sadly.

The free ATI radeon/radeonhd drivers are improving quickly, but the fglrx stuff is still a constant problem, they are having trouble keeping up with both xorg and kernel development release to release.

While the script is officially only supported for sidux, it should work fine with Debian sid/unstable and testing, and probably with Etch. Some support can be found on oftc.net irc, #sidux channel. Also see the sidux forums, hardware for more information.
Display posts from previous:   

All times are GMT - 8 Hours