Search this site:

2008-02-20

Upgraded My Linux ATI Driver - AIGLX + COMPIZ Enabled!


Hurray!!!

Since the announcement for the Linux version of ATI display card driver supporting AIGLX last year, I don't have time to upgrade it. Until a few days ago, thanks to my illness, I got some time to give it a try. Having a brief Google search, I first followed the instructions here to remove the old driver, and then read here for hints to install the latest one. However, I made some stupid mistakes and failed to load the new driver module:

$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.4 (2.1 Mesa 7.0.1)

$ sudo modprobe fglrx
$ lsmod | grep fglrx
$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.4 (2.1 Mesa 7.0.1)

$

I raised this problem at the Ubuntu Forums (silly enough to reply to a wrong thread...) and the root cause was pinpointed very soon by DoDoNet, really Thanks! Disabling the old drivers in the Restricted Driver Manager probably add a line to blacklist the kernel module. Simply removing the line solves the problem.

To make the lives of Linux newbies (me included) easier, I decided to have a walk through of what I have done. First I'd like to talk about some backgrounds. Like many of you does, I enjoy the awesome desktop effects provided by Compiz Fusion. The display card of my Thinkpad T60 is an ATI Mobility Radeon X1400 which is not supported by the open source ATI display driver (at the time this article was written at least). But that's a pity that the old official ATI display driver has no AIGLX support. As a result, I need to run my Compiz Fusion over Xgl, which is relatively slow and need more resources. Owing to the high demand, AMD has finally add AIGLX support in their Linux version of driver, named fglrx. This means that ATI users can now running Compiz Fusion on their X directly with AIGLX, like those Nvidia users does long time ago.

Ah... I think it worth mentioning, my box is running Ubuntu Gutsy Gibbon.

Seems that I have already talked too much, so let's start now. The following instructions are based on Forlong's blog and the Community Ubuntu Documentation, plus some of my personal comments.

1. I removed my Xgl, also removed the xsession created for Xgl (you may not have those files):
$ sudo apt-get remove xserver-xgl
$ sudo rm /etc/X11/Xsession.d/98xserver-xgl_start-server
$ sudo rm /usr/share/xsessions/xgl.desktop


2. Then I went to System -> Administration -> Restricted Driver Manager to disable the ATI accelerated graphics driver. I also blacklisted it in the configuration file, using your favorite text editor to edit the following file:
$ sudo vim /etc/default/linux-restricted-modules-common

Add fglrx to the DISABLED_MODULES list (your list may contain more modules):
DISABLED_MODULES="fglrx"


3. I rebooted the machine. Now it should be using the Mesa driver:
$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.4 (2.1 Mesa 7.0.1)

$


4. Then I installed pre-requisites for building the debs:
$ sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper debconf libstdc++5 linux-headers-generic


5. I downloaded the latest driver from the official site, ran it to create debs. (Check the link to the latest driver for your card at here)
$ wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8-02-x86.x86_64.run
$ chmod +x ati-driver-installer-8-02-x86.x86_64.run
$ sudo ./ati-driver-installer-8-02-x86.x86_64.run --buildpkg Ubuntu/gutsy


6. Obviously, the next step was to install those debs.
$ sudo dpkg -i fglrx-kernel-source_8.455.2-0ubuntu1_i386.deb
$ sudo dpkg -i xorg-driver-fglrx_8.455.2-0ubuntu1_i386.deb

Optionally you can install the Catalyst Control Center too (I did):
$ sudo dpkg -i fglrx-amdcccle_8.455.2-0ubuntu1_i386.deb


7. I then enabled the driver in Xorg configuration by running the following command:
$ sudo aticonfig --initial

You may also edit /etc/X11/xorg.conf to customize your settings.


8. I rebooted my machine at this point, but if you do like I did, you may face the problem I mentioned earlier. Edit the following file with your favorite text editor before rebooting:
$ sudo vim /etc/modprobe.d/blacklist-restricted

Comment out or remove the line blacklist fglrx, if exists. Save the file and now you may reboot.


9. After your box is up again, check whether the module is loaded and whether the driver is in used:
$ lsmod | grep fglrx
fglrx 1476940 25
agpgart 35016 2 fglrx,intel_agp
$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1400
OpenGL version string: 2.1.7281 Release

$


10. Yeah! What remaining is just to enable the lovely Compiz Fusion.
compiz --replace &


Everything should just work fine. Enjoy!

If you are tired of following the above steps manually, you may try the installation script prepared by DoDoNet, I found that when I asked my question at the Ubuntu Forums.

Wow, what a long long post... Wish it could help some of you.


4 comments:

  1. Hy. This don't work for me. When I use compiz, monitor show me white screen.

    ReplyDelete
  2. Same for me, what happend?

    ReplyDelete
  3. I actually got a white screen every time i upgrade the ATI driver. Just run the aticonfig to update the xorg.conf should be fine.

    ReplyDelete
  4. Thank you, thank you, Mr. Circle. This has fixed a really sticky problem with my dual-head setup.

    A note to other readers (apologies if this no help to kv1dr) - if you are still getting white-screen after all good advice above, this might make your system usable: get a command line somehow (e.g. ctrl,alt,f1) and add the following 3 lines to the end of /etc/X11/xorg.conf :

    Section "Extensions"
    Option "Composite" "disable"
    EndSection

    If your window handlers disappear, get a command prompt and type:

    metacity --replace

    These 2 suggestions are temporary workarounds to make your system usable. If you want to know what they do, use google. Both have the effect of making your X installation a bit more stupid so none of the flashy effects and compiz stuff will work.

    But at least you might have a keyboard and a mouse and something other than a white screen to look at as another bleary bloodshot autumn morning drags its lazy carcass from dawn's torpid embrace.

    ReplyDelete

HTML Tags allowed (e.g. <b>, <i>, <a>)

Disclaimer

ALL CONTENTS AND INFORMATION IN THIS WEB SITE ARE PROVIDED "AS IT" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE ACCURACY AND AVAILABILITY OF THE CONTENTS, INFORMATION AND THE WEB SITE ITSELF ARE NOT GUARANTEED. THE AUTHOR TAKES NO RESPONSIBILITIES ON ANY COSTS OR DAMAGES (DIRECT OR INDIRECT) ARISING OUT OF OR IN CONNECTION WITH THE ACCESS, USAGE OR INABILITY OF USAGE OF THIS WEB SITE.