# Converting XRandR command into xorg.conf syntax

## srunni

Hi,

I'm trying to set up an (1280x1024) external monitor on my ThinkPad T400 (which has a built-in 1440x900 monitor), which is running the RadeonHD driver for its ATI Mobility Radeon HD 3470 chipset. When I use the command

```
xrandr --output PANEL --mode 1440x900 --output VGA_1 --mode 1280x1024 --left-of PANEL
```

I'm able to get a mostly-correct setup. The only problem is that the bottom edges of the two screens should be lined up, rather than the top edges.

I would also like to convert the XRandR command to something that can be placed in xorg.conf, so I don't have to run the XRandR command upon boot. However, in xorg.conf, I can't get it to work at all; X just keeps starting in clone mode. Here's my current xorg.conf:

```

Section "Files"

   ModulePath   "/usr/lib/xorg/modules"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/TTF/"

   FontPath     "/usr/share/fonts/OTF"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/100dpi/"

   FontPath     "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

   Load  "dri"

   Load  "xtrap"

   Load  "extmod"

   Load  "glx"

   Load  "record"

   Load  "dbe"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "auto"

   Option       "Device" "/dev/input/mice"

   Option       "ZAxisMapping" "4 5 6 7"

EndSection

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "NoAccel"               # [<bool>]

        #Option     "AccelMethod"           # [<str>]

        #Option     "offscreensize"         # [<str>]

        #Option     "SWcursor"              # [<bool>]

        #Option     "ignoreconnector"       # [<str>]

        #Option     "forcereduced"          # [<bool>]

        #Option     "forcedpi"              # <i>

        #Option     "useconfiguredmonitor"    # [<bool>]

        #Option     "HPD"                   # <str>

        #Option     "NoRandr"               # [<bool>]

        #Option     "RROutputOrder"         # [<str>]

        #Option     "DRI"                   # [<bool>]

        #Option     "TVMode"                # [<str>]

        #Option     "ScaleType"             # [<str>]

        #Option     "UseAtomBIOS"           # [<bool>]

        #Option     "AtomBIOS"              # [<str>]

        #Option     "UnverifiedFeatures"    # [<bool>]

   Identifier  "Card0"

   Driver      "radeonhd"

   VendorName  "ATI Technologies Inc"

   BoardName   "Mobilitiy Radeon HD 3400 Series"

   BusID       "PCI:1:0:0"

   Option      "PANEL" "Laptop Monitor"

   Option      "VGA_1" "External Monitor"

EndSection

Section "Monitor"

   Identifier  "Laptop Monitor"

   Option      "PreferredMode" "1440x900"

   Option      "Position" "1280 124"

EndSection

Section "Monitor"

   Identifier  "External Monitor"

   Option      "PreferredMode" "1280x1024"

   Option      "Position" "0 0"

EndSection

Section "Screen"

   Identifier "Default Screen"

   Device     "Card0"

   Monitor    "Laptop Monitor"

   Monitor    "External Monitor"

   DefaultDepth 24

   SubSection "Display"

      Depth     24

      Virtual   2880 1024

   EndSubSection

EndSection

Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen         "Default Screen"

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection
```

Any ideas?

Thanks

----------

## markisthejob

Dont know about the screen edges but you can add the command to ~/.xinitrc to enable it at startup.Here is mine

```
xrandr -s 1360x768

exec startkde
```

----------

## srunni

 *markisthejob wrote:*   

> you can add the command to ~/.xinitrc to enable it at startup

 That only works if you're using startx to launch X; I'm using KDM. Perhaps there's some way to do this via KDM?

----------

## MorphiusFaydal

 *srunni wrote:*   

>  *markisthejob wrote:*   you can add the command to ~/.xinitrc to enable it at startup That only works if you're using startx to launch X; I'm using KDM. Perhaps there's some way to do this via KDM?

 

I believe {K,G,X}DM read from ~/.xsession

----------

## yangman

Read the instructions here: http://wiki.debian.org/XStrikeForce/HowToRandR12

----------

