View Full Version : [ubuntu] Dual Monitor (portrait and landscape)
fuzzybear3965
November 9th, 2008, 02:46 AM
Hey all... I'm posting my xorg.conf settings for a dual monitor setup (one landscape and one portrait). My configuration is set up with an Nvidia 8800gt card but the main part to look at is the randrrotation settings in the device and screen section. My display settings are such that the landscape screen is to the left of the portrait screen. Also, to be noted, you will notice the very top (server section) reads 'Screen 0 "Screen0" 0 288'.... this simply is the command iteration stating that my landscape screen falls 280 pixels beneath the height of my portrait screen...
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@rothera) Mon Oct 13 14:53:48 UTC 2008
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 288
Screen 1 "Screen1" 1680 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection
Section "ServerFlags"
Option "Xinerama" "1"
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: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Acer AL2216W"
HorizSync 31.0 - 84.0
VertRefresh 56.0 - 77.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Acer AL2216W"
HorizSync 31.0 - 84.0
VertRefresh 56.0 - 77.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8800 GT"
BusID "PCI:3:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8800 GT"
Option "RandRRotation" "on"
BusID "PCI:3:0:0"
Screen 1
EndSection
Section "Screen"
# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "DFP-0: 1680x1050 +0+0; DFP-0: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "rotate" "cw"
Option "TwinView" "0"
Option "metamodes" "DFP-1: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Hope this helps someone out there with a similar config... As a side note with Dual monitors like this Compiz does not work since one is rotated like that...
easoukenka
November 9th, 2008, 02:52 AM
compiz --sm-disable --only-current-screen
I dont actually have the same layout but I have two monitors which compiz does not work well for me but with this command it only activates it on one. This may or may not pertain to you but hope it helps
jason102
November 23rd, 2008, 09:39 PM
Hi, I'm going to dig this up again.
I have one 1680 x 1050 display and a smaller 1024 x 768 LCD panels. I'm thinking about getting another wide screen monitor to replace my smaller square one, a monitor that I can pivot to be vertical so I can read web pages/program with ease.
However, I'd first like to attempt rotating the screen on my smaller panel 90 degrees so I know it can be done before investing in a brand new display.
Here is my xorg.conf file:
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Generic Keyboard" "CoreKeyboard"
InputDevice "Configured Mouse"
EndSection
Section "Module"
Load "glx"
EndSection
Section "ServerFlags"
Option "Xinerama" "0"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Princeton Graphics Systems VL159"
HorizSync 30.0 - 63.0
VertRefresh 50.0 - 75.0
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8500 GT"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
EndSection
Section "Screen"
# Removed Option "metamodes" "CRT: nvidia-auto-select +1680+0, DFP: 1680x1050 +0+0"
# Removed Option "TwinViewXineramaInfoOrder" "DFP-0"
# Removed Option "TwinViewXineramaInfoOrder" "CRT-1"
# Removed Option "metamodes" "CRT: nvidia-auto-select +1680+282, DFP: 1680x1050 +0+0"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "CRT: 1024x768_75 +1680+282, DFP: 1680x1050 +0+0"
SubSection "Display"
Depth 24
Modes "nvidia-auto-select"
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
I have 2 screens but it only shows the one above. I installed my graphics drivers using EnvyNG, the Nvidia software, including the Nvidia X Server Settings manager. I have the dual screen setup working fine, but I'd love to be able to do this and flip the right monitor.
In the Nvidia X Server Settings I've configured both my monitors to use the TwinView option, which spans one desktop/workspace across both monitors. Perhaps that is why it only displays the "single" screen in my xorg file.
I tried to use the Separate X screen option for both screens, with the thought that it would give each monitor it's own workspace, but when I applied it all it did was disable my 2nd display, the larger one, cramming everything onto my smaller one. Again perhaps this is because my xorg.conf file really only considers my smaller monitor, the Princeton one.
I would not mind keeping the TwinView option enabled where there's 1 workspace spanning across both screens, allowing me to drag windows back and forth, etc. But could this be done with one of the monitors rotated 90 degrees either CCW or CW? I was able to get both monitors rotated CW, but that only resulted in one tall/vertical workspace with the smaller Princeton monitor being "on top".
This is the code I used to get both monitors to be rotated:
Option "RandRRotation" "On"
Option "Rotate" "CW"
This was added into the Section "Monitor" portion specifying my Princeton monitor.
Because my smaller Princeton monitor seems to be the first screen (hence x screen 0), I guess the xorg.conf data thinks both monitors are part of it. If I could see a separate Section defined for my larger Acer display I might be able to then just flip one or the other.
Anyone have any suggestions how I can make one monitor landscape and the other portrait when you have a xorg.conf file such as mine?
I'm also using compiz with each screen display it's own cube. It would be cool if I could somehow retain these settings once one of the monitors is rotated.
fuzzybear3965
November 24th, 2008, 04:03 AM
Haha. I've search everywhere on the internet looking for a single rotated dual monitor configuration with compiz. It WILL NOT WORK!!! (yet) Xinerama seems to disable compiz plugins (cube, fire paint, etc. see http://ctrl-c.us/archives/10 paragraph 3) Xinerama treats each screen as one part of a big desktop (only use in twinview see http://en.wikipedia.org/wiki/Xinerama; 1st lines). If you want to do what I'm doing (rotate one screen as portrait and one as landscape simply do this:
*** copy xorg.conf (sudo cp etc/X11/xorg.conf /etc/X11/xorg.conf.backup
Type alt+F2
Type 'gksudo nvidia-settings'(no quotes) and click run
Go to 'X Server Display Configuration' and click 'Enable Xinerama'
Under the display tab click the configure button
Configure it as a separate X screen
Next click your second screen in the layout menu (where the screens are represented as squares) and enable Xinerama again.
Click 'save to X Configuration File' at the bottom
Open terminal and type: sudo gedit /etc/X11/xorg.conf
Navigate to the screen you wish to be rotated (in your case 1024x768 screen)
Type in the Device Section of the to-be-rotated screen and option
Type Option "RandRRotation" "on" (IN THE RIGHT DEVICE)
In the Screen Section of the to-be-rotated screen type
Option "rotate" "cw" (for landscape)
Exit gedit and save
Restart your X server (ctrl+alt+bkspce)
Move your mouse across both screens.
If you notice that it hops up or down in the transition between screens then adjust the height in the X Server settings (step 2)
Adjust the height, save to X configuration file and you should be done.
Checklist:
1. Make sure that the mouse smoothly and horizontally transitions between screens.
2. Make sure orientation is correct. E.g. have to move mouse off the opposite side of the screen to get it to the other one
|<--------(screen0)-(screen1)------------<|
3. Make sure X.org runs!!!
4. If one is not rotated post your xorg.conf and I'll try to help again
*** Keep in mind, you will lose compiz support. XP style maximize and minimize (minimal functionality). However, I find this a much better use of desktop space than to turn one off. Also remember, with twin view you cannot rotate one; if you wish to rotate a single screen and wish to maintain a contiguous display (drag windows across) you will need to use xinerama which screws up compiz effects, sorry buddy.
jason102
November 24th, 2008, 05:00 AM
Fantastic! That works! I do miss the fancy compiz effects... but I'm sure one of these days they'll get that feature to work as well!
I do still have one question... when I stepped through your instructions I somehow mixed up the screen numbers, like screen number 0 and 1 for each of the monitors under the X Screen tab. You wouldn't happen to know how to change those would you? Apparently 0 stands the primary monitor and 1 as secondary. What happens is it attempts to swap all my GUI configurations like toolbars and such to the other monitor, cramming the big screen's stuff onto the little one, and vice-versa. I mean I could definitely re-swap everything manually but you wouldn't happen to know how to change which screen has the number 0 and which one is assigned to be 1?
Anyways I know someone one of these days will fix the compiz stuff to work in our situations, so I'm now seriously considering buying that 22" wide screen beauty with the pivot adjustment!
fuzzybear3965, thanks for your quick reply, and of course for your help! I may suggest to the compiz folks that they should update their software, as more people will be able to get a hold of multiple monitor setups as the prices for these displays continue to go down, increasing the chances that more will attempt to do what we just did.
If anyone hears anything about such an update to compiz please post it here!
jason102
November 24th, 2008, 05:23 AM
So I just tried rotating my other monitor, the larger one. It worked, but something unexpected happened - I wasn't able to access it with my cursor! My mouse arrow was stuck on the smaller, non rotated screen, and I couldn't make it move off of it and onto the other one trying all 4 directions! Could it be because of the primary/secondary setup with my smaller one being set to 0 and the other 1? Or is there another reason?
fuzzybear3965
November 24th, 2008, 10:48 PM
Post your Xorg configuration /etc/X11/xorg.conf and I'll be able to help you more.
jason102
November 25th, 2008, 03:02 AM
I figured out what the problem was - basically the reason why I could not move my arrow to the other screen was because I had not specified the location values correctly under Position. Each screen's must be "touching" the other in order for them to act as one workspace. My primary monitor was not touching the secondary one, pretty much with a gap of empty "space" between them. Because of this, my cursor was trapped on the island of my primary screen.
Another thing that at first confused me was when I was trying to get the position values correct AFTER my one screen was rotated; nvidia-settings doesn't rotate the screen visual yet behaves like it is. I couldn't figure out why it would only work when my smaller monitor was place in a very odd position compared to the other until I thought of it rotated, which then made sense.
After I figured these out I realize it's unnecessary to change which is primary and which is secondary; it really doesn't matter, unless you want the Ubuntu login screen to be displayed on one or the other.
fuzzybear3965
November 25th, 2008, 02:31 PM
Great!!! I'm glad you figured it out. Dual monitor setups are nice. Plus, they make your friends jealous. ;) (DUDE, 2 SCREENS???!!!) hahaha
jason102
November 26th, 2008, 06:36 PM
I just discovered that the problem is not with compiz - it's with the nvidia drivers. The Nvidia people need to get their act together: http://ubuntuforums.org/showthread.php?t=803314
grambo
January 6th, 2009, 04:27 PM
did you have to manually edit the xorg.conf to get any portrait resolution options for the screen? I've got 2 screens that I want to have both portrait and all of the resolution options that I saw (thru the nvidia application) were landscape...
Is this something that has to be done when X starts up, or can the nvidia drivers change from landscape to portrait on-the-fly?
thanx in advance,
-Jon
jason102
January 6th, 2009, 05:23 PM
Read the 4th post by fuzzybear and then manually edit and add
Option "RandRRotation" "On"
Option "Rotate" "CW"
to rotate the desired monitor clock wise or
Option "RandRRotation" "On"
Option "Rotate" "CCW"
counter clockwise by 90 degrees. Put both commands in each of your Monitor sections in the xorg.conf file if you want both of your monitors to be rotated.
nvidia-settings at the moment doesn't support rotation so that's why you have to manually edit the xorg.conf file and add those commands in. Then when you're positioning the 2 screens in nvidia-settings with absolute positioning just flip the monitors to be vertical in your mind and forget about the graphic showing the horizontal ones in the app. You're going to have to visualize your desired setup and then think about the values to be added (in terms of resolution width and height) when positioning them.
DjNDB
February 2nd, 2009, 07:30 PM
Hope this helps someone out there with a similar config... As a side note with Dual monitors like this Compiz does not work since one is rotated like that...
Thank you so much, finally something that works.
Kirk Wolf
March 9th, 2009, 07:12 PM
I've got a 8.04 system with a Athlon 3800 x2 (dual core) processor and I wanted to drive two LCD monitors.
I picked up a new NVIDIA 9400GT card and it seemed to work flawlessly with one display (after I upgraded to the 173.14.12 NVIDIA driver using EnvyNG)
I followed this thread and setup a dual head config, with one rotated into landscape mode. I love the configuration, but....
I noticed that my graphics performance was very sluggish... moving and resizing windows takes quite a bit to "redraw" rectangles, etc. The overall system seems sluggish as well.
Now I notice that my dual CPUs are running at roughly a combined 50% rate (nearly 100% of one core, but high activity flips back and forth between the cores) when there is any graphics activity at all.
So, something about my configuration is slurping mucho processing cycles.
Here's my xorg.conf:
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 308
Screen 1 "Screen1" 1920 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection
Section "ServerFlags"
Option "Xinerama" "1"
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: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Acer H233H"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "DELL 2005FPW"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "D9M-20"
BusID "PCI:5:0:0"
Option "NoLogo" "True"
Screen 0
EndSection
Section "Device"
Identifier "Videocard1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "D9M-20"
BusID "PCI:5:0:0"
Option "NoLogo" "True"
Option "RandRRotation" "on"
Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP-0: 1920x1080 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Videocard1"
Monitor "Monitor1"
DefaultDepth 24
Option "TwinView" "0"
Option "metamodes" "DFP-1: 1680x1050 +0+0"
Option "rotate" "ccw"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Thanks for any help or suggestions.
-- Kirk
fuzzybear3965
March 10th, 2009, 10:52 AM
I have the same problem with the sluggish graphics. That's normal and and I'm waiting for Xinerama and Compiz to work together; that's when that will go away. But you say that your CPU is working at an average of 50%.
Open a terminal and type in 'top'.
Is the major process Xorg? Is that the one predominantly absorbing cycles?
Kirk Wolf
March 10th, 2009, 10:59 AM
Yeah, its xorg that is taking most of the cpu.
fuzzybear3965
March 11th, 2009, 01:23 AM
yeah man, I'm afraid there's nothing you can do about that.
Kirk Wolf
March 11th, 2009, 09:09 AM
Its unacceptably slow, so I'm going to bail on it. Too bad. Its curious why nvidia would implement a feature that is so slow that their graphics chips look like crap when you use it.
zeus77
December 11th, 2009, 04:30 PM
Lots of good info in this thread -- thanks to all who provided the steps necessary to get 1 portrait and 1 landscaping LCD working together with an nVidia graphics card.
Is it still the case that it's impossible to get Compiz working with this setup?
fuzzybear3965
December 11th, 2009, 04:36 PM
Check this out: http://www.youtube.com/watch?v=1DWzuIreDG . I guess it is possible. Check this out too: http://ubuntuforums.org/showthread.php?t=884161 . To sum it all up I'd go here: http://meandubuntu.wordpress.com/2008/12/13/compiz-and-xinerama-on-nvidia/ . Let me know how it turns out man!
zeus77
December 12th, 2009, 03:39 PM
fuzzybear -- thanks for the info. probably not worth it for me if i have to run an old version of xserver-xgl (which is dead, according to the blog post).
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.