Your feedback is important to keep improving our website and offer you a more reliable experience.
主页 / Intel® Graphics for Linux* / Documentation / Intel® Graphics for Linux* - How to Set up Dual Head for Intel Graphics with RandR 1.2

How to Set up Dual Head for Intel Graphics with RandR 1.2

Published by:
Last modification:
Mar 01, 2015

1. Introduction

This guide is targeted toward people who want to use extended desktop mode on two outputs. Clone mode should work out-of-box with a normal configuration.

With RandR 1.2, you can set up dual head and add/remove the monitor dynamically (that is, on-the-fly, without restarting X).

To use RandR 1.2, you might need to know three key concepts: (Virtual) Screen, Crtc, and Output. A display is in one (Virtual) screen, which may consist of more than one crtc. Every crtc will occupy one rectangular region in the (Virtual) screen and may have different modes. A crtc can connect to more than one output and determine the output's property. Output is a port to monitor.

Intel GFX device supports two pipes, which each correspond to a crtc. So there can be two crtcs per Intel GFX device.

Prerequisite: To use randr1.2, you must use xserver 1.3 or above. And for Intel gfx driver, you must use xf86-video-intel 2.0.0 or above.

Note: After the driver was moved to Kernel Mode Setting, the name of the output changes (such as from LVDS to LVDS1).

2. Two methods of setting up

We can set up dual head:
-- dynamically by using xrandr tool
-- statically by setting in xorg.conf.

xrandr tool (an app component in Xorg) is a command line interface to RandR extension, and can be used to set outputs for a screen dynamically, without any specific setting in xorg.conf. Refer to the xrandr manual for details.

Also, you can set up dual head statically in xorg.conf. With RandR1.2 enabled drivers, monitors may be tied to specific outputs of the video card. Refer to the xorg.conf manual for details.

Below, we use examples to show how to set up dual head both ways.

2.1. Dynamically set up with xrandr

Xrandr can be used to change outputs' mode, rotation direction, position, etc. In this guide, we introduce only options related to the dual head setting.

You can see the outputs' status with option '-q'. Here's an example:

# xrandr -q

Screen 0: minimum 320 x 200, current 2048 x 768, maximum 2048 x 2048

VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm

   1024x768       60.0*+   75.1     60.0*

   800x600        75.0     60.3

   640x480        75.0     60.0

   720x400        70.1

LVDS connected 1024x768+1024+0 (normal left inverted right x axis y axis) 304mm x 228mm

   1024x768       60.0*+   50.0

   800x600        60.3

   640x480        60.0     59.9

In the example above, two outputs (VGA and LVDS) are connected. Both have a resolution of 1024x768@60. Output VGA's viewport is at (0, 0) and output LVDS's viewport is at (1024, 0). That is, the LVDS's viewport is located to the right of VGA's viewport. The size of the area occupied by both outputs is 2048x768. The virtual screen size (maximum framebuffer) is 2048x2048, which is statically set in xorg.conf (see the next section). You can decrease the maximum with the '--fb' option, but you cannot increase it. You need make sure your screen size falls into the maximum framebuffer, otherwise you should increase the value in xorg.conf.

There are five xrandr options that can be used to set the dual head:

      --pos <x>x<y>

      --left-of <output>

      --right-of <output>

      --above <output>

      --below <output>

The last four will set the output's relative position to another output, for example:

# xrandr --output VGA --left-of LVDS

Option '-pos' is more flexible which can place output to anywhere, for example:

# xrandr --output VGA --pos 200x200

# xrandr --output LVDS --pos 400x500

2.2. Statically set up in xorg.conf

RandR1.2 configuration in xorg.conf is set by monitor. So you need write a 'Monitor' section for each output and specify these monitors in the 'Device' section.

Below is a example snippet in xorg.conf.

Section "Device"

        Identifier      "Intel 945G "

        Driver         "intel"


        # Using the name of the output defined by the video driver plus the identifier of a

        #     monitor section, one associates a monitor section with an output by adding an

        #     option to the Device section in the following format:

        #     Option "Monitor-outputname" "monitor ID"

        Option          "monitor-VGA" "foo"

        Option          "monitor-LVDS" "bar"

        #Option         "monitor-TMDS-1" "dvi"



Section "Monitor"

        Identifier      "foo"


        # specifies a mode to be marked as the preferred initial mode of the monitor

        # Option "PreferredMode"  "800x600"

        # This optional entry specifies the position of the monitor within the X screen.

        #Option        "Position" "1024 0"

        #This optional entry specifies that the monitor should be ignored

        #     entirely, and not reported through RandR.  This is useful if the

        #     hardware reports  the  presence  of  outputs  that do not exist.

        #Option "Ignore"  "true"



Section "Monitor"

        Identifier      "bar"


        #Options LeftOf, RightOf, Above, Below specify monitors' relative position

        Option "LeftOf"  "foo"

        # This optional entry specifies  whether  the  monitor  should  be

        #     turned  on  at  startup.  By default, the server will attempt to

        #     enable all connected monitors.

        #Option "Enable"  "true"       

        #This optional entry specifies the initial rotation of the given monitor.

        #     Valid values for rotation are "normal", "left", "right", and "inverted".

        # Option "Rotate"  "left"



Section "Screen"

        Identifier      "Default Screen"

        Device        "Intel Corporation 945G Integrated Graphics Controller"

        Monitor       "foo"

        DefaultDepth  24

        SubSection "Display"

                Depth          24

                Modes         "1280x1024"  "1024x768"   "640x480"



3. Reference

xorg.conf manual

xrandr manual


Was this information helpful?