α gemini kaethorn at gmail.com

Setting up MergedFB with X.org-CVS on Debian/Alpha

Contents



Introduction

As an attempt to create a dual-head setup on my alpha machine I started by using an additional graphics adapter what resulted in a working Xinerama desktop. Nevertheless, this configuration had two small disadvantages:

  • It isn't possible to access the DRI in normal Xinerama mode which means that certain routines are not accellerated. Video playback using xv is only possible on one of both screens.
  • The additional VGA naturally needs one extra slot and meant - in my case - using one of the 64 bit PCI slots as the 32 bit ones are used by two SCSI- cards and the first VGA. This setup requires a workaround as SRM refuses to work with cards which are not in it's table of 'safe devices'. However, setting the SRM variable pci_device_override to -1 solves this misery but is considered to be quite unsafe.
Given these circumstances I bought an ATI Radeon 7500 PCI which has plenty of RAM and two heads. In the console both screens display the same content (which I'd like to turn into a true dual-head console) and after editing the XFConfig-4 the Desktop appeared like before. The second problem was solved.
The first problem remained until I found out about MergedFB which deals with exactly this issue. As XFree86 4.3 doesn't support MergedFB and probably won't do in the future I gave X.org a try.



Compiling X.org CVS

New: As version 6.8.2 has been released, I've built a deb package of it which must be installed with --force all in order to overwrite files in xserver-common. But it works. It's in my repository and thus can be downloaded here . If you're not using a Debian based distro, continue reading.

Follow the instructions at http://dri.freedesktop.org/wiki/Building while using this version of host.def. Once the compilation is done continue with Installing over X.org or XFree86 as this won't touch the existing installation of XFree86.
Building the Mesa drivers needs some tweaking in the config/linux-alpha and is compiled via

$ make linux-alpha

Bulidung DRM and setting up the rest works as documented.


Configuring MergedFB

The MergedFB code was automatically built together with Xorg and works as soon as the xorg.conf has been adjusted properly. For reference I provide mine here. The most important lines, however, are these:
Section "Device"
	Identifier	"ATI Radeon 7500 PCI"
	Driver		"ati"
	BusID		"PCI:1:10:0"	
	Option		"DPMS" "Off"
	Option  	"MetaModes" "1024x768-1024x768 1024x768"
	Option  	"CRT2HSync" "56-85"
	Option  	"CRT2VRefresh" "75-75"
	Option  	"CRT2ForceOn" "true"
	Option 		"ForceCRT2Type" "VGA"
	Option 		"ForceCRT1" "true"
	Option  	"MergedFB" "true"
	Option  	"CRT2Position" "RightOf"
EndSection
[...]
	SubSection "Display"
		Depth		24
		Modes		"1024x768"
		Virtual   	2048 768
	EndSubSection
Make sure that Xinerama isn't initialized at any point. The SeverLayout section doesn't need to be modified.
Adding the radeon module to /etc/modules should be the last step.

Well, this worked fine just for me and is only ment as a rough guide. I'll answer questions if there are any and will publish .deb packages here sooner or later including X.org, Mesa drivers and probably the DRM for kernel 2.6.