Sgfxi Manual :: Configuration and Operation Information
Page Version: 2.0 Page Updated: 2018-03-10
- Basic sgfxi script features and functions
- Script Installation
- How to use the sgfxi script options
- Build (nVidia only) kernel modules
- For live-cd binary, non-free driver install
- User set sgfxi script options
- Installing Xorg drivers for nVidia, ATI, Radeon, Intel (and more)
- Smxi Manual
Sgfxi currently supports ATI fglrx and Nvidia drivers. It also supports converting from or to xorg free drivers like ati, intel, or nv. Smxi uses sgfxi as its graphics driver installer engine, but simply adds some option support for users.
Sgfxi supports the following distros: Debian Stable, Debian Testing, Debian Sid. Current Ubuntu is supported. Arch Linux should also now be working. Not all features or options work for every distro, and Fglrx support tends to vary distro to distro and time to time.
The default driver is the driver that is installed if no arguments are used to override it. Unless your card is too old, and requires a legacy driver, in which case the script will it determine for you. For Nvidia, it will merely build a new kernel module for the kernel, and not remove or uninstall nvidia from other kernels. This only happens when the driver being installed is the same as already has been installed at least once on the system.
When you run the script, it will stop, and tell you what driver it is going to install. You can accept that, or exit and redo it with an override option if you want something different.
Running sgfxi through smxi
You can also run sgfxi through smxi (which uses sgfxi to install your graphics drivers). First, read the smxi homepage for more information, then run this command:
Smxi is an easy way to run sgfxi, and a lot of people seem to prefer it, since it selects the most common and useful options for installing the graphics driver, without any excessive user action required beyond selecting the number of the driver you want and hitting enter.
Running sgfxi directly
Do not start sgfxi with sudo, it causes weird and hard to diagnose problems, to the degree that sgfxi will test and exit with an error message if you tried using sudo to start it. This issue caused problems for years with Upstart/Mint/Ubuntu users, which were only recently solved.
The correct way to start sgfxi is as root, after leaving x with ctrl+alt_F1. Login as root, or su to root from your regular user login, then type:
and hit enter. If you want to start it with other options read below, but usually you don't need to unless you are installing latest beta driver (-B).
If you don't have root shell enabled, for now, you can use this command, issued as regular user, to get a root admin shell (note the dash after su, 'su -'):
sudo su -
sgfxi home page
The script home page can be found at the script forums.
For all the possible different ways to install sgfxi, please read the complete installation options. For most people, however, the following is probably all you need to know:
cd /usr/local/bin && wget -Nc smxi.org/sgfxi && chmod +x sgfxi && sgfxi
Or you can use the smxi.zip installation method if you prefer, which will give you smxi, sgfxi, and svmi, all ready to go.
How to use the sgfxi script options
Sgfxi has a lot of options, some of which only work for nVidia or AMD/ATI, or Xorg drivers. Also see the sgfxi options page for more information. The best way to get familiar with them is to simply look at the help menu.
The help menu is found by running this command:
When you use the -h option you will also see a list of all currently supported drivers, as well as a brief printout of your current system specifications, kernel, xorg version. Here are some useful sgfxi options:
-B Use latest Beta Driver for your card type. Autodetects card type/beta driver (nVidia/AMD-ATI cards only). If no beta driver is available, the current stable driver for your card type is used. -c Force use of Xorg composite mode. Beryl/Compiz requires this for 3d. Old nvidia/ATI/Intel cards not supported. Composite is default ON for newer nVidia cards (-c not required). -d Install distro packaged drivers. Works variably for Debian/Ubuntu. (formerly -s, which is now deprecated) -D Build distro package files for fglrx with FGLRX binary run package, then install them (ATI Only). Because of constant distro package file builder failures in Debian Sid/Testing, the direct install method is recommended and default for sgfxi. Ubuntu, on the other hand, works fine with -D, but not with sgfxi default. (No Arch support for -D) (formerly -F, which is now deprecated) -h View this help menu. -k Build kernel module either for current kernel or another kernel (with -K
OR the -B option (if you are using current beta driver) as well as the -! 40 option. EG: to install beta to all kernels: sgfxi -B -! 40 -! 40 must be the LAST option in your list of options or errors will occur!
Note that sgfxi will automatically run the create new xorg.conf routine if it detects that there is no xorg.conf file, which is default now on many systems that use the latest Xorg versions.
Sgfxi also has a few commands you can run to get general information, and these do not require being out of X. In other words, you can run them as regular user, in console, in X. These will simply show the requested information, and then exit the script.
-h View this help menu. -L List current live driver or status data then exit. Requires extra argument: d to show current drivers; n to show current nvidia support status; f to show current fglrx support status; v to show current latest local + remote sgfxi svn/server version information. Like this: sgfxi -L n OR sgfxi -L v -v Prints sgfxi current version information. Exits after.
Build (nVidia only) kernel modules
A newer feature helps nVidia card users (only, sorry ATI card owners) skip all the processing, cleanup, and reinstall, and simply build new kernel modules to whatever other kernels on their systems they like. Assuming, of course the kernel is supported by the driver.
The new -k option, coupled with -K [kernel to install module to] lets you install from one kernel to another, in X, without any fuss or bother. And the new -! 40 option simply tries to install a module for every kernel it can find on your system, except of course the running one. Note: -k cannot be used with -f, that creates a conflicting set of requests on sgfxi!
sgfxi # installs latest nvidia driver # create a new module for this kernel from your running kernel: sgfxi -k -K 2.6.32-dmz.3-686 # create nvidia kernel modules for all kernels: sgfxi -! 40
Please note that there must be a space between the -! and the 40 or it doesn't work.
A few things to note: the module you build must be already installed on your system. If you need to use another driver than current default, you can use the override option (-o [driver]) to do that, for example:
# 190.53 is installed using sgfxi, and you want to install it to # every other kernel as well. As long as sgfxi still supports that driver # it will work. sgfxi -! 40 -o 190.53
Again, this feature only works with nVidia cards, and only if you have already used sgfxi to install the driver. The feature tests for all requirements for the module build, and will exit if it is missing one, with a (hopefully) clear and explicit error message. If kernel headers are missing and are available in your repository, it will install those, if they are missing totally, it will give up.
Note that you can build the kernel modules in X, no need to exit, then you can do what you want, boot into any of the kernels, stay in your current desktop.
This feature only works with the direct run package installer that sgfxi defaults to, it does not work with distro packaged nvidia drivers.
User set sgfxi script options
See sticky options for more powerful methods of setting sgfxi user options permanently.
For live-cd binary, non-free video driver install
Some livecds, such as the one from aptosid, support installing the non-free video driver (nVidia or AMD/ATI Fglrx) before installation. This driver install will be retained should you decide to install to hard disk, but it's also a useful way to make sure the drivers are working in the first place.
To get started, first install the script using whatever method you want, then when you have it installed, leave X like this:
login as root, or reach a root shell via sudo su - (note the '-') and run this command
To see options, use:
X is restarted after the driver installs
Installing Xorg drivers for nVidia, ATI, Radeon, Intel (and more)
Installing Xorg drivers with sgfxi directly
You can also use sgfxi to move between free and non-free drivers or roll back to native free drivers: Key commands are:
-n Automatically installs correct native xorg nouveau, 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
Ex: sgfxi -N radeon Supported Xorg drivers: apm ark ati chips cirrus fbdev geode glide glint i128 i740 intel imstt mach64 mga neomagic nsc openchrome nouveau r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng vesa vga via voodoo vmware v4l Also configures xorg.conf as required. Full radeon xorg 3d configuration automatically.
First install the script using whatever method you want, then to install or rollback to a native driver:
sgfxi -n ## OR sgfxi -N <xorg driver> ## for example, for newer amd/ati card. sgfxi -N radeon ## or for older ATI card: sgfxi -N ati
Installing Xorg drivers using sgfxi through smxi
Use sgfxi via smxi. Simply start the script using the following options and it will take you straight to the graphics installer section. If you using smxi you don't need to install sgfxi, as smxi installs it automatically.
See smxi homepage for more information, then run this command:
The drivers for the X.Org X server (see xserver-xorg for a further description) provides support in 2d for NVIDIA Riva, TNT, GeForce, and Quadro cards and the ATI Mach, Rage, Radeon, and FireGLcards along with atimisc', 'r128' and 'radeon' sub-drivers. Also provides for the Intel free series in 3d.