Let’s start with the actual code. See the latest info here
The above link will be used to provide a link to the very latest info on the use of Atiupgrade. Please use the rest of this as a reference guide
Now a Reference Guide:
atiupgrade is a bash script that builds, packages and installs the ATI proprietary driver (Catalyst). It can do more than its name implies, specifically:
[li]replace the opensource driver (radeon/radeonhd) on a fresh openSUSE install [/li][li]replace an older ATI driver installed from the ATI repo [/li][li]upgrade - or even downgrade - a previously installed ATI driver installed with the ati run file (but not packaged) [/li][li]upgrade or downgrade from a package created with atiupgrade. [/li][/ul]
More precisely, atiupgrade doesn’t package the driver itself but just passes specific parameters to the ati run file to instruct it to create a package for openSUSE.
You can install atiupgrade several ways.
[li]from my repo for the latest version of openSUSE by typing the following commands in a terminal or in the console: [/li][li](Older versions will require you edit the repo info accordingly)[/li]
su -l zypper ar [noparse]http://download.opensuse.org/repositories/home:/please_try_again/openSUSE_12.2/[/noparse] PTA zypper refresh -r PTA zypper in atiupgrade
[li]by downloading the script from this page, saving in an appropriate place (such as /usr/bin or /usr/local/bin) and making it executable: [/li]
su -l cd /usr/bin wget http://www.unixversal.com/linux/openSUSE/atiupgrade chmod 755 atiupgrade
[li]or by copying/pasting the code posted here into a file and making this file executable as in the example just above. [/li][/ul]
The way you install it doesn’t matter. It is just a single script. Installing from the repo is easier, especially in situations where X cannot be started and you have to work in the console, and it ensures that the script is executable and installed in the right place.
To use atiupgrade once properly installed, just type:
It must be executed as root, so if you are not already logged in as root, you would have to type:
su -l atiupgrade
Running atiupgrade inside or outside of X.
If another ATI proprietary driver is not already installed - and thus the fglrx module is not loaded - you can run atiupgrade in xterm (or any terminal in a X session), and it should normally complete all the steps. Be warned that X might crash if you do not reboot immediately: Do not just log out! I don’t like this approach very much. There is no point in installing a graphic driver in X when you can do it in console - but that’s just my opinion. However, you might not have the choice if you don’t have a network connection in console - like if you are using the networkmanager. In this case, atiupgrade will build and create the package but not install it, and you will have to run the script again after [b]rebooting in runlevel 3[/b]. At that point it will no longer need a network connection. It remembers where it saved the package the first time and installs it.
What does atiupgrade do?
atiupgrade is divided in 10 steps.
[li]steps 0-5 can be performed in X. [/li][li]steps 6-9 must be performed in console if you are upgrading/downgrading a running fglrx driver, but can be performed in X when you install fglrx for the first time. [/li][/ul]
Notice that fglrx refers to the kernel module while Catalyst refers to the ATI product. The name of the rpm package built by the ati installer is in the form fglrx64_xpic_SUSE114-8.861-1.x86_64
[li] (0) creates a directory /usr/share/atiupgrade to download the installer and later store the rpm package. [/li][li] (1) checks the model of your ATI card[/li]If you don’t have an ATI graphics card or the model of your graphics card cannot be determined or is not supported, atiupgrade will issue a warning suggesting to cancel. You can build and package the driver on a non ATI machine if you wish and cancel the script when prompted to install, as it doesn’t make much sense to install the ATI driver on a non ATI machine. Be aware though that even if you create the package in advance to install it on another machine, you will still have to install the kernel sources on the system where you install the driver, since the kernel module is compiled when you install the package, not when you build it.
[li] (2) gets the version number of the latest available Catlayst from ATI download page.[/li]The latest Catalyst version will be read from the page [noparse]http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx[/noparse]. If this page changes, can not be read, or the version number can not be found for any reason, atiupgrade will switch back to the version specified in the variable catalystDef at the top of the script. You can modify this value by editing the script for future versions. Finally, you can explicitly specify the version of Catalyst to install as a command line argument to atiupgrade. It will overwrite both the latest version available on the ATI site and the default version set in catalystDef. That way you could also downgrade the driver (although I never did it, so it should be considered as untested).
[li] (3) installs kernel sources and compiler[/li]atiupgrade will install all the packages needed to compile the driver. This include gcc, make and the kernel sources. If these are already installed, it won’t install them again. However it might take a couple seconds to check if they are present. So just be patient at this point. If these packages are going to be installed, the output in the terminal will be a bit longer. Previous versions of atiupgrade used to install the devel_basis pattern. I finally realized that it is of little use to most people, so now it only installs the gcc compiler and the make utility.
[li] (4) downloads the latest version of ATI Catalyst installer or the version specified in catalystDef or in the command line (as desctibed in (2)). [/li]If you specify the version to be installed in an argument, you should use an hyphen in the version number, not a dot! 11-4, 11-5, 11-6 are valid arguments.
[li] (5) creates fglrx rpm package. [/li][li] (6) checks if the fglrx module is loaded (and unloads it if it is) [/li][li] (7) uninstalls the current Catalyst driver which was installed either[/li][LIST]
[li] from earlier rpm package (fglrx-xxxx.rpm) [/li][li]from repo (x11-video-fglrxG02 ) [/li][li]from the ATI run file (with /usr/share/ati/fglrx-unistall.sh) [/li][/ul]
although I haven’t tested the last case.
[li] (8) installs the fglrx package stored in /usr/share/atiupgrade.[/li]If there are several packages (from different versions), it should pick the right one … unless they have all been created on the same day, which is unlikely to happen. If, for some reason, you’re going to run atiupgrade twice within the same 24 hours to build two different versions of the ATI driver, you should previously remove the fglrx rpm package from the /usr/share/atiupgrade directory.
[li] (9) Checks if a flgrx driver section is needed in /etc/X11/xorg.conf, and if so, creates one by running: [/li]
or - in case two monitors have been detected - by running:
although it is not guaranteed that a basic dual-head configuration will do what you’re expecting.
Notice: The kernel module has to be recompiled every time after a kernel update. It used to be a problem resulting in many black screens in the past. Fortunately the package now installs a service which recompiles the module when the kernel has been updated. (Make sure to update the kernel sources as well!)
Why does atiupgrade deinstall/reinstall flgrx instead of just updating it?
Because the package is created by the ATI installer, not by atiupgrade and so the name might change. It was necessary to install the package on openSUSE 11.4, as the release was newer than the driver and the ATI installer could not create a package for 11.4 - so atiupgrade let it believe it was 11.3. This is the purpose of the variable LastSupportedSUSE in the script (which is currently 12.1).
atiupgrade - screenshots Examples
[li]installing Catalyst 11.5 on a fresh openSUSE install[/li]
[li]There is no fglrx module loaded, [/li][li]All steps can be performed in X. [/li][li]After the script has completed, reboot immediately. (Do not log out!) [/li][/ul]
[li]updating to Catalyst 11.6|steps 0-5 (in X)[/li]|
|steps 6-9 (in console after [b]rebooting in runlevel 3[/b])
Original Forum Links:
[li]http://forums.opensuse.org/english/other-forums/development/programming-scripting/449058-upgrading-ati-driver-atiupgrade-7.html#post2358182 [/li]> [li]http://forums.opensuse.org/english/other-forums/development/programming-scripting/449058-upgrading-ati-driver-atiupgrade-7.html#post2358184 [/li]> [li]http://forums.opensuse.org/english/other-forums/development/programming-scripting/449058-upgrading-ati-driver-atiupgrade-7.html#post2358185 [/li]> [/ol]