Tuesday, October 30, 2007

monkeying.around.with.gutsy.and.fglrx

Val posted a followup on a promise a made in a previous blog, and here it is.
If you happen to own an ATI Radeon card, you might notice that Gutsy Gibbon's (Ubuntu 7.10) default setup makes use of ATI's restricted drivers, this will actually allow you to have a working desktop but note that it won't allow beryl/compiz to run. Being a desktop effect junkie, I find this unacceptable and as soon as I got the basic apps installed I started poking my way into configurations to find the best way to set things up. In the course of searching for a solution however, I managed to render my Ubuntu desktop useless a few times before finally finding the right mix. I also tried using envy but at that time the only fix I see for Envy on Gutsy was to replace the Linux Mint line into 'Gutsy' and cross one's fingers that it works...I crossed mine and it didn't :)

I hope to spare you guys the trouble of experimenting...so here goes.

first things first, make sure we are updated!:

sudo apt-get update
sudo apt-get install module-assistant build-essential
sudo apt-get install linux-headers-$(uname -r)


download the official driver from ATI's site (ati.amd.com)

next step involves generating our own packages from the official driver

sh ati-driver-installer-8.40.4-x86.x86_64.run --buildpkg Ubuntu/gutsy

Install .deb packages

sudo dpkg -i xorg-driver-fglrx_8.40.4-1*.deb
sudo dplg -i fglrx-kernel-source_8.40.4-1*.deb

Remove old fglrx debs from /usr/src/...if any:

sudo rm /usr/src/fglrx-kernel*.deb

Compile the kernel module:

sudo module-assistant prepare
sudo module-assistant update
sudo module-assistant build fglrx
sudo module-assistant install fglrx
sudo depmod -a


*note that you will have to do this every time the kernel is updated

Configure the driver:

sudo aticonfig --initial


according to the official wiki, you can replace the string "ati" with "fglrx" in the "Device" section. This way you won't lose your old "Screen and "Monitor" settings. Afterwards you can use aticonfig for setting overlay.

sudo aticonfig --overlay-type=Xv

reboot and run fglrxinfo in the terminal to confirm installation.

*Note: Ubuntu's linux-restricted-modules includes the fglrx module from an old driver version. We need to blacklist his module to ensure that the new kernel module is used.

sudo nano /etc/default/linux-restricted-modules-common

Edit the DISABLED_MODULES section to include fglrx:

DISABLED_MODULES="fglrx"
You should be able to install and configure compiz-fusion easily after this, just don't forget to recompile the modules once you update the kernel. Btw some of the niftier improvements I've noticed with Gutsy is that it practically fixed the wireless issues I had with Feisty Fawn (7.04), network manager is working A-OK with my ralink card, another one is the screen tearing/flickering I experienced since my Dapper Drake days, where my screen tears/flickers on screen updates (window updates/object refresh) this time the refresh is handled well by the OS update. Lastly, Gutsy's XGL will automatically start the next time you log in after it is installed (no need to setup an XGL session).

2 comments:

CNSQ Online said...

Nice post George

Avat@r said...

Salamat bai, hope you learned something :)