Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » setting up dual display on Ubuntu

Credits go to ReyBrujo and Thomas Fjellstrom for helping out!
This thread is locked; no one can reply to it. rss feed Print
setting up dual display on Ubuntu
Matthew Leverton
Supreme Loser
January 1999
avatar

I just partitioned my main 200GB (gparted is nice...) to set up Ubuntu. I have three monitors on two video cards:

  • NEC 1530V and Polyview V17D on PCI-E ATI X300 (primary display in BIOS)

  • ViewSonic VG800 on PCI ATI Radeon 9200

I installed the ATI drivers via sudo apt-get install xorg-driver-fglrx, with fglrxinfo showing:

Quote:

matthew@mjl:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON X300/X550 Series Generic
OpenGL version string: 2.0.6011 (8.28.8)

The two monitors on the X300 are currently enabled, but both displaying the same thing. Ideally I would want all three screens enabled independently of each other (as in XP), but I could live with two of them working.

This is the default xorg.conf file, which I assume needs to be edited with magic words:

1# /etc/X11/xorg.conf (xorg X Window System server configuration file)
2#
3# This file was generated by dexconf, the Debian X Configuration tool, using
4# values from the debconf database.
5#
6# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
7# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
8#
9# This file is automatically updated on xserver-xorg package upgrades *only*
10# if it has not been modified since the last upgrade of the xserver-xorg
11# package.
12#
13# If you have edited this file but would like it to be automatically updated
14# again, run the following command:
15# sudo dpkg-reconfigure -phigh xserver-xorg
16 
17Section "ServerLayout"
18 Identifier "Default Layout"
19 Screen 0 "aticonfig-Screen[0]" 0 0
20 InputDevice "Generic Keyboard"
21 InputDevice "Configured Mouse"
22 InputDevice "stylus" "SendCoreEvents"
23 InputDevice "cursor" "SendCoreEvents"
24 InputDevice "eraser" "SendCoreEvents"
25EndSection
26 
27Section "Files"
28 
29 # path to defoma fonts
30 FontPath "/usr/share/X11/fonts/misc"
31 FontPath "/usr/share/X11/fonts/cyrillic"
32 FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
33 FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
34 FontPath "/usr/share/X11/fonts/Type1"
35 FontPath "/usr/share/X11/fonts/100dpi"
36 FontPath "/usr/share/X11/fonts/75dpi"
37 FontPath "/usr/share/fonts/X11/misc"
38 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
39EndSection
40 
41Section "Module"
42 Load "i2c"
43 Load "bitmap"
44 Load "ddc"
45 Load "dri"
46 Load "extmod"
47 Load "freetype"
48 Load "glx"
49 Load "int10"
50 Load "type1"
51 Load "vbe"
52EndSection
53 
54Section "InputDevice"
55 Identifier "Generic Keyboard"
56 Driver "kbd"
57 Option "CoreKeyboard"
58 Option "XkbRules" "xorg"
59 Option "XkbModel" "pc105"
60 Option "XkbLayout" "us"
61 Option "XkbOptions" "lv3:ralt_switch"
62EndSection
63 
64Section "InputDevice"
65 Identifier "Configured Mouse"
66 Driver "mouse"
67 Option "CorePointer"
68 Option "Device" "/dev/input/mice"
69 Option "Protocol" "ExplorerPS/2"
70 Option "ZAxisMapping" "4 5"
71 Option "Emulate3Buttons" "true"
72EndSection
73 
74Section "InputDevice"
75 
76 # /dev/input/event
77 # for USB
78 Identifier "stylus"
79 Driver "wacom"
80 Option "Device" "/dev/wacom" # Change to
81 Option "Type" "stylus"
82 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
83EndSection
84 
85Section "InputDevice"
86 
87 # /dev/input/event
88 # for USB
89 Identifier "eraser"
90 Driver "wacom"
91 Option "Device" "/dev/wacom" # Change to
92 Option "Type" "eraser"
93 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
94EndSection
95 
96Section "InputDevice"
97 
98 # /dev/input/event
99 # for USB
100 Identifier "cursor"
101 Driver "wacom"
102 Option "Device" "/dev/wacom" # Change to
103 Option "Type" "cursor"
104 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
105EndSection
106 
107Section "Monitor"
108 Identifier "NEC LCD1530V"
109 Option "DPMS"
110EndSection
111 
112Section "Monitor"
113 Identifier "aticonfig-Monitor[0]"
114 Option "VendorName" "ATI Proprietary Driver"
115 Option "ModelName" "Generic Autodetecting Monitor"
116 Option "DPMS" "true"
117EndSection
118 
119Section "Device"
120 Identifier "ATI Technologies, Inc. RV280 [Radeon 9200 PRO]"
121 Driver "ati"
122 BusID "PCI:1:0:0"
123EndSection
124 
125Section "Device"
126 Identifier "aticonfig-Device[0]"
127 Driver "fglrx"
128 Option "VideoOverlay" "on"
129 Option "OpenGLOverlay" "off"
130EndSection
131 
132Section "Screen"
133 Identifier "Default Screen"
134 Device "ATI Technologies, Inc. RV280 [Radeon 9200 PRO]"
135 Monitor "NEC LCD1530V"
136 DefaultDepth 24
137 SubSection "Display"
138 Depth 1
139 Modes "1024x768" "832x624" "800x600" "720x400" "640x480"
140 EndSubSection
141 SubSection "Display"
142 Depth 4
143 Modes "1024x768" "832x624" "800x600" "720x400" "640x480"
144 EndSubSection
145 SubSection "Display"
146 Depth 8
147 Modes "1024x768" "832x624" "800x600" "720x400" "640x480"
148 EndSubSection
149 SubSection "Display"
150 Depth 15
151 Modes "1024x768" "832x624" "800x600" "720x400" "640x480"
152 EndSubSection
153 SubSection "Display"
154 Depth 16
155 Modes "1024x768" "832x624" "800x600" "720x400" "640x480"
156 EndSubSection
157 SubSection "Display"
158 Depth 24
159 Modes "1024x768" "832x624" "800x600" "720x400" "640x480"
160 EndSubSection
161EndSection
162 
163Section "Screen"
164 Identifier "aticonfig-Screen[0]"
165 Device "aticonfig-Device[0]"
166 Monitor "aticonfig-Monitor[0]"
167 DefaultDepth 24
168 SubSection "Display"
169 Viewport 0 0
170 Depth 24
171 EndSubSection
172EndSection
173 
174Section "DRI"
175 Mode 0666
176EndSection
177 
178Section "Extensions"
179 Option "Composite" "0"
180EndSection

