Difference between revisions of "Ubuntu Gutsy Installation Guide"

From cchtml.com
Jump to: navigation, search
(Method 2: Install the Catalyst 7.12 Driver Manually)
(Method 2: Install the Catalyst 7.12 Driver Manually: Install using DKMS)
Line 43: Line 43:
sudo apt-get update
sudo apt-get update
sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper \
sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper \
debconf libstdc++5 linux-headers-generic
debconf libstdc++5 linux-headers-generic dkms
Line 97: Line 97:
sudo apt-get -f install
sudo apt-get -f install
''Compile the kernel module:''
sudo module-assistant prepare,update
sudo module-assistant build,install fglrx -f
sudo depmod -a
Line 158: Line 151:
sudo update-rc.d ati-module-fix defaults [seqno]
sudo update-rc.d ati-module-fix defaults [seqno]
'''IMPORTANT''': You have to recompile the kernel module after each kernel update!
(Note: This does not affect you until the next time you update your kernel.)
Comment the following line in the file /etc/modprobe.d/lrm-video { add at 27/11/2007 }
# Make nvidia/nvidia_legacy and fglrx use /sbin/lrm-video to load
#install fglrx /sbin/lrm-video fglrx $CMDLINE_OPTS #  << this line
install nvidia /sbin/lrm-video nvidia $CMDLINE_OPTS
install nvidia_legacy /sbin/lrm-video nvidia_legacy $CMDLINE_OPTS
install nvidia_new /sbin/lrm-video nvidia_new $CMDLINE_OPTS

Revision as of 09:39, 21 December 2007

The latest fglrx driver supports Radeon 9500 and the X-series cards up to HD2900. Workstation cards are not supported.

Pre-Installation Checks

Enable "restricted" Repository

Make sure the restricted repository is enabled in /etc/apt/sources.list or this guide will not work!

System > Administration > Software Sources. Check "Proprietary Drivers for Devices (Restricted)" box.


For most users it won't be necessary to go into installation and configuration details of the driver. Ubuntu 7.10 (Gutsy) provides a notification saying that there are restricted drivers available. You just have to go there (Restricted Drivers Manager) and enable the "ATI accelerated graphics driver". Ubuntu will then install and configure the driver for you. If this does not provide the optimal solution you were looking for, please read ahead.

Method 1: Install the Driver the Ubuntu Way

This will install the driver that is currently in the repositories. It may be older than the current version from AMD.

sudo apt-get update	
sudo apt-get install linux-restricted-modules-generic restricted-manager
sudo apt-get install xorg-driver-fglrx
sudo depmod -a

The second line of the above may not be necessary. If apt says it cannot find the "linux-restricted-modules" package, try line 3. If that fails, check your sources.list (see top of page)

If the system complains about dependencies, use your preferred package manager to download python2.4 and, if necessary, its dependencies.

Method 2: Install the Catalyst 7.12 Driver Manually

This is just an alternative installation method for the section above. It might help if you still get 'DRI missing' errors.
  • Note: If you are running the -rt kernel, you will fail to compile the kernel module with "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol '__rcu_read_lock'".

Download the ATI driver installer: ati-driver-installer-7-12-x86.x86_64.run (this installer is for 32bit and 64bit systems)

Change to the download directory. Make sure that you have the universe and multiverse repositories enabled in /etc/apt/sources.list before doing these steps.

There is a detailed manual with screenshots at Ubuntu Wiki.

By default, Ubuntu did not enable the Universe and Multiverse repositories, but now in Gutsy, both Universe and Multiverse are activated by default.

Install necessary tools:

sudo apt-get update
sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper \
debconf libstdc++5 linux-headers-generic dkms

Create .deb packages:

sudo bash ati-driver-installer-7-12-x86.x86_64.run --buildpkg Ubuntu/gutsy

note: if this step fails with a signal being caught, and you are running the script on an NFS-mounted directory, copy it to a local partition, and it will work.

If this step fails on amd64/x86_64 with a No such file or directory message about missing files in X11R6/lib, follow these instructions and come back here. Also check that your downloadpath does not contain spaces.

Blacklist old fglrx module from linux-restricted-modules:

As Ubuntu Gutsy's linux-restricted-modules package includes the fglrx module from an old driver version (8.37.6), we have to blacklist this module to make sure the new kernel module which is needed by the new driver will be used instead.

Ubuntu/Gnome users type in:

gksu gedit /etc/default/linux-restricted-modules-common

Kubuntu/KDE users type in:

kdesu kate /etc/default/linux-restricted-modules-common

Add "fglrx" to the line "DISABLED_MODULES"

File: /etc/default/linux-restricted-modules-common

Please note that after the modification above, the "Restricted Driver Manager" will signal "ATI accelerated grapichs driver" not enabled (unticked). This is perfectly correct. At the end of the installation procedure it will signal in Status: "in use" (green light), but NOT enabled. It simply means that the fglrx module contained in the linux-restricted-modules package is not enabled, but another fglrx module (7.12) is in use.

Install .deb packages:

