Tuesday 18 March 2008

Configuring ATI cards for Compiz-fusion 0.7.3

ATI cards have always had problems with Compiz on Fedora 8 -- at least for me. I had to go without Compiz for several months on Fedora 8 before I finally found out how to configure the darn thing to work. So here's how I went about it. Hope it helps any other fellow Linux ATI owners.

Step 1 : Uninstall old version of ATI driver

  1. The latest version of the ATI driver for linux released by AMD is Version 8.3 released on March 5th. If you have an older version of the driver, run the following commands to uninstall it. (If you have a customized xorg.conf, make sure to back it up first. The uninstaller deletes the file)

    cd /usr/share/ati
    sudo ./fglrx-uninstall.sh

  2. Now the system is clean. Make sure you have got the latest driver package from ATI and switch to a virtual terminal by pressing Ctrl+Alt+Fx where x can be any number between 1 and 6.

  3. Put the system in runlevel 3 - the single user mode. (This is not really necessary. But I prefer this way since it enables me to restart X and all services without really rebooting)

    sudo init 3

  4. Run the installer

    chmod +x ati-driver-installer-8-3-x86.x86_64.run
    sudo ./ati-driver-installer-8-3-x86.x86_64.run

  5. Once the driver finishes installing. Regenerate xorg.conf

    sudo aticonfig --initial -f

  6. Change back to runlevel 5 to see whether the driver installed correctly.

    sudo init 5

  7. If you see the graphical logon screen, congratulations. The driver was installed correctly.
    Open a console window and type


  8. Check whether the output is something similar to:
    display: :0.0 screen: 0
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: ATI Mobility Radeon X2300
    OpenGL version string: 2.1.7412 Release

Step 2 : xorg.conf modifications

  1. My favourite editor is vim and here's how to invoke vim to edit xorg.conf
    sudo vim /etc/X11/xorg.conf
    if you prefer to copy and paste, it's easier to invoke an editor like gedit or kwrite
    sudo gedit /etc/X11/xorg.conf &

  2. ServerLayout Section
    Add the following line
    Option "AIGLX" "true"

  3. Module Section
    Load "dri"
    Load "extmod"

  4. Device Section
    Option "DRI" "true"
    Option "XAANoOffScreenPixmaps" "true"

  5. ServerFlags Section
    Option "AIGLX" "on"

  6. Create two new sections as follows
    Section "DRI"
    Group 0
    Mode 0666

    Section "Extensions"
    Option "Composite" "enable"

  7. That's all the configuration required. Here's a full dump of my xorg.conf for your reference:
    Section "ServerLayout"
    Identifier "aticonfig-Layout[all]"
    Screen 0 "aticonfig-Screen[0]" 0 0
    Option "AIGLX" "true"

    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "gb"
    Option "XkbOptions" "altwin:super_win"

    Section "InputDevice"
    Identifier "Synaptics"
    Driver "synaptics"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "auto-dev"
    Option "Emulate3Buttons" "yes"

    Section "Files"

    Section "Module"
    Load "dri"
    Load "extmod"

    Section "Monitor"
    Identifier "aticonfig-Monitor[0]"
    Option "VendorName" "ATI Proprietary Driver"
    Option "ModelName" "Generic Autodetecting Monitor"
    Option "DPMS" "true"

    Section "Device"
    Identifier "aticonfig-Device[0]"
    Driver "fglrx"
    Option "DRI" "true"
    Option "XAANoOffScreenPixmaps" "true"

    Section "Screen"
    Identifier "aticonfig-Screen[0]"
    Device "aticonfig-Device[0]"
    Monitor "aticonfig-Monitor[0]"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 24

    Section "ServerFlags"
    Option "AIGLX" "on"

    Section "DRI"
    Group 0
    Mode 0666

    Section "Extensions"
    Option "Composite" "enable"

Step 3 : Install Compiz-fusion 0.7.3

  1. Before proceeding, make sure all older versions of Compiz have been removed from your system.
    sudo yum remove *compiz*

  2. Delete Compiz gconf settings
    rm -rf ~/.gconf/apps/compiz

  3. Install the Compiz YUM repository. (Thanks to leigh123 at FedoraForums.org http://forums.fedoraforum.org/forum/showthread.php?t=173317)
    sudo wget http://www.dfm.uninsubria.it/compiz/fusion/compiz-fusion.repo\ -O /etc/yum.repos.d/compiz-fusion.repo

  4. List out all your enabled repos
    sudo yum repolist

  5. Disable all repos except "fusion" repo while installing compiz. For example, if you only have fedora and livna repos enabled in addition to the fusion repo, this is how you would install compiz:
    sudo yum --disablerepo=fedora --disablerepo=livna install compiz-all \ fusion-icon-all compiz-fusion-plugins-unsupported compiz-bcop ccsm \ emerald-themes

  6. Now you should be able to run Compiz ! Start Compiz by running fusion-icon from the Applications > System Tools menu

  7. If Fusion-icon doesn't work. Try running compiz as follows
    LIBGL_ALWAYS_INDIRECT=1; compiz --replace ccp emerald

Important: Some updates cause the ATI OpenGL libraries to be replaced by Mesa libraries. If you see a white screen when running Compiz after a system update, simply run the ATI driver installer again and restart the X-server by pressing Ctrl+Alt+Backspace
Checkout some awesome Compiz effects :)

1 comment:

Dasun said...

Thanx man for this Great guide, I hoped that this ATI & compiz Matter would never end.
Good to here it ends and now they r working soothly.
I followed ur Guide and Got my fedora Box flying.
Thankx agin .
Hope to c you with a new guide.