A few months back I got a new 12.1” System76 Darter laptop and I finally decided to setup dual monitors on Kubuntu 9.10 (Karmic Koala).What I wanted was to have my laptop LCD on the left at 1280x800 and my ViewSonic LCD panel on the right running at 1680x1050. Apparently I’m old-skool, because I’m used to hacking away at my
xorg.conf just to get dual monitor support to work under Linux. Somehow I never knew about xrandr, KRandR, etc.
ThinkWiki has a great article about using XRandR that really helped me out. When I first launched Kubuntu the two screens were mirrored. So, I tried to use KRandR to set the screens side by side. Unfortunately, it seemed to be confused - it saw there were two outputs, but it thought they were the same screen. This is where the ThinkWiki article came in handy.
With the later versions of Xorg, Ubuntu doesn’t even include an
xorg.conf. Instead of even monkeying around with Xorg, I just used xrandr. There were three key steps:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
This shows I have two main outputs connected right now: VGA1 and LVDS1. Under Ubuntu 9.04 (Jaunty), my outputs were labeled VGA and LVDS.
Disable secondary output
Once we know the name of the outputs, we can disable the secondary output. This is the key step to getting a large virtual desktop working without something like Xinerama. If you don’t disable the secondary output, Xorg never seems to be able to successfully distinguish between the two outputs.
Re-enable both outputs
When we re-enable the outputs we can specify the location of the secondary display, relative to the primary. We can also let xrandr figure out the best resolution for each:
Voila. Finally, if you want to automate this, the ThinkWiki article has a great little script you can use. However, I did have to modify it slightly … I had to force the VGA1 output off before setting them both to auto. Without that, the secondary screen remained blank.
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
Place this in
45custom_xrandr-settings and it will automatically run.