Debian Installation Guide: Difference between revisions

From cchtml.com
No edit summary
Line 23: Line 23:
<pre>
<pre>
sudo apt-get install module-assistant build-essential fakeroot dh-make debconf bzip2
sudo apt-get install module-assistant build-essential fakeroot dh-make debconf bzip2
sudo sh ./ati-driver-installer-8.35.5-x86.x86_64.run --buildpkg Debian/etch (or sid, sarge, lenny, etc. (run with --listpkg too see which Distributions and releases are available))
sudo sh ./ati-driver-installer-8.35.5-x86.x86_64.run --buildpkg [Distribution]
(run with --listpkg too see which Distributions and releases are available)
</pre>
</pre>
This used to create five deb packages in the current directory. With version 36, it creates only four. If this step succeeded without any errors but there are no packages, check the /tmp directory.
This used to create five deb packages in the current directory. With version 36, it creates only four. If this step succeeded without any errors but there are no packages, check the /tmp directory.

Revision as of 21:19, 6 June 2007

As of November 2005, ATI's drivers are in the non-free area of Debian. Make sure your /etc/apt/sources.list contains "contrib non-free" as well as main. You will, however, have to build your own kernel modules.

Warning: do not mix the non-free packages with the packages created by the installer as they will conflict in non-obvious ways. Before switching from one method to another, completely remove all fglrx-related packages. Never do upgrade from one method to another directly!


Which install method?

There are two methods that can be used to install the fglrx driver in Debian. The first, and recommended way is to use the native Debian packages directly from the non-free repository. The second, which may be required for newly release drivers, is to generate the Debian packages directly from the ATI installer. Both methods are documented here. After the packages are installed, the remaining steps are common, regardless of the install method chosen.

Method 1: Installing from Debian non-free

Install the driver

sudo apt-get update
sudo apt-get install module-assistant fglrx-driver fglrx-kernel-src

Method 2: Generating/Installing Debian packages from the ATI installer

Download the ATI driver installer

Download the driver packages directly from ATI. You need to download the ATI installer, not the RPM packages for this method to work.

Build the Debian packages

Change to the download directory.

sudo apt-get install module-assistant build-essential fakeroot dh-make debconf bzip2
sudo sh ./ati-driver-installer-8.35.5-x86.x86_64.run --buildpkg [Distribution]
(run with --listpkg too see which Distributions and releases are available)

This used to create five deb packages in the current directory. With version 36, it creates only four. If this step succeeded without any errors but there are no packages, check the /tmp directory.

Install the driver

You might get some errors regarding dependencies during the dpkg process. You can ignore them since they should be resolved when you run the upgrade step.

sudo dpkg -i fglrx-control-qt3_8.24.8-1_i386.deb
sudo dpkg -i fglrx-kernel-src_8.24.8-1_i386.deb
sudo dpkg -i fglrx-driver-dev_8.24.8-1_i386.deb
sudo apt-get -f upgrade

A cruder way would be just calling

 dpkg -i fglrx-*.deb 

Compile the kernel driver

sudo module-assistant prepare
sudo module-assistant update
sudo module-assistant a-i fglrx

Observed error messages

                     |  dh_testdir                                                                │
                     │ /usr/bin/make -C /lib/modules/2.6.11/source SUBDIRS=/usr/src/modules/fglrx │
                     │ /bin/sh: /usr/src/linux-2.6.11/scripts/gcc-version.sh: Datei oder Verzeich │
                     │ make[1]: Entering directory `/usr/src/linux-2.6.11'                        │
                     │ make[2]: scripts/Makefile.build: Datei oder Verzeichnis nicht gefunden     │
                     │ make[2]: *** Keine Regel, um »scripts/Makefile.build« zu erstellen.  Schlu │
                     │ make[1]: *** [_module_/usr/src/modules/fglrx] Fehler 2                     │
                     │ make[1]: Leaving directory `/usr/src/linux-2.6.11'                         │
                     │ make: *** [build] Fehler 2                     
(II) LoadModule: "fglrx"
(II) Loading /usr/lib/xorg/modules/drivers/fglrx_drv.so
dlopen: libstdc++.so.5: cannot open shared object file: No such file or directory
(EE) Failed to load /usr/lib/xorg/modules/drivers/fglrx_drv.so
(II) UnloadModule: "fglrx"
(EE) Failed to load module "fglrx" (loader failed, 7)

Solution: Install a newer C library and recompile the kernel:

sudo apt-get install libstdc++5

Update the xorg.conf file

sudo aticonfig --initial

Now restart X, or reboot for the driver changes to take effect.

Confirm that it worked

$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: MOBILITY RADEON 9700 Generic
OpenGL version string: 1.3.5461 (X4.3.0-8.19.10)

If it didn't work, you may need to run:

# mkdir -p /usr/X11R6/lib/modules/dri
# ln -s /usr/lib/dri/fglrx_dri.so /usr/X11R6/lib/modules/dri

Thanks to Maciej Matysiak for the clear debug here and solution here.

If it's still not working, try:

# rm /usr/lib/libGL.so*
# rm /usr/X11R6/lib/libGL.so*
# cd /usr/X11R6/lib
# cp /usr/lib/fglrx/diversions/lib/libGL.so.1.2 .
# ln -s libGL.so.1.2 libGL.so.1
# ldconfig

and confirm that 'ldd /usr/bin/fglrxinfo' is pointing to the right one.