sudo dpkg -i xorg-driver-fglrx_8.433-1*.deb fglrx-kernel-source_8.433-1*.deb fglrx-amdcccle_8.433-1*.deb
  • Note: If you get a 'Bad file descriptor' message concerning the xorg.conf file try switching user to root and repeating the same command without sudo. This might be valid for the following commands too. (Ubuntu Gutsy installs with no password set for root by default. You can set a password for the root by typing 'sudo passwd root' first.)
  • Note: If you have a 64 bit install, the above dpkg command will likely complain that "Errors were encountered while processing: fglrx-amdcccle". This is because of a dependency of the amdccle package on 32 bit libraries. If you recieve this error, issue the following command after the above dpkg command, which will force the installation of all of the 32 bit dependencies, and then the amdccle pacakge:
sudo apt-get install -f

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

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

Fix broken dependencies

  • Note: You only need to do this if you have installed previous versions of these drivers using this method before.
sudo apt-get -f install

It's necessary, because sometimes this file is written by other packages, and so there's no 3D acceleration. Check that the file /lib/modules/$(uname -r)/misc/fglrx.ko has been created.

Create the following folder

sudo mkdir /lib/modules/$(uname -r)/volatile

Note: the volatile directory might already exist at this stage then simply continue with the next step.

Create a symbolic link

sudo ln -sf /lib/modules/$(uname -r)/misc/fglrx.ko /lib/modules/$(uname -r)/volatile/fglrx.ko

NOTE : On my Gutsy install, after a reboot this link was always removed automatically leaving me without an fglrx module loaded, and thus no ATI rendering. There have been several ways of getting around this suggested here, and here is the one that worked for me:

sudo gedit /etc/init.d/ati-module-fix

And put this in it:

#!/bin/sh -e

# For loading ATI display drivers

ln -sf /lib/modules/$(uname -r)/misc/fglrx.ko /lib/modules/$(uname -r)/volatile/fglrx.ko
exit 0

Make it executable

sudo chmod ugo+x /etc/init.d/ati-module-fix

Now, make this run before gdm

To check the gdm sequence number,

ls /etc/rc2.d/

The value for [seqno] in the section below should be the gdm sequence number -1.

sudo update-rc.d ati-module-fix defaults [seqno]

Configure the Driver

  • Note Method 2 Users: Before you carry out this step you must reboot your machine. Or else the fglrx driver will not be in use on xorg.conf and using the aticonfig options will cause a memory dump and not intialise the Driver properly.
  • Note: An alternative to the aticonfig --initial command is to edit /etc/X11/xorg.conf and 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 etc. Another alternative is aticonfig --initial --force if you encounter issues with the first command.
sudo aticonfig --initial


sudo aticonfig --overlay-type=Xv
  • Note: Alternative in the overlay-type to "Xv" can be "opengl" or "disable" if the TV-out makes problems in videos.

Alternative: Configure the Driver, The Manual Way:

An alternative to the "sudo aticonfig" commands is to edit "/etc/X11/xorg.conf" and change the "Device" section for the video card as shown below. This way you won't lose your old settings.

gksu gedit /etc/X11/xorg.conf
Section "Device"
#       Driver          "vesa"
	Driver		"fglrx"
	Option		"VideoOverlay"		"on"
	Option		"OpenGLOverlay"		"off"

Finish the Installation

Now save any open document and reboot your system:

sudo shutdown -hr now
  • Note: An alternative to rebooting is to restart the X Server by pressing your CTRL ALT BACKSPACE keys. You must remove any old kernel modules such as "drm" "radeon" or "fglrx" using the "rmmod" command. Example: sudo rmmod fglrx

Post-Installation Checks


Run the following command to check its output to ensure the fglrx driver is installed properly:

$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon Xpress Series
OpenGL version string: 2.1.7059 Release

The OpenGL vendor string should read ATI and not Mesa.

If it still says Mesa and not ATI, even after re-enabling the driver from the Restricted-manager: You can try the following:

  • Remove all the packages provided by the xserver-xorg-video-all meta-package (search for it using Synaptic or Adept), then restart the machine. The X Server should now use the new fglrx driver by force (provided the driver is being used in xorg.conf).
If you can't log in after this, you'll have to log in to a terminal in the login screen, and reinstall the xserver-xorg-video-all package. Your problem is probably somewhere else. (taken from [1]).

Note: these are the checksums for the compiled modules on Ubuntu 7.10, kernel 2.6.22-14-generic.

$ md5sum `find /lib/modules/ -name fglrx.ko`
ab36c7ba7236716af62150d81e23db2e  /lib/modules/2.6.22-14-generic/volatile/fglrx.ko
ab36c7ba7236716af62150d81e23db2e  /lib/modules/2.6.22-14-generic/misc/fglrx.ko
1d39c0fd4e8c8ed08509ef1bf4087b5e  /lib/modules/2.6.22-14-generic/kernel/drivers/char/drm/fglrx.ko
1d39c0fd4e8c8ed08509ef1bf4087b5e  /lib/modules/fglrx/fglrx.ko
1d39c0fd4e8c8ed08509ef1bf4087b5e  /lib/modules/fglrx/build_mod/2.6.x/fglrx.ko
1d39c0fd4e8c8ed08509ef1bf4087b5e  /lib/modules/fglrx/build_mod/fglrx.ko

If it says libGL.so.1: cannot open shared object file: No such file or directory... Check if you have a /usr/lib/libGL.so.1.2, if so do this:

 ls -l /usr/lib/libGL*
  • The file permission should be "-rw-rw-r--". If the permission reads "-rw-rw----", do command
 sudo chmod o+r /usr/lib/libGL.so.1.2
  • If the permission is correct, fixed with command:
sudo ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1

Note: Here is the glxinfo of a good install (for those interested).

3D desktop effects

The new ATI drivers use AIGLX so there is not need to install XGL that older drivers (< 8.40) required.

Remove this section from to the /etc/X11/xorg.conf file. The new xorg server enables "Composite" by default.

# Section "Extensions"
#        Option  "Composite" "0"
# EndSection

Compiz does not know about the fglrx driver. You can either skip the checks

mkdir -p ~/.config/compiz && echo SKIP_CHECKS=yes >> ~/.config/compiz/compiz-manager

or add it to the compiz white list, and clear the blacklist pci Ids variable *Recommended*

sudo gedit /usr/bin/compiz
# Driver whitelist
WHITELIST="fglrx nvidia intel ati radeon i810"
# blacklist based on the pci ids 

After the necessary configurations, just restart X and enjoy the cool effects.

For Kubuntu you need some extra steps:

sudo apt-get install compiz compiz-kde compizconfig-settings-manager compiz-core compiz-fusion-plugins-main compiz-plugins

To test 3D Effects, press ALT+F2 and type "compiz --replace".

To configure use the tool KMenu->Settings->Avanced Desktop Effect Settings.

Additional configure with aticonfig tool

You can configure the driver even further with the aticonfig tool, more information can be found at Configuring.

For example:

  • use powerplay option to switch power state for battery friendly or performance mode
  • use dual head or one big desktop mode
  • turn second monitor on/off on the fly

Ubuntu-specific Issues

If installing 8.42.3 on Ubuntu x64... (fglrx 7.11 does not require this)

(thanks to Michael at Phoronix forums and aolana at Ubuntuforums.org)

Building packages for Ubuntu 64-Bit is known to be broken. If you're installing on Ubuntu 64-Bit, do this:

Download this: fglrx-8.42-ubuntu+debian-2.tar.bz2

Extract the installer:

bash ati-driver-installer-8.42.3-x86.x86_64.run --extract somedirectory

Extract the archive you downloaded to the directory that you extracted the driver's installation files to.

Then build the package:

./ati-installer.sh 8.42.3 --buildpkg Ubuntu/gutsy

Revert to Xorg driver

If (for any reason) the fglrx install fails, you can revert to the Xorg driver by executing

sudo dpkg-reconfigure xserver-xorg

and selecting the "ati" driver, or simply restoring the previous /etc/X11/xorg.conf file, if you made a backup.

You also need to remove the xorg-driver-fglrx or your manually installed drivers to get the 3D acceleration back, since it is provided by file /usr/lib/libGL.so.1.2 which belongs to libgl1-mesa package and which is moved to backup and replaced at the installation of xorg-driver-fglrx (or the manually built) package. In case the removal of the fglrx drivers fails to restore the file from libgl1-mesa, you have to reinstall the package by running:

sudo apt-get install --reinstall libgl1-mesa

Attention: Suspend/Hibernation will not work

With Gutsy release, there's a big problem using any version of the ATI proprietary drivers. The Suspend/Hibernate function will stop working. The problem is due to the new SLUB allocator incorporated in 2.6.22 / 2.6.23 Kernel. There are no workaround, except:

- Boot using the older kernel (ver 2.6.20)

- Return to Feisty (with 2.6.20 kernel, and apply specific solutions: see Feisty installation guide).

- Use default Mesa Drivers (the easiest way is to disable ATI driver from Restricted Driver Manager).

- Recompiler your Kernel to use SLAB.

Unfortunately some new ATI cards couldn't start X with Mesa drivers, so the only workaround is returning to Feisty.

The problem was supposed to be solved in the AMD Catalyst 7.11 driver release (supporting the 2.6.23 kernel), but it is not.

A similar problem appears with nVidia cards. No explanation or workaround has been forthcoming.

Screensaver Preview Mode Does Not Work under Gnome

After following the Manual Method 2 installation the Gnome Screen Saver "Preview" button causes X-Windows to crash, although the screen saver works fine when it starts up after the system has been idle for the specified amount of time.

(No known workaround at this time.)

If you get /usr/X11R6/lib/modules/dri/fglrx_dri.so not found

sudo ln -s /usr/lib/ /usr/X11R6/lib/modules

libGL error

  • fglrxinfo gives: libGL.so.1: cannot open shared object file.
  • Check the permission of the libGL.so.1.2 file with command:
 ls -l /usr/lib/libGL*
  • The file permission of libGL.so.1.2 should be "-rw-rw-r--". If the permission reads "-rw-rw----", do command
 sudo chmod o+r /usr/lib/libGL.so.1.2
  • If the permission is correct, fixed with command:
sudo ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1

See Also