Article: ATI driver with atiupgrade (by please_try_again)

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.

Installing atiupgrade

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][/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
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.

Using atiupgrade

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 

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][/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/ [/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]

/usr/bin/aticonfig --initial

or - in case two monitors have been detected - by running:

/usr/bin/aticonfig --initial=dual-head

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] [/li]> [li] [/li]> [li] [/li]> [/ol]

This is a super fantastic effort please_try_again. Thanks so much for putting this guide together for us to use here in the openSUSE forums! Thank You,

Thanks a lot!

Nice work! This will simplify the effort involved for new users to switch over to the proprietary ATI driver or upgrade when the need arises. :slight_smile:

Worked like a charm. Thanks so much for writing this script! Really streamlines everything!

Hi there,
Tried atiupgrade, and got the following messages and I don’t know what to do now !!!
Can you help ?

(in red the translation from french to english)
(1) - Analyzing system…
ATI graphic card detection failed. Is your ATI card a HD Radeon >= 5000 [yn] y
* Found ATI graphics card: HD > 5000x
/usr/bin/atiupgrade: ligne 356 : : : nombre entier attendu comme expression (integer expected as an expression)
/usr/bin/atiupgrade: ligne 370 : : trop d’arguments
(2) - Getting latest (or specified) Catalyst version: ligne397: amd-driver-installer-catalyst-12.11-beta-x86.x86_64.zip1 : erreur de syntaxe : opérateur arithmétique non valable syntax error arithmetic operator non valid(le symbole erroné est the wrong symbol is" amd-driver-installer-catalyst-12.11-beta-x86.x86_64.zip1")

try executing ./atiupgrade instead of just atiupgrade

I installed Catalyst yesterday by one-click install from and something was wrong, when I rebooted system refused to load. Now I can’t start system normally but only in recovery mode.
I have HP ProBook 4530s with hybrid graphics (intel and ati hd6490m).
From recovery mode I just tried to run your script but this is autput :

linux-6z4k:~ # atiupgrade
 (1) - Analyzing system...
     * Found ATI graphics card: HD 7400M
     * Found fglrx: 9.002
 (2) - Getting latest (or specified) Catalyst version: 12.10
 (3) - Installing required packages...
     * Kernel source matches installed kernel (3.4.11-2.16)
Failed to mount cd:///?devices=/dev/disk/by-id/ata-hp_DVD-RAM_UJ8B1_SKB2406334,/dev/sr0 on /var/adm/mount/AP_0x0OCUH6: Mounting media failed (mount: no medium found on /dev/sr0)

Where is the problem?

It appears that you still have your installation DVD repo enabled. From a terminal, become root with

su -

Enter root password when prompted, then enter

zypper lr -d

Disable it (assuming it is repo #1)

zypper mr --disable 1

or remove it with

zypper rr 1

*Be careful to select the right repo before entering these commands.

Works just as I wanted.

Is Atiupgrade working with OS 13.1?
Thanks in advance

Well I don’t know as I haven’t installed opensuse 13.1 yet. I suppose it should be working.