Any suggestions on what I need to do to get it to work?

ReyBrujo
Moderator
January 2001
avatar

According to this thread, you need to choose one out of four drivers (one exclusive for nVidia cards): Xinerama (open source and binary driver), MergedFB (open source driver) and BigDesktop (binary driver). Apparently, BigDesktop is the easiest one you can try, as the others require some tweaks.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Matthew Leverton
Supreme Loser
January 1999
avatar

BigDesktop got the 2nd monitor working, but the 3rd monitor on the 2nd card still won't work. I'll have to mess around with it later.

Thomas Fjellstrom
Member #476
June 2000
avatar

Adding the second card is going to need a second "Monitor"/"Screen" and "Device" and an extra "Screen" line in the "ServerLayout" section.

I can't wait till Xorg gets its auto config stuff done. No more need for that lame config file.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

ReyBrujo
Moderator
January 2001
avatar

Apparently there are no instructions for two ATI video cards. There was an example of using two screens with two NVidia cards, but none for two ATI cards.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

Adding the second card is going to need a second "Monitor"/"Screen" and "Device" and an extra "Screen" line in the "ServerLayout" section.

I tried doing something like that, but I wasn't sure where I get the names, etc.

First, this auto-detected section seems wrong:

Quote:

Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies, Inc. RV280 [Radeon 9200 PRO]"
Monitor "NEC LCD1530V"

The NEC LCD1530V monitor is not on the 9200, but the X300.

With the "BigDesktop" taking care of the two monitors on the first card, should it be like this?:

  • 1 ServerLayout, referencing two Screens

  • 2 Screens, one for each Device

  • 2 Devices,

  • 3 Monitors

Only two Monitors were listed in the config file, both of the ones connected to the PCI-E card (Radeon X300). Do I need to add the third monitor by hand? And if so, whence does the name (Identifier) come? If it's just arbitrary, how do I know which Monitor section relates with which physical monitor?

ReyBrujo
Moderator
January 2001
avatar

See here to see how some dude set two NVidia cards, maybe you can do something similar with two ATI cards?

Yes, identifiers are arbitrary, you would name them like "left monitor", "main monitor" and "right monitor", or something like that.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Thomas Fjellstrom
Member #476
June 2000
avatar

Actually, the BigDesktop mode will likely not need to reference two screens, it should appear to X as one monitor (and is rather annoying that way too, I prefer Xinerama since apps and gnome/kde will know that theres two monitors, instead of one big one, unless ati fixed that...)

