Friday, October 08, 2010

new kernel broke my radeon again

##########fglrx woe

I don't know at first that fglrx packages from debian non-free repo will conflict with the proprietary driver downloaded from amd site. So in install the driver from the repo and then the amd driver. After recompile kernel, everything look fine but opengl somehow is broken. This is the guide how to resolve it. good luck!

#####the error:

when i execute fglrxinfo or glxinfo, the output is something like this(not mine):
X Error of failed request:  BadMatch (invalid parameter attributes)   Major opcode of failed request:  156 (GLX)   Minor opcode of failed request:  5 (X_GLXMakeCurrent)   Serial number of failed request:  37   Current serial number in output stream:  37
and there is one line of error in /var/log/Xorg*
EE GLX error: Can not get required symbols
Somehow, the 3d acceleration is working fine, but still i need opengl to play video smoothly -_-
You can see from the Xorg log that the fglrx module loaded is the old module from non-free debian packages, not the one installed from amd installer.


http://wiki.debian.org/Ati%20Installer%20in%20Lenny
###########
ATI installer for Debian is buggy, and requires some tricks:

./ati-driver-installer-10-1-x86.x86_64.run --buildpkg Debian/lenny
Generating package: Debian/lenny
cp: cannot stat `/home/jarek/install/fglrx-install.ClcbzZ/x710/*': No such file or directory
Package build failed!
To correct this you have to extract sources:

./ati-driver-installer-10-1-x86.x86_64.run --extract fglrx-10.1
and do the following. Enter driver directory:

cd fglrx-10.1
Open file: packages/Debian/ati-packager.sh and in line 67 change:

lenny|testing) X_DIR=x710; X_NAME=lenny;;
to

lenny|testing) X_DIR=x690; X_NAME=lenny;;
Open file packages/Debian/dists/lenny/fglrx-driver.shlibs and at the end add line:

libatiuki 1 fglrx-driver
Copy file libatiuki.so.1.0 and create symbolic link: (for 32-bit system)

cp arch/x86/usr/lib/libatiuki.so.1.0 x690/usr/X11R6/lib/
ln -s libatiuki.so.1.0 x690/usr/X11R6/lib/libatiuki.so.1

For 64-bit system, change x86 to x86_64, x690 to x690_64a, lib to lib64, for above paths.

Now you should be able to build debs:

./ati-installer.sh 10.1 --buildpkg Debian/lenny
##########
http://www.jotschi.de/?p=313

stop xserver/gdm (this will close your desktop environment, make sure you keep this guide somewhere nearby)
modprobe -r fglrx

// get a list of all fglrx packages
sudo dpkg -l | grep fglrx
sudo dpkg -P fglrx-driver
sudo dpkg -P fglrx-kernel-$(uname -r)
sudo dpkg -P fglrx-kernel-src
sudo dpkg -P fglrx-amdcccle
sudo dpkg -P fglrx-driver-dev
// make sure everything is gone
sudo dpkg -l | grep fglrx

3. Restore files that might have been messed up by previous fglrx installations
apt-get --reinstall install libgl1-mesa-glx
apt-get --reinstall install xserver-xorg-core

4. Get rid of old ati configurations
sudo mv /etc/ati /tmp
sudo mv /etc/X11/xorg.conf /tmp
###################################################3
Download the installer and put it in ~/fglrx/

$ cd ./fglrx/
$ chmod +x ati-driver-installer-[version].run
$ ./ati-driver-installer-[version].run --extract fglrx-tmp
$ cd fglrx-tmp
$ su
# ./packages/Debian/ati-packager.sh --buildpkg lenny
# cd ..
dpkg --force-all -i fglrx-driver_[version].deb
dpkg -i fglrx-driver-dev_[version].deb
dpkg -i fglrx-kernel-src_[version].deb
dpkg -i fglrx-amdcccle_[version].deb

#apt-get install module-assistant
#cd /usr/src
# m-a prepare
# m-a update
module-assistant
# SELECT -> fglrx-kernel -> BUILD / INSTALL #
# modprobe -v fglrx
# aticonfig --initial
startx/gdm

#############how to know the fglrx module loaded is correct
debian:check /var/log/Xorg*

(II) LoadModule: "fglrx"
(II) Loading /usr/lib/xorg/modules/drivers//fglrx_drv.so
(II) Module fglrx: vendor="FireGL - ATI Technologies Inc."
compiled for 7.1.0, module version = 8.77.5
Module class: X.Org Video Driver
(II) Loading sub module "fglrxdrm"
(II) LoadModule: "fglrxdrm"
(II) Loading /usr/lib/xorg/modules/linux//libfglrxdrm.so
(II) Module fglrxdrm: vendor="FireGL - ATI Technologies Inc."
compiled for 7.1.0, module version = 8.77.5

#####fglrxinfo will show correct info
swordfish@protoss-emperor:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon HD 3400 Series
OpenGL version string: 3.3.10188 Compatibility Profile Context

1 comment:

  1. Nvidia, the way it's meant to be played.

    ReplyDelete