I just bought a second monitor, a nice 24″ LCD that seems so much crisper than my ancient 19″ LCD. Setting up the dual monitor setup in Gentoo isn’t hard at all. I know that X.org has a lot of issues but luckily, setting up dual monitors is straightforward and works out well. I have an older graphics card, the Nvidia GeForce 6600 GT, but it works well, so why change?
First, enable the xinerama flag for all your apps, since you want them to stretch across dual monitors. Just put it in your make.conf
USE="avahi nvidia xvmc acpi xulrunner symlink dri hal java cdr dvd dvdr bitmap-fonts truetype-fonts type1-fonts nptl nptlonly gtk2 nsplugin pdf glitz svg truetype lm_sensors xinerama"
Then, re-emerge your entire world, if the xinerama flag was new for you.
emerge -avuDN world
When it’s done, edit your /etc/X11/xorg.conf and do the following:
1. First, duplicate the device
Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 6600 GT" BusID "PCI:4:0:0" Screen 0 EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 6600 GT" BusID "PCI:4:0:0" Screen 1 EndSection
Then, add the second monitor. In my case, it was the first because I wanted the 24″ to be the primary monitor, but it really makes no difference.
Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Acer AL1913" HorizSync 30.0 - 82.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "BENQ E2400HD" HorizSync 30.0 - 83.0 VertRefresh 55.0 - 85.0 Option "DPMS" EndSection
On, the Nvidia 6600 GT, there are two outputs, the analog VGA one and the DVI one. They are called CRT-0 and CRT-1 respectively. To set up your screens, put in the following, taking care to adjust the resolution to what you want
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoTwinViewXineramaInfo" "False"
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "CRT-1, CRT-0"
Option "metamodes" "CRT-0: nvidia-auto-select +0+0; CRT-0: 1024x768
+0+0; CRT-0: 800x600 +0+0; CRT-0: 640x480 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "NoTwinViewXineramaInfo" "False"
Option "TwinViewXineramaInfoOrder" "CRT-1, CRT-0"
Option "TwinView" "1"
Option "metamodes" "CRT-1: nvidia-auto-select +0+0; CRT-1: 1280x1024
+0+0; CRT-1: 1024x768 +0+0; CRT-1: 800x600 +0+0; CRT-1: 640x480 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
I wanted the second screen to be to the right of the first screen. You can set it below or above, as your monitors are arranged. For my config, I had
Section "ServerLayout" Identifier "Simple Layout" Screen 0 "Screen0" RightOf "Screen1" Screen 1 "Screen1" 0 0 InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection
And when you restart X, you should see the login in the middle. I adjusted the taskbar to fill the bottom of the first screen, but not to extend over to the second. You can play around with the settings, or of course, just use nvidia-settings for an easier setup process.
A nasty bug in KWin prevents the maximization of windows to the current monitor, instead stretching them across both monitors. It should be fixed soon and then everything will be perfect.