LinuxSir.cn,穿越时空的Linuxsir!

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

请问ARCH下如何使用双显卡双显示器?

[复制链接]
发表于 2011-12-12 23:52:56 | 显示全部楼层 |阅读模式
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3200 Graphics
01:05.1 Audio device: ATI Technologies Inc RS780 Azalia controller
02:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 210] (rev a2)
02:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 14)


一块集成的A卡和一块另加的N卡,每个卡上都有一个VGA一个HDMI口。我现在想用每个卡上的VGA口各接一个显示器。在网上搜的案例大多不是这个情况。请问有该如何操做。
发表于 2011-12-14 17:53:28 | 显示全部楼层
我也想知道。
回复 支持 反对

使用道具 举报

发表于 2011-12-17 05:49:21 | 显示全部楼层
感觉这是multiseat(多用户多屏多输入设备,同一主机)的一种特殊情况。主要任务应该是设置X以支持双显卡。这个应该会有帮助吧: https://wiki.archlinux.org/index.php/Xorg_multiseat   (仔细阅读其中关于Graphic cards的那一段)

注意其中的配置涉及多输入设备的,你的情况不需要这么复杂。但我不清楚不同品牌显卡之间是否会有什么特殊问题。(此外你需要确定硬件支持双显卡同时工作。)

我在想最新的X server是不是能无须配置自动支持双显卡了。
回复 支持 反对

使用道具 举报

发表于 2011-12-17 12:34:15 | 显示全部楼层
有一个自动生成的文件,如下,20-TwinView.conf,但是,启动后,由于使用intel的驱动而进入黑屏状态,并且无法摸黑登录了。不知道该怎么办。

root@Harplo ~]# cd /etc/X11/
[root@Harplo X11]# cd xorg.conf.d/
[root@Harplo xorg.conf.d]# ls
10-evdev.conf  10-quirks.conf  20-TwinView.conf.back
[root@Harplo xorg.conf.d]# cat 20-TwinView.conf.back
#Section "Screen"
#        Option        "TwinView"        "True"
#        Option        "TwinViewOrientation"        "clone"
#        Option        "UesEdidFreqs"        "True"
#EndSection

Section "Device"
        Identifier        "nvidia"
        Screen                0
        Driver                "nvidia"
        BusID                "CI:01:00.0"
EndSection

Section        "Device"
        Identifer        "intel"
        Screen                1
        Driver                "i915"
        BusID                "CI:00:02.0"
EndSection

Section "Monitor"
        Identifier        "LCD"
        Option                "DPMS"
EndSection

Section        "Monitor"       
        Identifier        "LED"
        Option                "DPMS"
EndSection

Section        "Screen"
        Identifier        "Screen0"
        Device                "nvidia"
        Monitor                "LCD"
        DefaultDepth        24
        Option        "TwinView"        "True"
        SubSection        "Display"
                Depth        24
                Modes        "1280x1024_60 +0+0"
        EndSubSection
EndSection

Section "Screen"
        Identifier        "Screen1"
        Device                "intel"
        Monitor                "LED"
        Option        "TwinView"        "False"
        DefaultDepth        24
        SubSection        "Display"
                Depth        24
                Modes        "1600x900_60 +0+0"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier        "Dual-monitor Layout"
        Screen 0        "Screen0" 0 0
        Screen 1        "Screen1" Right0f "Screen0"
        Option        "Xinerama"        "true"
EndSection

Section        "Extensions"
        Option        "Composite"        "Enable"
EndSection
回复 支持 反对

使用道具 举报

发表于 2011-12-20 07:12:31 | 显示全部楼层
一直在用这种模式,gentoo和archlinux都是双显卡双屏,方法是用multiseat,有几个地方要注意:
1、在/etc/X11/xorg.conf里分别创建两个或多个seat,注意分配好键盘鼠标和显示器。我的情况是第一个seat用ps2键盘鼠标+整合显卡,第二个seat用USB键盘鼠标+独立显卡。其中PS2Mouse+PS2Keyboard和USBMouse+USBKeyboard分别指xorg.conf里面对应的"InputDevice"段,USB键盘鼠标对应的设备路径在/dev/input/by-id目录下,必须改成你自己的实际设备路径。另外BusID最好手动设置,否则X容易找错设备初始化失败。设置方法是lspci -v,然后找到对应的设备地址:

