Additional options for the radeon driver

From ThinkWiki
Revision as of 21:57, 15 December 2006 by Helios42 (Talk | contribs) (AGP Fast Writes)
Jump to: navigation, search

Options for the radeon driver are documented on the radeon(4x) man page.

External Monitors

First of all, suppose you want to plug in your laptop into a projector occasionally, but you don't want to restart X when you do so. The easiest thing is to not use any of the CRT2 options and use

Option "MonitorLayout" "LVDS,NONE"

The vga port will carry the same signal as the laptop display (at least on my T42p). If the projector does not support the resolution, you can change it using xrandr.

Using Xinerama

You can use MergedFB to provide dualhead Xinerama-like setups. MergedFB's pseudo-Xinerama is not Xorg server's Xinerama. You don't have to enable Xorg server's Xinerama to use MergedFB's pseudo-Xinerama. However, applications compiled with Xinerama support (Gentoo users USE="xinerama") can interpret pseudo-Xinerama hints, for example, to maximize to a single monitor instead of spanning two monitors.

The following (partial) Xorg config will make the Radeon card use 1024x768 on the internal lcd display and 1280x1024 on the external (Note: only one screen/monitor section is needed (it controls the setup of the internal monitor) even though we have two displays): N.B.: Modes used in the MetaModes also have to be present in the screen modes section.

Section "Device"
        Identifier      "ATI"
        Driver          "radeon"
        # accelration
        Option          "AGPMode" "4"
        Option          "EnablePageFlip" "on"
        Option          "RenderAccel" "on"
        # enable (partial) PowerPlay features
        Option          "DynamicClocks" "on"
        # use bios hot keys on thinkpad (aka fn+f7)
        Option          "BIOSHotkeys" "on"
        # enable radeon specific xinerama
        Option          "MergedFB" "true"
        Option          "CRT2Position" "RightOf"
        Option          "CRT2Hsync" "50-75"
        Option          "CRT2VRefresh" "30-82"
        Option          "MetaModes" "1024x768-1280x1024"
        Option          "MergedNonRectangular" "true"
        BusID           "PCI:1:0:0"
EndSection
Section "Monitor"
        Identifier "InternalLCD"
        Option "DPMS"
EndSection
Section "Screen"
        Identifier "Default Screen"
        Device "ATI"
        Monitor "InternalLCD"
        DefaultDepth 24
        SubSection "Display"
                Depth 24
                Modes "1024x768"
        EndSubSection
EndSection

Note: The CRT2 directives always applies for the external monitore regardless of type (LCD, CRT...). The option MergedNonRectangular is needed to force the screens into two different sizes.

External Monitors and Docking Stations/Port Replicators

I seems that Xorg incorectly discovers the external displays when connected to a docking station/port replicator - the only solution to this problem (at least that I know of) is to start the laptop (and boot all the way into X) prior to inserting it in the dock.

It also happens that if you are attempting to use the mergedFB trick to do dual head with out a docking station, you have to start X on the laptop LCD first, then plug a monitor into the VGA port. If the external monitor is already plugged in, the internal LCD will be blank.

External Monitors and FireGL Boards with x.org 7

x.org release 7, the modular release, broke mergedfb mode with FireGL boards (t4xp systems). Dual screen displays hard locked the machine in certain cases. This is fixed in x.org cvs. Fedora Core 5 (and possibly other distros using x.org 7) can get a new version of radeon_drv.so here.

AGP speed

By default, the open source radeon driver forces 1x AGP speed. Quote from the developers:

tuning to the highest speed possible has caused hangs on some boxes, with no
discernable pattern, so we default to 'slow but safe' whilst giving the option
to go fast if the user wants to try it.


Higher speeds can be enabled by adding Option "AGPMode" "X" (where X is a number) in the Device section in /etc/X11/xorg.conf.

Section "Device"
       Identifier  "Videocard0"
       Driver      "radeon"
       VendorName  "IBM Thinkpad"
       BoardName   "ATIdd Mobility FireGL 7800"
       Option      "AGPMode" "4"
EndSection


With this option enabled (set to 4x speed), the X11 server should print (/var/log/Xorg.0.log):

(**) RADEON(0): Option "AGPMode" "4"
(**) RADEON(0): Using AGP 4x mode


AGP Fast Writes

By default, the open source radeon driver disables AGP Fast Writes. Fast Writes can be enabled by adding Option "AGPFastWrite" "yes" in the Device section in /etc/X11/xorg.conf.

Section "Device"
       Identifier  "Videocard0"
       Driver      "radeon"
       VendorName  "IBM Thinkpad"
       BoardName   "ATI Mobility FireGL 7800"
       Option      "AGPFastWrite" "yes"
EndSection
NOTE!
With this one X hangs on startup (black screen) on my ThinkPad T42 (helios42)

Dynamic Clock scaling

Please see:

Color Tiling

ColorTiling is supposed to be enabled by default. But, it looks like setting it explicitely to "on" increases the FPS in glxgears.

        Option          "ColorTiling"   "on"

Acceleration Architecture

By default, the XAA architecture is used. EXA is newer and supposed to have better performance. It looks like it reduces the FPS in glxgears (maybe because it disables Page Flip) but makes the Composite extension be fast.

       Option          "AccelMethod"   "EXA"

Page Flip

Page Flip increases performance but is not always supported. It will be disabled if the EXA architecture is used.

        Option          "EnablePageFlip"        "on"

Video overlay

When the video overlay is used (e.g., by most video players) in dual-screen configuration, the content will be shown only on one head (LCD or CRT) and the other will display a blank rectangle. To control which head displays the video, use the following:

        Option          "OverlayOnCRTC2"        "on"

Note : You may want to have the video overlay on both Screens. Simply add the following 2 lines :

        Option          "OverlayOnCRTC1"        "on"
        Option          "OverlayOnCRTC2"        "on"


To switch on the fly, use these commands:

xvattr -a XV_SWITCHCRT -v 0   (LCD)
xvattr -a XV_SWITCHCRT -v 1   (CRT)
Hint:
You can configure acpid to execute these commands automatically when the lid is opened or closed.

Related Links