免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1772 | 回复: 0
打印 上一主题 下一主题

gentoo ATI(Radeon 9000/R250 lf)显卡双显示器安装配置手记 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-10 14:23 |只看该作者 |倒序浏览

                                                                 
有两个选择:一是用 ATI 自己提供的驱动(
参考链接
);二是利用开源驱动(
参考链接
)。他们的配置方式有些不同,安装的包自然是不一样的。
我首先采用的是 开源驱动 来安装的,当时有些问题没有处理好以失败告终,后来利用 ATI 的驱动时才有所体会。开源驱动肯定是可以用的。但本文还是以 ATI 提供的驱动做实例。基本上是按照 how to 来说明的。
1. 内核配置 (针对 2.6, 我采用的版本是 2.6.17-gentoo-r8)
               
               
                # cd /usr/src/linux
# make menuconfig
按照 how to 来作就好了。
General setup --->
() Local version - append to kernel release (Currently, ati-drivers won't fully compile if you append anything to your version)
Loadable Module Support --->
  • Enable loadable module support
  •    Module unloading
    Processor type and features  --->
  • MTRR (Memory Type Range Register) support
    Device Drivers --->
    Character Devices --->
    /dev/agpgart (AGP Support)
       Your_AGP_Chipset_Here
    Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
    Graphics support --->
    [ ]  Support for framebuffer devices
    Kernel Hacking --->
    [ ] Kernel debugging
    但这里有一点要指出的是,也是很容易搞错的地方。在选项
    /dev/agpgart (AGP Support) 的子项中不要想当然地认为自己显卡是 ATI 的就选了
       ATI chipset support
    我开始就是犯了这个错误。(我想,这里应该是指主板的芯片类型支持)你可以这样来确定:
    # lspci | grep AGP
    比如我的机器是:
    00:01.0 PCI bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge (rev 03)
    所以我这里应该是:
    /dev/agpgart (AGP Support)
       ATI chipset support
       Intel 440LX/BX/GX, I8xx and E7x05 chipset support
    注意:别忘了编译、安装新内核,并以新的内核来引导系统。
    # make && make modules_install
    # cp arch/i386/boot/bzImage /boot/kernel-2.6.17-gentoo-r8
    在启动引导菜单中加入新的引导选项,我的机器采用 grub,
    /boot 分区在 /dev/hda8, / 分区在/dev/hda10,所以:
    # vim /boot/grub/grub.conf
    title Gentoo Linux 2.6.17-r8 (ATI Radeon 9000 driver)
        root (hd0,7)
        kernel /kenerl-2.6.17-gentoo-r8 root=/dev/hda10
    # reboot
    2. 安装驱动
    你用新的内核启动后,通常没法进入登录窗口,因为新的显卡驱动还没有安装,你的 X 配置没有更改。。。
    你可以在 reboot 前将默认启动登录窗口禁止。
    # rc-update del xdm default
    或者 在无法启动登录界面时,按 CTRL-ALT-F1 然后在文字终端登录,并且运行
    # /etc/init.d/xdm stop
    现在安装驱动了。
    howto 上讲了一下关于去掉 dlloader 的选择的问题,如果你的 xorg-x11 安装时用了这个选项的话,那你要重新编译 xorg-x11 了。
    你大概也不用做那些 umask 的设置了,默认选项里面是直接可以安装的。
    # emerge -av x11-drivers/ati-drivers x11-apps/ati-drivers-extra
    # env-update && source /etc/profile
    # modprobe fglrx
    # eselect opengl set ati
    你需要 copy 一些文件到指定的目录
    # find /usr -iname fglrx_dri.so
    通常在 /usr/lib/dri/ 目录下
    # ls /usr/lib/dri
    atiogl_a_dri.so  fglrx_dri.so  r200_dri.so  r300_dri.so  radeon_dri.so
    HowTo 里面说只用 copy fglrx_dri.so 就行了,但后来发现 atiogl_a_dri.so 这个文件也要用的,就都 cp 过去好了。
    HowTo
    里面描述的目标目录是 /usr/X11R6/lib/modules/dri/ 也就是 /usr/lib/modules/dri/
    但后来发现链接库找的目录是 /usr/lib/dri, 所以你要是防止出现问题的话不妨多做几个链接,或者根据错误信息来定位目录。
    # cp /usr/lib/dri/* /usr/X11R6/lib/modules/dri/
    别忘了做这一步,在别的系统上应该是 ldconfig, 但在gentoo 上做ldconfig 是不够的。
    # env-update
    3. 配置 X
    # /opt/ati/bin/aticonfig --initial --input=/etc/X11/xorg.conf
    不过,我觉得在
    链接
    里面的描述来配置更好。
    我单个屏幕的设置是 1024x768,做水平扩展后的就是 2048x768 了。
    # export PATH=/opt/ati/bin:$PATH
    # aticonfig --initial=dual-head --screen-layout=right
    # aticonfig --dtop=horizontal --overlay-on=1
    # aticonfig --resolution=0,2048x768,1024x768
    现在去你的 X 配置文件看看,里面有一些选项已经添加或者更改了。
    # vim /etc/X11/xorg.conf
    如果你启动 X 后,发现了错误,你可能要修改里面的配置了。
    可以启动 X 了。
    # startx
    不过我大都选用登录窗口来启动新的会话
    # /etc/init.d/xdm start
    看看启动后桌面有什么不同吗?如果你的 gdm 登录窗口没有象预期的那样扩展到两个显示器上面,或者你的桌面没有扩展,我只能说你很幸运,因为你可以在解决这些问题的同时来提升自己对系统的了解。;-)
    我碰到的一些问题。
    1) $ /opt/ati/bin/fglrxinfo
    display: :0.0 screen: 0
    OpenGL vendor string: Mesa project: www.mesa3d.org
    OpenGL renderer string: Mesa GLX Indirect
    OpenGL version string: 1.2 (1.5 Mesa 6.2.1)
    我被这个问题磨练了好久,正确的显示结果应该是
    display: :0.0  screen: 0
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: MOBILITY/RADEON 9000 DDR Generic
    OpenGL version string: 1.3.1091 (X4.3.0-8.27.6)
    你首先应该做这些:
    (1)确认你的驱动模块已经启动
    # lsmod
    fglrx                 392300  8
    intel_agp              23708  1
    agpgart                35532  2 fglrx,intel_agp
    如果没有,用 modprobe 来加载模块
    并编辑自动模块加载文件,例如我的机器:
    # vim /etc/modules.autoload.d/kernel-2.6.17-gentoo-r8
    fglx
    intel_agp
    agpgart
    以让下次启动时这些模块自动加载。
    # modules-update
    (2) 编辑 /etc/X11/xorg.conf 文件确认
    Section "Extensions"
            Option      "Composite" "false"
    EndSection
    (3) 如果你上面都确认了,你这时重启系统比较好。
    (4) 如果你还要往下看的话。这里有一些建议:如果你开始也像我一样尝试了 开源驱动 的话,并且按照开源驱动做了相应的配置了,你要尝试一下去卸载那些包或者更改那些相关配置文件。如果你采用手动删除那些包的话(并不推荐),别忘了做 env-update 。
    2) 每个人的机器可能配置不一样,所以解决方法可能有区别。但有一种解决方式是一致的,那就是 google your problems 了,有做广告的嫌疑了 ;-)
    3) 消除日志文件 /var/log/Xorg.0.log 用(EE)标识的每一个错误后,通常你就成功了。本文最后列出我的 /etc/X11/xorg.conf 文件内容,我觉得这个参考价值比较大一些。
    4. 最后的提醒 (你一定要看的,我在这上面浪费了不少时间,绝对是浪费)
    如果你的以前系统屏幕的分辨率是 1024x768(我想这种情况的比较多), 并且你平时都是用普通用户登录的(不推荐用root来登录系统),那么咱俩的情形就相同了。

    的情况:gdm 登录屏幕是扩展的,但登录后,桌面是那种 clone 模式,也就是两个桌面显示相同的内容,但明明在
    /etc/X11/xorg.conf 里面设置的是水平扩展,于是我就比较郁闷了,在用 root
    登录看看,发现桌面是按照预期扩展的,我就纳闷了,难道是用户的问题?但我确认了自己的用户在 video
    组里面,并且在xorg.conf文件里也有对应的设置。我非常困惑了。又 google
    了好久,不抖包袱了,但确实是里面的某一文章说到了一下分辨率的问题,我被触动了,一看分辨率,当前的还是 1024x768,于是我改了一下,选用
    2048x768,大功告成!!
    5. 一些应用程序相关的问题
    目前只发现 acroread 有些问题
    (1) 关于 Adobe Reader (7.0.8 chs) 的字体变得超宽,可读性极差。几经试探,发现可以这样解决:
    菜单==>>编辑==>>首选项==>>分辨率
                   
                   
                   
                    ( )使用系统分辨率 当前显示: 158 像素/英寸
    (*)自定义分辨率:     158 像素/英寸
    很奇怪,这样设置就 Ok 了。有些晕。不管它了。
    后记:
    双显示器的好处还是显而易见的,你一边写代码一看文档,不用来回使 Atl+tab Ctrl+c Ctrl+v 了;你可以对照两篇文章来看,等等。一句话,好不好,用了才知道。
    /etc/X11/xorg.conf
    #########################################################
    Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "aticonfig-Screen[0]" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
    EndSection
    Section "Files"
        # FontPath     "/usr/share/fonts/CID/"
        RgbPath      "/usr/share/X11/rgb"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
    EndSection
    Section "Module"
        Load  "glx"
        Load  "extmod"
        Load  "vnc"
        Load  "xtrap"
        Load  "record"
        Load  "dbe"
        Load  "dri"
        Load  "drm"
        Load  "freetype"
        Load  "type1"
    EndSection
    Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
    EndSection
    Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option        "Protocol" "IMPS/2"
        Option        "ZAxisMapping" "4 5"
        Option        "Device" "/dev/input/mice"
        Option        "Name" "USB Mouse"
    EndSection
    Section "Monitor"
        Identifier   "aticonfig-Monitor[0]"
        Option        "VendorName" "ATI Proprietary Driver"
        Option        "ModelName" "Generic Autodetecting Monitor"
        Option        "DPMS" "true"
    EndSection
    Section "Monitor"
        Identifier   "aticonfig-Monitor[1]"
        Option        "VendorName" "ATI Proprietary Driver"
        Option        "ModelName" "Generic Autodetecting Monitor"
        Option        "DPMS" "true"
    EndSection
    Section "Device"
        Identifier  "aticonfig-Device[0]"
        Driver      "fglrx"
        Option        "UseInternalAGPGART" "no"
        Option        "DesktopSetup" "horizontal"
        Option        "VideoOverlay" "on"
        Option        "UseFastTLS" "2"
        Option         "EnablePrivateBackZ" "on"
        Option        "OverlayOnCRTC2" "1"
        BusID       "PCI:1:0:0"
    EndSection
    Section "Device"
        Identifier  "aticonfig-Device[1]"
        Driver      "fglrx"
        BusID       "PCI:1:0:0"
        Screen      1
    EndSection
    Section "Monitor"
        #DisplaySize      300   230    # mm
    ### Comment all HorizSync and VertSync values to use DDC:
            # These are the DDC-probed settings reported by your monitor.
            # 1280x1024, 75.0Hz; hfreq=79.98, vfreq=75.03
        Identifier   "Default_Monitor"
        VendorName   "GSM"
        ModelName    "S"
        HorizSync    30.0 - 63.0
        VertRefresh  56.0 - 75.0
        ModeLine     "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
        ModeLine     "1024x768" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
        ModeLine     "1024x768" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
        ModeLine     "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
        ModeLine     "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
        ModeLine     "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
        ModeLine     "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
        Option        "DPMS"
    EndSection
    Section "Screen"
        Identifier "aticonfig-Screen[0]"
        Device     "aticonfig-Device[0]"
        Monitor    "aticonfig-Monitor[0]"
        DefaultDepth     24
        SubSection "Display"
            Viewport   0 0
            Depth     24
            Modes    "2048x768" "1024x768"
        EndSubSection
    EndSection
    Section "Screen"
        Identifier "aticonfig-Screen[1]"
        Device     "aticonfig-Device[1]"
        Monitor    "aticonfig-Monitor[1]"
        DefaultDepth     24
        SubSection "Display"
            Viewport   0 0
            Depth     24
        EndSubSection
    EndSection
    Section "DRI"
        Group        "video"
        Mode         0666
    EndSection
    Section "Extensions"
        Option        "Composite" "false" # "Enable"
        Option        "XVideo" "Enable"
    EndSection
    Section "ServerFlags"
        Option        "AIGLX" "off"
    EndSection


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/25081/showart_212938.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP