Thursday, May 29, 2008

Dual Head with open source ati driver

I've been using ati's proprietary fglrx module to get a one desktop overlay across two screens, but the advent of xrandr has made this unnecessary.

Here's how to set up dual head with the radeon driver on Arch Linux.


1. Generate a basic xorg.conf
# hwd -xa
Here's mine.
2. Edit /etc/X11/xorg.conf. Add a line in the Display subsection of the Monitor section:
Virtual 2960 1050
The first number should be the sum of the horizontal resolution of each screen. For me 1680+1680+1280=2960. The second number is the height of the tallest screen. Add the line to the subsection with the associated DefaultColorDepth.

3. Manipulate the screen with xrandr

Enumerate the hardware:
# xrandr
Screen 0: ...
VGA-0 connected 1400x1050+1680+0 (normal left inverted right x axis y axis) ...
DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm...

I have two physical screens, DVI-0 and VGA-0. The resolution on DVI-0 looks fine already. To get VGA-0 set up:
# xrandr --output VGA-0 --mode 1280x1024
# xrandr --output VGA-0 --right-of DVI-0

Possible modes are resolutions listed in the left column of the output of xrandr.


That got everything working for me. I then added the two commands to a shell script in ~/.kde/Autostart/ in order to automatically configure the screens every time kde is launched. This approach is much easier than mucking around with an xorg.conf that gets broken by every other driver update.

No comments: