LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 5172|回复: 26

ATI 显卡驱动的安装(Debian's way)

[复制链接]
发表于 2006-2-24 23:43:32 | 显示全部楼层 |阅读模式
看到很多朋友问ati驱动的安装,正好前两天安装了一下,就随手写个note吧。

下面以debian 3.1 stable和最新的8.22.5为例,其他版本几乎是差不多的。

参考文献:
http://xoomer.virgilio.it/flavio ... glrx-installer.html

0. 准备工作,安装所需的package

  1. apt-get install debhelper kernel-package libqt3-mt-dev xlibs-dev libxtst-dev fakeroot rpm wget
复制代码

另外在装上你用的内核版本对应的kernel-header(kernel-source就不用了,header足够了)

1。上ATI网站下载最新的驱动。要下载最大的那个installer,下面的rpm就不用了,因为installer可以自动生成deb安装包:
目前最新的是8.22.5,相当于催化剂6.2了

  1. mkdir ~/ati
  2. cd ~/ati
  3. wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8.22.5-i386.run
复制代码


2. 下载下来的ati-driver-installer-8.22.5-i386.run是个shell脚本,如果不能直接运行,
chmod 744一下

用参数--help看看帮助
chenyu@axp1700:/root$ ./ati-driver-installer-8.22.5-i386.run --help
有下面这些参数比较有用:

  1. Following arguments will be passed to the embedded script:
  2. --install                       Install the driver(default)
  3. --get-supported          List all the supported packages for package generation
  4. --buildpkg package     Build "package" if supported ("package" as returned by --get-supported)
复制代码


运行./ati-driver-installer-8.22.5-i386.run --get-supported 可以看到安装程序支持的系统

  1. ==================================================
  2. ATI Technologies Linux Driver Installer/Packager
  3. ==================================================
  4. List of supported packages:
  5. ATI/XFree86-4_1_X
  6. ATI/XFree86-4_2_X
  7. Debian/woody
  8. Debian/oldstable
  9. Debian/3.0
  10. Debian/sarge
  11. Debian/stable
  12. Debian/3.1
  13. Debian/etch
  14. Debian/testing
  15. Debian/sid
  16. Debian/unstable
  17. RedHat/RHEL3
  18. RedHat/RHEL4
  19. SuSE/SLES9-IA32
  20. SuSE/SUSE91-IA32
  21. SuSE/SUSE100-IA32
  22. SuSE/SUSE92-IA32
  23. SuSE/SUSE93-IA32
  24. SuSE/SUSE101-IA32
  25. Ubuntu/warty
  26. Ubuntu/4.10
  27. Ubuntu/hoary
  28. Ubuntu/5.04
  29. Ubuntu/breezy
  30. Ubuntu/5.10
  31. Ubuntu/dapper
  32. Ubuntu/6.04
复制代码

3. 针对自己的debian版本生成相应的安装包:
./ati-driver-installer-8.22.5-i386.run --buildpkg Debian/3.1

程序会自动在当前目录下生成5个deb:

  1. axp1700:~/ati# ll
  2. 总用量 9844
  3. -rw-r--r--  1 root root 2224204 2006-02-20 23:57 fglrx-control-qt3_8.22.5-1_i386.deb
  4. -rw-r--r--  1 root root 7192412 2006-02-20 23:57 fglrx-driver_8.22.5-1_i386.deb
  5. -rw-r--r--  1 root root   82874 2006-02-20 23:57 fglrx-driver-dev_8.22.5-1_i386.deb
  6. -rw-r--r--  1 root root    1289 2006-02-20 23:57 fglrx-installer_8.22.5-1_i386.changes
  7. -rw-r--r--  1 root root  462186 2006-02-20 23:57 fglrx-kernel-src_8.22.5-1_i386.deb
  8. -rw-r--r--  1 root root   77698 2006-02-20 23:57 fglrx-sources_8.22.5-1_i386.deb
复制代码

其中最重要的是fglrx-driver 和 fglrx-kernel-src,先安装了他们
dpkg -i fglrx-driver fglrx-kernel-src

4.  下面要编译内核模块了:

到 /usr/src 目录下可以看到一个文件fglrx.tar.bz2
用下面的方式编译:

  1. tar jxf fglrx.tar.bz2
  2. cd /usr/src/kernel-header-2.x.y-?-arch
  3. fakeroot make-kpkg --revision=custom.1.0 --added-modules fglrx modules_image
复制代码

ok, /usr/src下会生成一个 fglrx-kernel-2.6.15.4_8.22.5-1+custom.1.0_i386.deb这样的文件,dpkg -i 安装它吧

5. 修改 /etc/X11/XF86Config-4
可以用aticonfig来修改,也可以手动修改,下面来手动的:

大致改成这样

  1. Section "Module"
  2.   ...
  3.   # These modules are required for 3D acceleration
  4.   Load "GLcore"
  5.   Load "glx"
  6.   Load "dri"
  7.   ...
  8.   # Load "extmod" but omit DGA extension
  9.   # (the DGA extension is broken in the fglrx driver)
  10.   SubSection "extmod"
  11.     Option "omit xfree86-dga"
  12.   EndSubSection
  13.   ...
  14. EndSection

  15. Section "Device"
  16.         Identifier        "ATI Radeon 9600 Pro"
  17.         Driver                "fglrx"

  18.         # If X refuses to use the screen resolution you asked for,
  19.         # uncomment this; see "Bugs and Workarounds" for details.
  20.           Option "NoDDC"

  21.         # === Video Overlay for the Xv extension ===
  22.         Option "VideoOverlay" "on"
  23.         # === OpenGL Overlay ===
  24.         # Note: When OpenGL Overlay is enabled, Video Overlay
  25.         #       will be disabled automatically
  26.         Option "OpenGLOverlay" "off"

  27.         # === Use internal AGP GART support? ===
  28.         # If OpenGL acceleration doesn't work, try using "yes" here
  29.         # and disable the kernel agpgart driver.
  30.         Option "UseInternalAGPGART" "no"
  31. EndSection

  32. Section "Screen"
  33.         Identifier        "Default Screen"
  34.         Device                "ATI Radeon 9600 Pro"
  35.         Monitor                "IBM:9919"
  36.         DefaultDepth        24

  37.         SubSection "Display"
  38.                 Depth                24
  39.                 Modes                "1024x768"
  40.         EndSubSection
  41. EndSection

  42. Section "DRI"
  43.         Mode        0666
  44. EndSection
复制代码


最后,控制面板之类的deb也可以都装上,重启xwin应该就搞定了。

PS: ati驱动中带的一些实用程序
aticonfig           可以修改X configure file (原来叫fglrxconfig,新版本改名字了)
fgl_glxgears     系统自带OpenGL检测程序glxgears的升级版?!
fglrxinfo            可以打印出很多驱动的信息,fglrxinfo -h 看看帮助
fglrx_xgamma   没搞懂。。。用驱动带的控制面板应该也可以修改gamma
发表于 2006-2-25 08:36:22 | 显示全部楼层
不错。我安装的时候,不能用gcc4,只能用gcc3.
回复 支持 反对

使用道具 举报

发表于 2006-2-25 17:30:31 | 显示全部楼层
3. 针对自己的debian版本生成相应的安装包:
./ati-driver-installer-8.22.5-i386.run --buildpkg Debian/3.1



我用的sid,请问这句里
./ati-driver-installer-8.22.5-i386.run --buildpkg后面我应该写什么?
回复 支持 反对

使用道具 举报

发表于 2006-2-25 19:26:38 | 显示全部楼层
Debian/sid
回复 支持 反对

使用道具 举报

发表于 2006-2-26 02:45:40 | 显示全部楼层
首先第3步里我的5个deb包是在/tmp下生成的


其次
其中最重要的是fglrx-driver 和 fglrx-kernel-src,先安装了他们
apt-get install fglrx-driver fglrx-kernel-src

这里应该是楼主写错了,都生成了fglrx-driver 和 fglrx-kernel-src的deb包了,就不用
apt-get 安装了吧


第4步我没怎么看懂,想依葫芦画瓢又总是不对:
cd /usr/src/kernel-header-2.x.y-?-arch  这里到底是打开哪个目录?
比如我装的是linux-headers-2.6.15-1-686 ,/usr/src下有linux-headers-2.6.15-1
linux-headers-2.6.15-1-686两个目录,我应该选哪个?
还有
fakeroot make-kpkg --revision=custom.1.0 --added-modules fglrx modules_image也是不能原封照抄的吧,要改哪里我也没搞懂

鉴于上面的原因,我就没有按照楼主的第四步做,参照
http://xoomer.virgilio.it/flavio ... nstaller.html中的


  1. 4.1a Build with the supplied make.sh script
  2. This will build a module that matches the running kernel; you need to have the correct kernel source and configuration in place.

  3. cd /usr/src/modules/fglrx
  4. ./make.sh

  5. Provided that the module was compiled without error, become root and install it:

  6. mkdir /lib/modules/$(uname -r)/misc
  7. cp fglrx.ko /lib/modules/$(uname -r)/misc/
  8. depmod -ae
复制代码


可是失败了,在./make.sh这一步时提示

./make.sh: line 849: cd: 2.6.x: 没有那个文件或目录


这个是什么原因呢,谢谢!!
回复 支持 反对

使用道具 举报

发表于 2006-2-26 03:20:28 | 显示全部楼层
[color="Red"]可是失败了,在./make.sh这一步时提示

./make.sh: line 849: cd: 2.6.x: 没有那个文件或目录

这个目录在生成的deb包里是没有的,需要运行
./ati-driver-installer-8.22.5-i386.run --extract

在common目录里面有,也可以通过./ati-driver-installer-8.22.5-i386.run
在/lib/modules/fglrx/里面有
回复 支持 反对

使用道具 举报

发表于 2006-2-26 03:26:46 | 显示全部楼层
Post by troyme
[color="Red"]可是失败了,在./make.sh这一步时提示

./make.sh: line 849: cd: 2.6.x: 没有那个文件或目录

这个目录在生成的deb包里是没有的,需要运行
./ati-driver-installer-8.22.5-i386.run --extract

在common目录里面有,也可以通过./ati-driver-installer-8.22.5-i386.run
在/lib/modules/fglrx/里面有



多谢,不过已经不用这个方法了
刚刚参照了zhangxudong 兄弟的这篇http://www.linuxsir.cn/bbs/showthread.php?t=243589 已经搞定了

我觉得我上面说的这个错误可以忽略,因为其实刚才就算有错也生成了fglrx的模块
现在我倒觉得zhangxudong 兄弟的这句非常关键:
15. 用modconf将kernel/drivers/char/drm里的所有模块移除,否则fglrx不能加载

因为我先前按照这个帖子中的方法加载模块时提示错误,而做了这一步后就通过了
希望对后面的兄弟有帮助
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-26 09:38:12 | 显示全部楼层
Post by gdxk
首先第3步里我的5个deb包是在/tmp下生成的
其次
其中最重要的是fglrx-driver 和 fglrx-kernel-src,先安装了他们
apt-get install fglrx-driver fglrx-kernel-src

这里应该是楼主写错了,都生成了fglrx-driver 和 fglrx-kernel-src的deb包了,就不用
apt-get 安装了吧


已经改过来了,thx

Post by gdxk

第4步我没怎么看懂,想依葫芦画瓢又总是不对:
cd /usr/src/kernel-header-2.x.y-?-arch  这里到底是打开哪个目录?
比如我装的是linux-headers-2.6.15-1-686 ,/usr/src下有linux-headers-2.6.15-1
linux-headers-2.6.15-1-686两个目录,我应该选哪个?
还有
fakeroot make-kpkg --revision=custom.1.0 --added-modules fglrx modules_image也是不能原封照抄的吧,要改哪里我也没搞懂


要到linux-headers-2.6.15-1-686目录下,也就是和你的linux 内核版本对应的目录
fakeroot make-kpkg --revision=custom.1.0 --added-modules fglrx
可以照抄
回复 支持 反对

使用道具 举报

发表于 2006-2-27 11:40:36 | 显示全部楼层
debian:/home/lee# fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9550 Generic
OpenGL version string: 2.0.5642 (8.22.5)

debian:/home/lee# fgl_glxgears
Using GLX_SGIX_pbuffer
1932 frames in 5.0 seconds = 386.400 FPS
2068 frames in 5.0 seconds = 413.600 FPS
2073 frames in 5.0 seconds = 414.600 FPS
1882 frames in 5.0 seconds = 376.400 FPS
2000 frames in 5.0 seconds = 400.000 FPS
2019 frames in 5.0 seconds = 403.800 FPS
debian:/home/lee# glxgears
12983 frames in 5.0 seconds = 2596.589 FPS
12811 frames in 5.0 seconds = 2562.171 FPS
12811 frames in 5.0 seconds = 2562.102 FPS
12815 frames in 5.0 seconds = 2562.836 FPS
12810 frames in 5.0 seconds = 2561.828 FPS
12808 frames in 5.0 seconds = 2561.512 FPS

如上信息 是否反映了 安装完了 fglrx 驱动.

但是一 运行 3D 游戏 ,比如 TORCS  就要死机 . 屏幕 不动 鼠标键盘无响应. 只有 关电源.
回复 支持 反对

使用道具 举报

发表于 2006-2-27 13:05:53 | 显示全部楼层
Post by leeshasr
debian:/home/lee# fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9550 Generic
OpenGL version string: 2.0.5642 (8.22.5)

debian:/home/lee# fgl_glxgears
Using GLX_SGIX_pbuffer
1932 frames in 5.0 seconds = 386.400 FPS
2068 frames in 5.0 seconds = 413.600 FPS
2073 frames in 5.0 seconds = 414.600 FPS
1882 frames in 5.0 seconds = 376.400 FPS
2000 frames in 5.0 seconds = 400.000 FPS
2019 frames in 5.0 seconds = 403.800 FPS
debian:/home/lee# glxgears
12983 frames in 5.0 seconds = 2596.589 FPS
12811 frames in 5.0 seconds = 2562.171 FPS
12811 frames in 5.0 seconds = 2562.102 FPS
12815 frames in 5.0 seconds = 2562.836 FPS
12810 frames in 5.0 seconds = 2561.828 FPS
12808 frames in 5.0 seconds = 2561.512 FPS

如上信息 是否反映了 安装完了 fglrx 驱动.

但是一 运行 3D 游戏 ,比如 TORCS  就要死机 . 屏幕 不动 鼠标键盘无响应. 只有 关电源.





兄弟的比我的还高哦(我的也是9550)
我的:

sid (xorg6.9 +  ati-driver-installer-8.22.5-i386.run):
hhh:~# fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9550 Generic
OpenGL version string: 2.0.5642 (8.22.5)

# glxgears
12096 frames in 5.0 seconds = 2419.116 FPS
12062 frames in 5.0 seconds = 2412.341 FPS
12054 frames in 5.0 seconds = 2410.782 FPS
12068 frames in 5.0 seconds = 2413.530 FPS
12064 frames in 5.0 seconds = 2412.780 FPS
# fgl_glxgears
Using GLX_SGIX_pbuffer
1798 frames in 5.0 seconds = 359.600 FPS
1926 frames in 5.0 seconds = 385.200 FPS
1935 frames in 5.0 seconds = 387.000 FPS

我只用quake3测试过,没问题的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表