Dual Head video using Xinerama and fglrx

If you are trying to add a second monitor to your laptop running an ATI video card, the following should help you.

In my example, I’m using an ATI Mobility Radeon x300 on a laptop. The laptop’s display is the primary display, and will be running at 1280×800 resolution as the left screen. The secondary display is a CRT which will be running at 1280×1024 as the right screen.

Be sure to have fglrx running, as far as I know, the free Radeon drivers do not support xinerama yet.

In /etc/X11/xorg.conf my “Device” section looks like this:
Section "Device"
Identifier "Generic Video Card"
Driver "fglrx"
Screen 0
Option "MonitorLayout" "CRT, CRT+LFP"
BusID "PCI:1:0:0"
Option "SWCursor" "true"
EndSection

Section "Device"
Identifier "Card1"
Driver "fglrx"
Screen 1
Option "MonitorLayout" "CRT, CRT+LFP"
BusID "PCI:1:0:0"
Option "SWCursor" "true"
EndSection

Note that “SWCursor” is enabled. ATI’s fglrx driver has a bug which corrupts the cursor on the second monitor, if the monitor is a different resolution from the first monitor. The solution is to use SWCursor, which uses software rendering rather than hardware rendering to draw the cursor. This is a temporary solution, however, since SWCursor leaves artifacts on the screen when scrolling or dragging, and the rendering is generally slower than hardware cursor rendering.

Next we have the “Monitor” section. Be sure to find the correct refresh values for your monitor, a quick search can save your monitor from damage.

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection

Section "Monitor"
Identifier "MonExt"
Option "DPMS"
HorizSync 30.0-95.0
VertRefresh 50.0-160.0
EndSection

Next is the “Screen” section, the only thing here is to be sure that the “Device” and “Monitor” fields are correct for each screen, and then just set your desired depth and resolution.

Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1200x800"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "MonExt"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Finally, edit the “ServerLayout” section to tie everything together and enable xinerama.

Section "ServerLayout"
Identifier "DualHead"
Screen "Default Screen" LeftOf "Screen1"
Screen "Screen1"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
Option "Xinerama" "on"
EndSection

Advertisements

2 thoughts on “Dual Head video using Xinerama and fglrx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s