The Monitor sections get applied with the card they are attached to, its not arbitrary, you just need to match up the proper Monitor to the "Display". The Monitor section provides the timings, and other settings, the device section configures the driver, and the Screen section links them together, along with default resolutions.

Should only "need" two Device sections, (ati drivers use DDC to grab the display info, the Monitor sections are sorta superfluous these days), the Monitor section for the second monitor on the main card need not exist, since ATIs driver handles it for you, X never really sees it, at least through the config.

So your list is mostly right. minus one monitor from list, and thats about it. Course it wont hurt to keep it. theres just no reason to specify it anywhere.

edit:

I'm not sure what it applies to, but I use the:

   Option       "DesktopSetup" "horizontal"

Mode. I also let it use DDC/EDID to guess all the settings for both monitors since it does a better job than I do.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Matthew Leverton
Supreme Loser
January 1999
avatar

I got the second card to work using lspci to detect its BusID. I think that was the main thing causing it not to work.

The primary card has two screens attached to it, sharing one wide desktop just like XP. That is, there is only one start menu, but I can drag windows from one to the other. Maximizing a window only maximizes on the monitor it is at.

The secondary card is like it's own thing. The mouse moves over to it, but it cannot share windows, etc.

ReyBrujo
Moderator
January 2001
avatar

And in Windows all three make a single big desktop too? By the way, you could post your xorg.conf to have it as future reference if someone else ever asks this question.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Matthew Leverton
Supreme Loser
January 1999
avatar

Windows XP makes it all one big desktop, with windows maximizing to the size of the monitor.

1# /etc/X11/xorg.conf (xorg X Window System server configuration file)
2#
3# This file was generated by dexconf, the Debian X Configuration tool, using
4# values from the debconf database.
5#
6# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
7# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
8#
9# This file is automatically updated on xserver-xorg package upgrades *only*
10# if it has not been modified since the last upgrade of the xserver-xorg
11# package.
12#
13# If you have edited this file but would like it to be automatically updated
14# again, run the following command:
15# sudo dpkg-reconfigure -phigh xserver-xorg
16 
17Section "ServerLayout"
18 Identifier "Default Layout"
19 Screen 0 "Primary Screen" 0 0
20 Screen 1 "Secondary Screen" LeftOf "Primary Screen"
21 InputDevice "Generic Keyboard"
22 InputDevice "Configured Mouse"
23 InputDevice "stylus" "SendCoreEvents"
24 InputDevice "cursor" "SendCoreEvents"
25 InputDevice "eraser" "SendCoreEvents"
26EndSection
27 
28Section "Files"
29 
30 # path to defoma fonts
31 FontPath "/usr/share/X11/fonts/misc"
32 FontPath "/usr/share/X11/fonts/cyrillic"
33 FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
34 FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
35 FontPath "/usr/share/X11/fonts/Type1"
36 FontPath "/usr/share/X11/fonts/100dpi"
37 FontPath "/usr/share/X11/fonts/75dpi"
38 FontPath "/usr/share/fonts/X11/misc"
39 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
40EndSection
41 
42Section "Module"
43 Load "i2c"
44 Load "bitmap"
45 Load "ddc"
46 Load "dri"
47 Load "extmod"
48 Load "freetype"
49 Load "glx"
50 Load "int10"
51 Load "type1"
52 Load "vbe"
53EndSection
54 
55Section "InputDevice"
56 Identifier "Generic Keyboard"
57 Driver "kbd"
58 Option "CoreKeyboard"
59 Option "XkbRules" "xorg"
60 Option "XkbModel" "pc105"
61 Option "XkbLayout" "us"
62 Option "XkbOptions" "lv3:ralt_switch"
63EndSection
64 
65Section "InputDevice"
66 Identifier "Configured Mouse"
67 Driver "mouse"
68 Option "CorePointer"
69 Option "Device" "/dev/input/mice"
70 Option "Protocol" "ExplorerPS/2"
71 Option "ZAxisMapping" "4 5"
72 Option "Emulate3Buttons" "true"
73EndSection
74 
75Section "InputDevice"
76 
77 # /dev/input/event
78 # for USB
79 Identifier "stylus"
80 Driver "wacom"
81 Option "Device" "/dev/wacom" # Change to
82 Option "Type" "stylus"
83 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
84EndSection
85 
86Section "InputDevice"
87 
88 # /dev/input/event
89 # for USB
90 Identifier "eraser"
91 Driver "wacom"
92 Option "Device" "/dev/wacom" # Change to
93 Option "Type" "eraser"
94 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
95EndSection
96 
97Section "InputDevice"
98 
99 # /dev/input/event
100 # for USB
101 Identifier "cursor"
102 Driver "wacom"
103 Option "Device" "/dev/wacom" # Change to
104 Option "Type" "cursor"
105 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
106EndSection
107 
108Section "Monitor"
109 Identifier "NEC LCD1530V"
110 Option "DPMS"
111EndSection
112 
113Section "Monitor"
114 Identifier "aticonfig-Monitor[0]"
115 Option "VendorName" "ATI Proprietary Driver"
116 Option "ModelName" "Generic Autodetecting Monitor"
117 Option "DPMS" "true"
118EndSection
119 
120Section "Monitor"
121 Identifier "ViewSonic"
122 Option "DPMS" "true"
123EndSection
124 
125Section "Device"
126 Identifier "ATI Technologies, Inc. RV280 [Radeon 9200 PRO]"
127 Driver "ati"
128 BusID "PCI:5:6:0"
129EndSection
130 
131Section "Device"
132 Identifier "aticonfig-Device[0]"
133 Driver "fglrx"
134 BusID "PCI:1:0:0"
135 Option "VideoOverlay" "on"
136 Option "OpenGLOverlay" "off"
137 Option "DesktopSetup" "horizontal"
138 Option "Mode2" "1280x1024"
139 Option "DesktopSetup" "LVDS,AUTO"
140 Option "EnablePrivateBackZ" "yes"
141 Option "HSync2" "65" #This sets the horizontal sync for the secondary display.
142 Option "VRefresh2" "60" #This sets the refresh rate of the secondary display.
143EndSection
144 
145Section "Screen"
146 Identifier "Secondary Screen"
147 Device "ATI Technologies, Inc. RV280 [Radeon 9200 PRO]"
148 Monitor "ViewSonic"
149 DefaultDepth 24
150 SubSection "Display"
151 Depth 1
152 Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
153 EndSubSection
154 SubSection "Display"
155 Depth 4
156 Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
157 EndSubSection
158 SubSection "Display"
159 Depth 8
160 Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
161 EndSubSection
162 SubSection "Display"
163 Depth 15
164 Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
165 EndSubSection
166 SubSection "Display"
167 Depth 16
168 Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
169 EndSubSection
170 SubSection "Display"
171 Depth 24
172 Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
173 EndSubSection
174EndSection
175 
176Section "Screen"
177 Identifier "Primary Screen"
178 Device "aticonfig-Device[0]"
179 Monitor "aticonfig-Monitor[0]"
180 DefaultDepth 24
181 SubSection "Display"
182 Viewport 0 0
183 Depth 24
184 EndSubSection
185EndSection
186 
187Section "DRI"
188 Mode 0666
189EndSection
190 
191#Section "Extensions"
192# Option "Composite" "0"
193#EndSection

