Ubuntu利用Xorg.conf配置双屏扩展显示

参考链接:Linux xorg配置双屏幕显示
接了两个显示器,但是有一个因为用了劣质的DVI转VGA的转接头导致系统识别不出显示器的分辨率,然后每次开机都需要重新设置分辨率,很麻烦
NVIDIA X Server Settings有保存当前设置的功能但是不太行,重启之后还是要重新设置
想尽一切办法修改它保存的/etc/X11/xorg.conf文件终于找到了解决方案
关键是在Section "Screen"下面添加如下内容:

Option "TwinView"-------------------------------------------估计是告诉X使用双屏显示。 
Option "MetaModes" "1280*1024 1280*1024"--------告诉X显示的分辨率,已经有了
Option "TwinView Orientation" "RightOf"-------------估计这是告诉X附加的显示器在右侧。

最后贴一下我完整的内容:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 418.56

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"

    # HorizSync source: xconfig, VertRefresh source: xconfig
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL U2414H"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 960"
EndSection

Section "Screen"

    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-2"
    Option         "TwinView"
    Option         "metamodes" "DP-0: nvidia-auto-select +900+0, DVI-I-0: 1440x900 +0+0 {rotation=right}"
	Option		   "TwinView Orientation" "RightOf" 
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值