Ubuntu利用Xorg.conf配置双屏扩展显示
参考链接:Linux xorg配置双屏幕显示
接了两个显示器,但是有一个因为用了劣质的DVI转VGA的转接头导致系统识别不出显示器的分辨率,然后每次开机都需要重新设置分辨率,很麻烦
NVIDIA X Server Settings有保存当前设置的功能但是不太行,重启之后还是要重新设置
想尽一切办法修改它保存的/etc/X11/xorg.conf文件终于找到了解决方案
关键是在Section “Screen”下面添加如下内容:
1 | Option "TwinView"-------------------------------------------估计是告诉X使用双屏显示。 |
最后贴一下我完整的内容:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77# 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