Section "ServerLayout"
    Identifier      "Seat0"
    Screen          0               "Screen0" 0 0
    Option          "SingleCard"    "Yes"
    InputDevice     "S2Mouse"      "CorePointer"
    InputDevice     "S2Keyboard"   "CoreKeyboard"
EndSection

Section "ServerLayout"
    Identifier      "Seat1"
    Screen          0               "Screen1" 0 0
    Option          "SingleCard"    "Yes"
    InputDevice     "USBMouse"      "CorePointer"
    InputDevice     "USBKeyboard"   "CoreKeyboard"
EndSection

Section "InputDevice"
    Identifier     "S2Keyboard"
    Driver         "evdev"
    Option         "Device"         "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
    Option         "XkbOptions"     "terminate:ctrl_alt_bksp"
EndSection

Section "InputDevice"
    Identifier     "S2Mouse"
    Driver         "evdev"
    Option         "Device"         "/dev/input/by-path/platform-i8042-serio-1-event-mouse"
    Option         "ZAxisMapping"   "4 5 6 7"
EndSection

Section "InputDevice"
    Identifier     "USBMouse"
    Driver         "evdev"
    Option         "rotocol"       "IMPS/2"
    Option         "Device"         "/dev/input/by-id/usb-413c_3010-event-mouse"
    Option         "ZAxisMapping"   "4 5 6 7"
EndSection

Section "InputDevice"
    Identifier  "USBKeyboard"
    Driver      "evdev"
    Option      "Device"            "/dev/input/by-id/usb-Silitek_IBM_USB_Keyboard-event-kbd"
    Option      "XkbModel"          "evdev"
    Option      "XkbLayout"         "us"
    Option      "XkbOptions"        "terminate:ctrl_alt_bksp"
EndSection

Section "Monitor"
    Identifier      "Monitor0"
    VendorName      "Monitor Vendor"
    ModelName       "Monitor Model"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Monitor Vendor"
    ModelName      "Monitor Model"
EndSection

Section "Device"
    Identifier      "CardNV"
    Driver          "nvidia"
    BusID           "CI:0:13:0"
EndSection

Section "Device"
    Identifier      "CardATI"
    Driver          "ati"
    BusID           "CI:1:6:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "CardNV"
    Monitor        "Monitor0"
......
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "CardATI"
    Monitor        "Monitor1"
......
EndSection

除此之外的DPI、ModeLine、刷新率、DDC识别、DPMS参数、分辨率/颜色深度配制根据自己实际情况添加,方法和普通单显卡一样,为了避免误导我自己的相关配置已经删掉了。

2、用xdm/gdm等需要修改dm的启动脚本,运行多个X实例:
第一个参数 :0 -layout Seat0 vt3
第二个参数 :1 -layout Seat1 vt3 -sharevts
如果像我这样直接在/etc/inittab里启动X,可以把运行级5注释,然后替换成下面两行,注意这样做之后X初始化文件会读取~/.xinitrc,记得自己修改。
x0:5:respawn:/bin/su - lifc -c "/usr/bin/startx -- :0 -layout Seat0 vt3 <> /dev/null 1>&0 2>&0"
x1:5:respawn:/bin/su - lifc -c "/usr/bin/startx -- :1 -layout Seat1 vt3 -sharevts <> /dev/null 1>&0 2>&0"

其中:0和:1分别对应地一个、第二个X session的DISPLAY,Seat0/Seat1代表xorg.conf里面创建的两个seat名称,vt3是指将X运行在哪个vt下,多数人默认是vt7,如果用vt7两个都要修改。注意第二个X的-sharevts参数,如果不加它就无法实现vt共享,这样多multi会出问题。
3、删掉/etc/X11/xorg.conf.d/10-evdev.conf,否则会自动配置X输入设备,多套键盘鼠标会同时影响一个X session,必须删掉它让xorg.conf里的手工配置优先生效。
4、如果两块显卡都需要opengl,可以参照我之前在gentoo论坛的相关发贴。
5、某些有bug的BIOS没有正确分配第二块显卡的PCI资源,导致X初始化非主显卡失败,表现为"cannot read BIOS"之类错误,需要修改内核pci=参数让linux激活第二显卡,并用setpci修改被disable的pci设备rom空间和内存映射空间。
回复 支持 反对

使用道具 举报

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

本版积分规则

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