LinuxSir.cn,穿越时空的Linuxsir!

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

ATI驱动

[复制链接]
发表于 2006-7-12 17:18:10 | 显示全部楼层 |阅读模式
刚装上Gentoo没多久, 对ati的驱动安装不熟悉. 看了一下wiki上ati的howto, 打算按部就班发现emerge ati-drivers就不行, 说与我装的xorg-server 1.1有冲突. 再google确没有找到方法, 说下我的配置, 装的是amd 64bit的版本, xorg7.1 ,显卡是ati mobility 的9550.期待高手回答.
发表于 2006-7-12 17:26:19 | 显示全部楼层
自己搜索论坛。讨论过的,有测试版的驱动暂时用着。
回复 支持 反对

使用道具 举报

发表于 2006-7-12 17:26:57 | 显示全部楼层
ati-drivers根本不能用在你这款ATI卡上,ati mobility的卡要用开源驱动,具体做法请参考
http://zh.gentoo-wiki.com/HOWTO_ATI_Open-Source_Drivers ,
如果你嫌麻烦,可以尝试直接使用内核里的驱动,看能不能成功,如果能用,我个人感觉这种办法也是很不错的,又有效又简单.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-12 18:13:38 | 显示全部楼层
为什么mobility的不能用ati-drivers? 莫非ati-drivers并不是ati网站上的那个?
我在ati网站上看到ATI Proprietary Linux Driver Version 8.26.18 是支持Mobility™ Radeon® 9550这个的
回复 支持 反对

使用道具 举报

发表于 2006-7-12 18:24:16 | 显示全部楼层
Post by delixizhou
为什么mobility的不能用ati-drivers? 莫非ati-drivers并不是ati网站上的那个?
我在ati网站上看到ATI Proprietary Linux Driver Version 8.26.18 是支持Mobility™ Radeon® 9550这个的


我除了听楼上上说过,还没听别人这么说过。
你安装看看。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-12 18:52:49 | 显示全部楼层
好的.我想你说的测试版的驱动应该就是那个8.27.4的吧.我试试先
回复 支持 反对

使用道具 举报

发表于 2006-7-13 06:17:06 | 显示全部楼层
哦,不好意思,是我记错了,是我的radeon7200不能用ati-drivers
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 11:02:22 | 显示全部楼层
装了8.27.4,就是直接运行了那个.run的安装包。然后在xorg.conf里把显卡驱动从原来的ati改为了fglrx, 然后重启进X。 发现没什么改变。fglrxinfo还是显示mesa。 运行fgl_glxgears出错. lsmod看了下有fglrx模块的。不知道怎么回事
回复 支持 反对

使用道具 举报

发表于 2006-7-13 11:38:49 | 显示全部楼层
先到/usr/share/fglrx里面把run的卸载了
用我贴的那个ebuild安装。虽然3D有问题,2D没问题的。(希望你能搞定这个问题)
  1. yangtse@yangtse:~$ cat /usr/local/portage/x11-drivers/ati-drivers/ati-drivers-8.27.4.ebuild
  2. # Copyright 1999-2006 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. # $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.26.18-r1.ebuild,v 1.1 2006/07/06 13:04:05 lu_zero Exp $
  5. IUSE="acpi doc opengl"
  6. inherit eutils rpm multilib linux-mod linux-info toolchain-funcs
  7. DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
  8. HOMEPAGE="http://www.ati.com"
  9. SRC_URI="amd64? ( mirror://gentoo/ati-driver-installer-${PV}-x86_64.run )"
  10. LICENSE="ATI"
  11. KEYWORDS="-* ~amd64"
  12. RDEPEND="|| ( x11-base/xorg-server virtual/x11 )
  13.          || ( x11-apps/xauth virtual/x11 )
  14.          !<x11-base/xorg-server-1.0.99
  15.          app-admin/eselect-opengl
  16.          || ( sys-libs/libstdc++-v3 =sys-devel/gcc-3.3* )
  17.          acpi? ( sys-power/acpid )"
  18. DEPEND=">=virtual/linux-sources-2.4
  19.         ${RDEPEND}"
  20. PROVIDE="virtual/opengl"
  21. ATIBIN="${D}/opt/ati/bin"
  22. RESTRICT="nostrip multilib-pkg-force stricter"
  23. MODULE_NAMES="fglrx(video:${WORKDIR}/common/lib/modules/fglrx/build_mod)"
  24. QA_EXECSTACK_x86="usr/lib/xorg/modules/dri/fglrx_dri.so"
  25. QA_EXECSTACK_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so usr/lib32/xorg/modules/dri/fglrx_dri.so"
  26. QA_TEXTREL_x86="usr/lib/xorg/modules/dri/fglrx_dri.so usr/lib/opengl/ati/lib/libGL.so.1.2"
  27. QA_TEXTREL_amd64="usr/lib64/xorg/modules/dri/fglrx_dri.so usr/lib32/opengl/ati/lib/libGL.so.1.2 usr/lib32/xorg/modules/dri/fglrx_dri.so usr/lib32/xorg/modules/dri/atiogl_a_dri.so"
  28. choose_driver_paths() {
  29.         ARCH_DIR="${WORKDIR}/arch"
  30.         COMMON_DIR="${WORKDIR}/common"
  31.         #new modular X paths, 0 is a workaround.
  32.         if has_version "x11-base/xorg-server"; then
  33.                 BASE_DIR="${WORKDIR}/x710"
  34.                 xlibdir="xorg"
  35.         else
  36.                 BASE_DIR="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
  37.                 xlibdir=""
  38.                 # Determine if we are facing X.org 6.8.99 aka 6.9
  39.                 if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] &&
  40.                    [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] &&
  41.                    [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ]
  42.                 then
  43.                         BASE_DIR="${BASE_DIR}90"
  44.                 else
  45.                         BASE_DIR="${BASE_DIR}$(get_version_component_range 2 ${X11_IMPLEM_V})0"
  46.                 fi
  47.         fi
  48.         if use amd64 ; then
  49.                 BASE_DIR="${BASE_DIR}_64a"
  50.                 ARCH_DIR="${ARCH_DIR}/x86_64"
  51.         else
  52.                 ARCH_DIR="${ARCH_DIR}/x86"
  53.         fi
  54. }
  55. pkg_setup(){
  56.         #check kernel and sets up KV_OBJ
  57.         linux-mod_pkg_setup
  58.         local agp
  59.         ebegin "Checking for MTRR support enabled"
  60.         linux_chkconfig_present MTRR
  61.         eend $?
  62.         if [[ $? -ne 0 ]] ; then
  63.         ewarn "You don't have MTRR support enabled, the direct rendering"
  64.         ewarn "will not work."
  65.         fi
  66.         ebegin "Checking for AGP support enabled"
  67.         linux_chkconfig_present AGP
  68.         eend $?
  69.         if [[ $? -ne 0 ]] ; then
  70.                 ebegin "Checking for PCI Express support enabled"
  71.                 linux_chkconfig_present PCIEPORTBUS
  72.                 eend $?
  73.                 if [[ $? -ne 0 ]] ; then
  74.                         ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
  75.                         ewarn "could work only using the internal support."
  76.                 fi
  77.         fi
  78.         ebegin "Checking for DRM support disabled"
  79.         ! linux_chkconfig_builtin DRM
  80.         eend $?
  81.         if [[ $? -ne 0 ]] ; then
  82.         ewarn "You have DRM support enabled builtin, the direct rendering"
  83.         ewarn "will not work."
  84.         fi
  85.         # Set up X11 implementation
  86.         if has_version "x11-base/xorg-server"; then
  87.                 X11_IMPLEM=xorg-x11
  88.         elif has_version "<x11-base/xorg-x11-6.8.99"; then
  89.                 X11_IMPLEM=xorg-x11
  90.                 X11_IMPLEM_V="$(best_version x11-base/xorg-x11)"
  91.                 X11_IMPLEM_V="${X11_IMPLEM_V/${X11_IMPLEM}-/}"
  92.                 X11_IMPLEM_V="${X11_IMPLEM_V##*\/}"
  93.         else
  94.                 X11_IMPLEM_P="$(best_version virtual/x11)"
  95.                 X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
  96.                 X11_IMPLEM="${X11_IMPLEM##*\/}"
  97.                 X11_IMPLEM_V="${X11_IMPLEM_P/${X11_IMPLEM}-/}"
  98.                 X11_IMPLEM_V="${X11_IMPLEM_V##*\/}"
  99.         fi
  100.         einfo "X11 implementation is ${X11_IMPLEM}."
  101.         choose_driver_paths
  102. }
  103. src_unpack() {
  104.         local OLDBIN="/usr/X11R6/bin"
  105.         ebegin "Unpacking Ati drivers"
  106.         sh ${DISTDIR}/${A} --extract ${WORKDIR} &> /dev/null
  107.         eend $? || die "unpack failed"
  108.         rm -rf ${ARCH_DIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
  109.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  110.         #if kernel_is ge 2 6 16; then
  111.         #       epatch ${FILESDIR}/${PN}-8.22.5-intermodule.patch
  112.         #       epatch ${FILESDIR}/${PN}-8.23.7-noiommu.patch
  113.         #       epatch ${FILESDIR}/${PN}-8.23.7-gcc41.patch
  114.         #fi
  115.         if use acpi
  116.         then
  117.                 sed -i \
  118.                 -e "s/\/var\/lib\/xdm\/authdir/\/etc\/X11\/xdm\/authdir/" \
  119.                 -e "s/\/var\/lib\/gdm/\/var\/gdm/" \
  120.                 -e "s/#ffff#/#ffff##:.*MIT-MAGIC-COOKIE/" \
  121.                 "${WORKDIR}/common/etc/ati/authatieventsd.sh" \
  122.                         || die "sed failed."
  123.         fi
  124. }
  125. src_compile() {
  126.         einfo "Building the DRM module..."
  127.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  128.         ln -s \
  129.         ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
  130.         || die "cannot find precompiled core"
  131.         if kernel_is 2 6
  132.         then
  133.                 set_arch_to_kernel
  134.                 addwrite "/usr/src/${FK}"
  135.                 cp 2.6.x/Makefile .
  136.                 export _POSIX2_VERSION="199209"
  137.                 if use_m ;
  138.                 then
  139.                         make -C ${KV_DIR} M="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
  140.                                 modules || ewarn "DRM module not built"
  141.                 else
  142.                         make -C ${KV_DIR} SUBDIRS="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
  143.                                 modules || ewarn "DRM module not built"
  144.                 fi
  145.                 set_arch_to_portage
  146.         else
  147.                 export _POSIX2_VERSION="199209"
  148.                 # That is the dirty way to avoid the id -u check
  149.                 sed -e 's:`id -u`:0:' \
  150.                         -e "s:\`uname -r\`:${KV_FULL}:" \
  151.                         -i make.sh
  152.                 chmod +x make.sh
  153.                 ./make.sh || ewarn "DRM module not built"
  154.         fi
  155. }
  156. pkg_preinst() {
  157.         # Clean the dynamic libGL stuff's home to ensure
  158.         # we don't have stale libs floating around ...
  159.         if [ -d "${ROOT}/usr/lib/opengl/ati" ]
  160.         then
  161.                 rm -rf ${ROOT}/usr/lib/opengl/ati/*
  162.         fi
  163. }
  164. src_install() {
  165.         local ATI_LIBGL_PATH=""
  166.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  167.         linux-mod_src_install
  168.         cd ${WORKDIR}
  169.         local native_dir
  170.         use x86 && native_dir="lib"
  171.         use amd64 && native_dir="lib64"
  172.         # Install the libs
  173.         # MULTILIB-CLEANUP: Fix this when FEATURES=multilib-pkg is in portage
  174.         local MLTEST=$(type dyn_unpack)
  175.         if [ "${MLTEST/set_abi/}" = "${MLTEST}" ] && has_multilib_profile; then
  176.                 local OABI=${ABI}
  177.                 for ABI in $(get_install_abis); do
  178.                         src_install-libs
  179.                 done
  180.                 ABI=${OABI}
  181.                 unset OABI
  182.         elif has_multilib_profile; then
  183.                 src_install-libs
  184.         elif use amd64; then
  185.                 src_install-libs lib $(get_multilibdir)
  186.                 src_install-libs lib64 $(get_libdir)
  187.         else
  188.                 src_install-libs
  189.         fi &> /dev/null
  190.         #apps, man pages, and conf files
  191.         exeinto /opt/ati/bin
  192.         doexe ${ARCH_DIR}/usr/X11R6/bin/*
  193.         if use acpid
  194.         then
  195.                 exeinto /opt/ati/sbin
  196.                 doexe ${ARCH_DIR}/usr/sbin/*
  197.                 insinto /opt/ati/man/man8
  198.                 doins common/usr/share/man/man8/*
  199.                 doinitd ${FILESDIR}/atieventsd.rc6 atieventsd
  200.                 dodir /etc/conf.d
  201.                 echo 'ATIEVENTSDOPTS=""' > ${D}/etc/conf.d/atieventsd
  202.         fi
  203.         #ati custom stuff
  204.         insinto /usr
  205.         doins -r ${WORKDIR}/common/usr/include
  206.         # doc's
  207.         if use doc; then
  208.                 dodir /usr/share/doc/fglrx
  209.                 cp -pPR common/usr/share/doc/fglrx/* \
  210.                         ${D}/usr/share/doc/fglrx
  211.         fi
  212.         #env.d entry
  213.         cp ${FILESDIR}/09ati ${T}/
  214.         if use acpi
  215.         then
  216.                 local ATIETC="${WORKDIR}/common/usr/share/doc/fglrx/examples/etc/acpi"
  217.                 exeinto /etc/acpi
  218.                 doexe ${ATIETC}/ati-powermode.sh
  219.                 insinto /etc/acpi/events
  220.                 doins ${ATIETC}/events/a-ac-aticonfig
  221.                 doins ${ATIETC}/events/a-lid-aticonfig
  222.         fi
  223.         #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539
  224.         if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then
  225.                 ATI_LIBGL_PATH="/usr/lib/dri:/usr/$(get_libdir)/dri:/usr/lib32/${xlibdir}/modules/dri/:/usr/$(get_libdir)/${xlibdir}/modules/dri"
  226.         fi
  227.                 cat >>${T}/09ati <<EOF
  228. LIBGL_DRIVERS_PATH="\$LIBGL_DRIVERS_PATH:$ATI_LIBGL_PATH"
  229. EOF
  230.         doenvd ${T}/09ati
  231. }
  232. src_install-libs() {
  233.         local pkglibdir=lib
  234.         local inslibdir="$(get_libdir)/${xlibdir}"
  235.         ATI_LIBGL_PATH="${ATI_LIBGL_PATH}:/usr/$(get_libdir)/${xlibdir}/modules/dri"
  236.         if [ ${#} -eq 2 ]; then
  237.                 pkglibdir=${1}
  238.                 inslibdir=${2}
  239.         elif has_multilib_profile && [ "${ABI}" == "amd64" ]; then
  240.                 pkglibdir=lib64
  241.         fi
  242.         einfo "${pkglibdir} -> ${inslibdir}"
  243.         local ATI_ROOT="/usr/$(get_libdir)/opengl/ati"
  244.         # The GLX libraries
  245.         exeinto ${ATI_ROOT}/lib
  246.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
  247.         dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
  248.         dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
  249.         # Don't do this... see bug #47598
  250.         #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so
  251.         # same as the xorg implementation
  252.         dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions
  253.         #Workaround
  254.         if use opengl ; then
  255.         sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
  256.                 /usr/$(get_libdir)/opengl/${X11_IMPLEM}/lib/libGL.la \
  257.                 > $D/${ATI_ROOT}/lib/libGL.la
  258.         dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include
  259.         fi
  260.         # X and DRI driver
  261.         if has_version "<x11-base/xorg-x11-6.8.0-r4"
  262.         then
  263.                 local X11_DIR="/usr/X11R6/"
  264.         else
  265.                 local X11_DIR="/usr/"
  266.         fi
  267.         local X11_LIB_DIR="${X11_DIR}${inslibdir}"
  268.         exeinto ${X11_LIB_DIR}/modules/drivers
  269.         # In X.org 6.8.99 / 6.9 this is a .so
  270.         doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o
  271.         exeinto ${X11_LIB_DIR}/modules/dri
  272.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
  273.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
  274.         exeinto ${X11_LIB_DIR}/modules/linux
  275.         # In X.org 6.8.99 / 6.9 this is a .so
  276.         if has_version ">=x11-base/xorg-x11-6.8.99" || \
  277.                 has_version "x11-base/xorg-server"
  278.         then
  279.                 doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
  280.         else
  281.                 doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
  282.         fi
  283.         if has_version ">=x11-base/xorg-x11-6.8.99" || \
  284.                 has_version "x11-base/xorg-server"
  285.         then
  286.                 cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig} \
  287.                         ${D}/usr/$(get_libdir)
  288.         else
  289.                 cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig.a} \
  290.                         ${D}/usr/$(get_libdir)
  291.         fi
  292.         #Not the best place
  293.         insinto ${X11_DIR}/include/X11/extensions
  294.         doins ${COMMON_DIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
  295.         dodir /etc
  296.         cp -pPR ${COMMON_DIR}/etc/* ${D}/etc/
  297. }
  298. pkg_postinst() {
  299.         /usr/bin/eselect opengl set --use-old ati
  300.         echo
  301.         einfo "To switch to ATI OpenGL, run "eselect opengl set ati""
  302.         einfo "To change your xorg.conf you can use the bundled "aticonfig""
  303.         if use !opengl ; then
  304.         ewarn "You don't have the opengl useflag enabled, you won't be able to build"
  305.         ewarn "opengl applications nor use opengl driver features, if that isn't"
  306.         ewarn "the intended behaviour please add opengl to your useflag and issue"
  307.         ewarn "# emerge -Nu ati-drivers"
  308.         fi
  309.         echo
  310.         einfo "If you experience unexplained segmentation faults and kernel crashes"
  311.         einfo "with this driver and multi-threaded applications such as wine,"
  312.         einfo "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
  313.         # DRM module
  314.         linux-mod_pkg_postinst
  315. }
  316. pkg_postrm() {
  317.         linux-mod_pkg_postrm
  318.         /usr/bin/eselect opengl set --use-old xorg-x11
  319. }
  320. yangtse@yangtse:~$
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 12:03:59 | 显示全部楼层
好的.谢谢了,我再试试
回复 支持 反对

使用道具 举报

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

本版积分规则

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