ReyBrujo
Moderator
January 2001
avatar

I am comparing it with this xorg.conf, but my head hurts just at checking all those resolutions... my xorg.conf has only 8, 16 and 32bpp at 800x600 and 1024x768...

Quote:

Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
Option "Clone" "off"
Option "Xinerama" "off"
Screen "Screen[0]"
Screen "Screen[1]" RightOf "Screen[0]"
Screen "Screen[2]" LeftOf "Screen[0]"
EndSection

Apparently you are missing one of the screens in the ServerLayout?

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Thomas Fjellstrom
Member #476
June 2000
avatar

I'm not sure if its possible, but if you can enable Xinerama for the combination of the BigDesktop screen and the other card, that might work. If it doesn't you'll have to use that funky X proxy thing that handles moving windows from card to card. The reason it works so easily on a "BigDesktop" mode is because the two screens look into the same framebuffer, so its one wide surface, which is kindof hard, if not impossible, to do with two separate cards.

Quote:

Apparently you are missing one of the screens in the ServerLayout?

With ATIs drivers, theres no need to add the second monitor in the dual display.. They handle everything, hence the "DesktopSetup" "horizontal".

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

ReyBrujo
Moderator
January 2001
avatar

Hmm... the guy in that forum post has two ATI cards, but he defines three screens. Maybe (just a big maybe here) if you use the DesktopSetup horizontal, it does not allow you to use three monitors as one desktop?

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Thomas Fjellstrom
Member #476
June 2000
avatar

It may make it more difficult. Though I'm still not sure if you'll be able to drag stuff between desktops if all three use a separate framebuffer. If you can, thats the way to go.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

jhuuskon
Member #302
April 2000
avatar

Why can't you just hook up your second monitor and reboot? Oh right, Linux makes you do things the hard way. This is fun. :)

You don't deserve my sig.

Go to: