Vertical dual screen setup with XRandR and Compiz

vaio-setup.JPG

I recently bought a Samsung Syncmaster. As opposed to the last time I tried to setup my second screen in a vertical position it worked this time. The Samsung screen has the same viewing angle and picture quality when positioned vertically as it has when positioned default horizontally.

Up until now I had only connected external screens that had a resolution of 1440×990 and it had worked just fine with Xinerama. This time it was a no go, somehow Xinerama mode with Compiz on an external screen with 1920×1080 resolution was a no no.

And since I was going to put it in a vertical position I couldn’t use TwinView either (it’s a kind of cheat that will fool the hardware into believing that the screens are one screen, to manage that you can’t have 1920×1080 and 1080×1920, they need to be of the same resolution and unrotated for it to work properly).


So if I wanted to keep the Compiz goodies (which I did) the only option left was separate screens without Xinerama. I’ve read a lot of whining blog and forum posts about this mode, how much it sucks to not be able to pull windows between the screens and so on and to be honest I don’t quite get it. What do you need two screens for in the first place? Probably because you want certain applications on one of them and certain applications on the other. Like code editors / word processing on one and the browser on the other. Why on earth do you need to pull windows from one screen to the other then?

I’ll tell you what, I kind of thought it sucked when I was using Xinerama that windows were ending up only on the first screen, thus making me have to pull some of them to the second one every time I started a new session. In that regard both TwinView and separate screens wins.

Back to the problem at hand; having plugged in my new screen I needed to rotate it 90 degrees to get that no-more-scrolling goodness. This is done with XRandR and I tried a few GUI tools that were supposed to manage the rotation but to no avail (and no you won’t find any settings in the Nvidia panel either).

I had to resort to hard coding this stuff into my xorg.conf which looked like this when I was done:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@crested)  Sun Feb  1 20:25:37 UTC 2009

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" 1920 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" "0"
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      "Nvidia Default Flat Panel"
    HorizSync       29.0 - 68.0
    VertRefresh     0.0 - 61.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync       27.0 - 81.0
    VertRefresh     50.0 - 60.0
    Option         "DPMS"
    Option         "RandRRotation" "on"
    Option         "Rotate" "CCW"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600M GT"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600M GT"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DFP-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
tower-layout.png

Note “RandRRotation” “on” and “Rotate” “CCW”. Having restarted my X-server by way of Ctrl – Alt – Backspace it finally worked just the way I wanted.

The feeling you get when you first open some long blog post on a 1080×1920 screen can not be described, it has to be experienced. Awe comes close. However, after a little bit of usage you quickly realize that you’ve adapted to having virtually unlimited horizontal screen space, just take a look at the picture to the right…

I ended up changing back to TwinView with dual horizontal setup in the end. However if I one day end up with a three screen configuration I might just have one of them in a vertical position…


Related Posts

Tags: , , , ,