Home [ade] cookies

Free(BSD) Graphics

Sebas wrote about Free and fast graphics a while back, which has led me to try the same on FreeBSD. I have a similar setup, with two monitors attached to a Radeon 4350. I’ve written about the 4350 on FreeBSD before. The minor challenge this time around was to get compositing working with a dual-head setup and to get the dual-head setup to show up on startup. Perhaps there’s a KDE-ish way of doing this, but I ended up setting up a xorg.conf with the desired layout. Without an xorg.conf, I’d get nicely mirrored displays, which I could manipulate sensibly with xrandr, but I couldn’t properly place the one monitor beside the other — xrandr kept complaining that my maximum screen size was 1650×1650.

So, manual configuration it is. I’m using X.Org X Server 1.7.5, Release Date: 2010-02-16, built on FreeBSD 8-STABLE, amd64, using the radeon driver v.6.13.0.

Thanks to the much improved auto-configuration in Xorg, the configuration file doesn’t have to be very long. The bits needed were a Device section, two Monitor sections, and a Screen section, like so:

Section "Device"
Driver "radeon"
Option "Monitor-DVI-0" "Monitor206"
Option "Monitor-VGA-0" "Monitor430"

(I’ve left out the Identifier and BusID lines, among others — they’re not relevant; I tried the radeonhd driver, but that didn’t yield quick results). The important thing here is the explicit identification of monitor identifiers with XRandR outputs — I have a Samsung 206S monitor connected to the DVI output, for instance. From here, we go to the two monitor sections. I’ve set preferred modes on both for their native resolution. When I didn’t, I got them both at the lowest common resolution, 1280×1024, which was ugly as sin.

Section "Monitor"
Identifier "Monitor206"
Option "Primary" "true"
Option "PreferredMode" "1680x1050"
Section "Monitor"
Identifier "Monitor430"
Option "RightOf" "Monitor206"
Option "PreferredMode" "1280x1024"

You can see that the 206S is my preferred monitor — this sets it up as the main monitor, which means that the KDE startup thing shows up there and most notifications do as well. The other monitor — a six year old Iiyama E430 — is off to the right, and houses Konversation and Akregator and other non-essential attention-grabbers. The difference in color reproduction between the two is striking, so much so that I give the second monitor a very different background just so I notice the color difference less.

The last bit is setting up the Screen for X. Here I’ve left out Identifier, Device, Default depth; the important bits seem to be the monitor and the Display, which define a primary monitor (again?) and the side of the desktop. In this case, the desktop size is the sum of the horizontal widths and the greater of the heights.

Section "Screen"
Monitor "Monitor206"
SubSection "Display"
Depth 24
Virtual 2960 1050

Unlike Sebas, I don’t seem to have OpenGL compositing in this setup. That could be because of the card, the software — Sebas points out that it’s a little finicky with versions of kernel and video drivers — or something else. Switching to XRender gets me something that’s good enough.

Tags: ,