Chinaunix首页 | 论坛 | 博客
  • 博客访问: 678527
  • 博文数量: 156
  • 博客积分: 6010
  • 博客等级: 准将
  • 技术积分: 1201
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-05 20:08
文章分类

全部博文(156)

文章存档

2010年(13)

2008年(39)

2007年(104)

我的朋友

分类: LINUX

2007-06-05 04:48:19

ATI 的 Linux 显卡驱动好烂!!每次 X 升级, fglrx 就不能用了。
这是昨晚安装 fglrx 的笔记,希望对大家有帮助。

显卡:ATI Radeon XPRESS 200M
X version: 1:7.1.0-16

开始:
1. 去 ATI 的网上下载驱动:ati-driver-installer-8.37.6-x86.x86_64.run

2. 生成 .deb 包
% ./ati-driver-installer-8.37.6-x86.x86_64.run --buildpackage Debian/Unstable
会生出以下几个包:
fglrx-amdcccle_8.37.6-1_i386.deb - 不是很重要,好像是用来优化的。
fglrx-driver-dev_8.37.6-1_i386.deb - 用于程序开发,对一般用户没用。
fglrx-driver_8.37.6-1_i386.deb - 显卡驱动
fglrx-kernel-src_8.37.6-1_i386.deb - DRI 支持

3. 安装
% dpkg -i fglrx-driver_8.37.6-1_i386.deb
% dpkg -i fglrx-kernel-src_8.37.6-1_i386.deb
会有 fglrx.tar.bz2 出现在 /usr/src 里
% dpkg -i fglrx-amdcccle_8.37.6-1_i386.deb

4. 编译 kernel module
% cd /usr/src
% tar -jxvf fglrx.tar.bz2
% cd /usr/src/linux

% make-kpkg --revision 1 --initrd modules_image
生成 fglrx-kernel-2.6.15-rc5_8.37.6-1+1_i386.deb 在 /usr/src/ 里

5. 安装 fglrx 的 kernel module
% dpkg -i fglrx-kernel-2.6.15-rc5_8.37.6-1+1_i386.deb

6. 调试配置
先备份原来的配置
% cp /etc/X11/xorg.conf ~/xorg.conf.old

然后用 ATI 自带的配置程序
% aticonfig --initial
程序出错 (ATI 烂呀!!)
代码:
Uninitialised file found, configuring. Using xorg.conf Saved back-up to xorg.conf.original-0 *** glibc detected *** aticonfig: munmap_chunk(): invalid pointer: 0xbfc03b57 *** ======= Backtrace: ========= /lib/libc.so.6(cfree+0x1bc)[0xb7cd58dc] aticonfig[0x805c5c7] aticonfig[0x805c875] aticonfig[0x8054528] aticonfig[0x804985e] aticonfig[0x80496cb] /lib/libc.so.6(__libc_start_main+0xdc)[0xb7c7febc] aticonfig[0x8049601] ======= Memory map: ======== 08048000-08067000 r-xp 00000000 03:03 600308 /usr/bin/aticonfig 08067000-0806a000 rw-p 0001e000 03:03 600308 /usr/bin/aticonfig 0806a000-0808b000 rw-p 0806a000 00:00 0 [heap] b7c47000-b7c51000 r-xp 00000000 03:03 677443 /lib/libgcc_s.so.1 b7c51000-b7c52000 rw-p 00009000 03:03 677443 /lib/libgcc_s.so.1 b7c5c000-b7c5e000 rw-p b7c5c000 00:00 0 b7c5e000-b7c60000 r-xp 00000000 03:03 677582 /lib/libdl-2.5.so b7c60000-b7c62000 rw-p 00001000 03:03 677582 /lib/libdl-2.5.so b7c62000-b7c66000 r-xp 00000000 03:03 596878 /usr/lib/libXdmcp.so.6.0.0 b7c66000-b7c67000 rw-p 00003000 03:03 596878 /usr/lib/libXdmcp.so.6.0.0 b7c67000-b7c69000 r-xp 00000000 03:03 596855 /usr/lib/libXau.so.6.0.0 b7c69000-b7c6a000 rw-p 00001000 03:03 596855 /usr/lib/libXau.so.6.0.0 b7c6a000-b7da7000 r-xp 00000000 03:03 677584 /lib/libc-2.5.so b7da7000-b7da8000 r--p 0013d000 03:03 677584 /lib/libc-2.5.so b7da8000-b7daa000 rw-p 0013e000 03:03 677584 /lib/libc-2.5.so b7daa000-b7dad000 rw-p b7daa000 00:00 0 b7dad000-b7dd2000 r-xp 00000000 03:03 677578 /lib/libm-2.5.so b7dd2000-b7dd4000 rw-p 00024000 03:03 677578 /lib/libm-2.5.so b7dd4000-b7ebc000 r-xp 00000000 03:03 598710 /usr/lib/libX11.so.6.2.0 b7ebc000-b7ec0000 rw-p 000e8000 03:03 598710 /usr/lib/libX11.so.6.2.0 b7ec0000-b7ecd000 r-xp 00000000 03:03 599655 /usr/lib/libXext.so.6.4.0 b7ecd000-b7ece000 rw-p 0000c000 03:03 599655 /usr/lib/libXext.so.6.4.0 b7ece000-b7ecf000 rw-p b7ece000 00:00 0 b7ecf000-b7ed6000 r-xp 00000000 03:03 596959 /usr/lib/libXrender.so.1.3.0 b7ed6000-b7ed7000 rw-p 00006000 03:03 596959 /usr/lib/libXrender.so.1.3.0 b7ed7000-b7edc000 r-xp 00000000 03:03 599384 /usr/lib/libXrandr.so.2.1.0 b7edc000-b7edd000 rw-p 00004000 03:03 599384 /usr/lib/libXrandr.so.2.1.0 b7ee6000-b7ee9000 rw-p b7ee6000 00:00 0 b7ee9000-b7f04000 r-xp 00000000 03:03 677574 /lib/ld-2.5.so b7f04000-b7f06000 rw-p 0001b000 03:03 677574 /lib/ld-2.5.so bfbef000-bfc04000 rw-p bfbef000 00:00 0 [stack] ffffe000-fffff000 ---p 00000000 00:00 0 [vdso] Aborted

不能指望 ATI,手动配置
% dpkg-reconfigure xserver-xorg
% vi /etc/X11/xorg.conf
主要是把 Section "Device" 中的 Driver 改为 fglrx

启动 X 测试
% fglrxinfo
代码:
OpenGL renderer string: Mesa GLX Indirect
结果失败


检查 log
% less /var/log/Xorg.0.log
代码:
# (WW) fglrx(0): board is an unknown third party board, chipset is supported # ... # (EE) fglrx(0): [pcie] Failed to gather memory of size 131072Kb for PCIe. Error (-1007) # ... # (EE) fglrx(0): atiddxDriScreenInit failed, GPS not been initialized. # (WW) fglrx(0): *********************************************** # (WW) fglrx(0): * DRI initialization failed! * # (WW) fglrx(0): * (maybe driver kernel module missing or bad) * # (WW) fglrx(0): * 2D acceleraton available (MMIO) * # (WW) fglrx(0): * no 3D acceleration available * # (WW) fglrx(0): ********************************************* * # ... # (EE) AIGLX: Screen 0 is not DRI capable
第一个 (WW) 中说 ATI 的驱动不认识 ATI 自己的显卡,真是烂到家了。。。
不过最重要的是第一个 (EE),虽然不清楚是什么导致的错误,但至少有了一个线索。

用 Google 搜索 [pcie] Failed to gather memory 找到解决方法
(注意:要用Google搜索,因为Google是搜索全球信息,我第一个找到的解决方法是法语的,用Google Translate 翻译成英语才搞定)

在 /etc/X11/xorg.conf 的末尾加上
代码:
Section "Extensions" Option "Composite" "Disable" EndSection Section "ServerFlags" Option "AIGLX" "off" EndSection

第二次测试
% fglrxinfo
代码:
display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: ATI Radeon Xpress Series OpenGL version string: 2.0.6473 (8.37.6)
通过。

结论:买电脑尽量不要买 ATI 的显卡,这种公司根本不重视 Linux 用户。
HOWTO: ATI Fglrx (8.32.5), Xgl, Beryl, Feisty
I have had problems with the fglrx drivers after 8.32.5, but now its working with my system and I wanted to share how. This is my first howto, so suggestions are welcome.

Here are the steps I took to get the driver working Ubuntu Feisty 7.04 and Xorg 7.2.

If you have previously installed a restricted driver, you need to disable it by adding fglrx to DISABLED_MODULES in /etc/default/linux-restricted-modules-common

*You need to enable the universe repository before updating

sudo apt-get update
sudo apt-get install -y --force-yes module-assistant build-essential fakeroot dh-make debhelper debconf libstdc++5 linux-headers-$(uname -r) wget

Download ati proprietary driver
cd ~/
sudo wget

Build .deb packages

sudo sh ./ati-driver-installer-8.32.5-x86.x86_64.run --buildpkg Ubuntu/edgy

Install .deb packages:

sudo dpkg -i xorg-driver-fglrx*.deb
sudo dpkg -i fglrx-kernel-source*.deb
sudo dpkg -i fglrx-control*.deb

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

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

Needed for 8.32.5

sudo mkdir -p /usr/src/modules/fglrx/linux
sudo touch /usr/src/modules/fglrx/linux/config.h

Download Patch for 2.6.20.* kernels

cd ~/
sudo wget http://darcs.frugalware.org/repos/frugalware-current/source/x11-extra/fglrx/fglrx-2.6.20.patch

Apply Patch for 2.6.20.* kernels

cd /usr/src
sudo cp fglrx.tar.bz2 fglrx.tar.bz2-original
sudo tar -xvjf fglrx.tar.bz2
cd /usr/src/modules/fglrx
sudo patch < ~/fglrx-2.6.20.patch
cd /usr/src
sudo tar -cvjf fglrx.tar.bz2 modules/fglrx

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

Initial ati setup

If you prefer to edit your /etc/X11/xorg.conf manually, just replace the "vesa", "ati", or "radeon" with "fglrx" instead of running the command below

sudo aticonfig --initial

sudo aticonfig --overlay-type=Xv

You'll also want to disable AIGLX and Composite by adding this to your /etc/X11/xorg.conf

Code:
Section "Extensions"
	Option	    "Composite" "Disable"
EndSection

Section "ServerFlags"
	Option	    "AIGLX" "off"
EndSection
And reboot your machine.

After rebooting, you can run

Code:
fglrxinfo
Which should show something like this

Code:
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON XPRESS Series Generic
OpenGL version string: 2.0.6234 (8.32.5)
From here you should be able to follow the steps to install Xgl and Beryl



I hope this helps someone

阅读(2471) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~