Config

Differences between revisions 2 and 3
Revision 2 as of 2008-04-24 01:11:46
Size: 957
Editor: c-67-168-235-241
Comment:
Revision 3 as of 2008-04-24 02:23:43
Size: 4296
Editor: c-67-168-235-241
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Of course, such a transition is not without some rough patches, and it's possible users may find themselves in a spot where they may still need to do some manual configuration. And that is what this page is for. Of course, such a transition is not without some rough patches, and it's possible users may find themselves in a spot where they may still need to do some manual configuration in {{{/etc/X11/xorg.conf}}}. And that is what this page is for.

Oh, and one bit of good news - if you're not sure you need to read this, you probably don't! By and large X automatically configures itself now, or via GUI tools such as ''Screen Resolution''. Where it doesn't, that's usually considered a bug, so you should handle it as you would any Ubuntu bug - head to [http://bugs.launchpad.net/ubuntu Launchpad].


== Setting up dual-screen in xorg.conf using XRandR 1.2 ==

If you have an ATI, Intel, or Nvidia video card with two outputs (such as a VGA + DVI) you can set up a dual screen configuration using the ''X Resize, Rotate and Reflection Extension'' (''XRandR 1.2'').

The easiest way to do this is using the ''Screen Resolution'' GNOME applet under System > Preferences. This tool doesn't modify your xorg.conf, but rather applies the changes dynamically during GNOME startup.

An alternative is to set it up manually in {{{xorg.conf}}}. You might want to do this if you're not running GNOME, or if you want it to take effect earlier on in the bootup sequence, or if you want to trick things out beyond what the GUI tool is capable of.

Here is an example {{{xorg.conf}}} setting up dual-head with XRandR in Ubuntu Hardy:

{{{
Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "us"
        Option "XkbOptions" "lv3:ralt_switch"
EndSection

Section "InputDevice"
        Identifier "Configured Mouse"
        Driver "vmmouse"
        Option "Emulate3Buttons" "true"
EndSection

Section "Device"
        Identifier "Configured Video Device"
        BusID "PCI:1:0:0"
        Option "Monitor-VGA" "Left Monitor"
        Option "Monitor-DVI" "Right Monitor"
EndSection

Section "Monitor"
        Identifier "Left Monitor"
EndSection

Section "Monitor"
        Identifier "Right Monitor"
EndSection

Section "Screen"
        Identifier "Default Screen"
        Device "Configured Video Device"
        DefaultDepth 24
        SubSection "Display"
            Depth 24
            Virtual 3840 1200
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier "Default Layout"
        Screen "Default Screen"
        InputDevice "Generic Keyboard"
        InputDevice "Configured Mouse"
EndSection
}}}

There are two important things to note that you may have to alter.

The first is the BusID; look at the output of {{{lspci | grep VGA}}} to see what Bus ID your video card is on.

The second is the Virtual setting in the Display SubSection. In general, this should be set to the ''total size'' of your combined screen. So if you have two 1920x1200 monitors you plan to put side by side, this would be (1920*2) x 1200 = 3840 x 1200.

One important note: X has a limitation on Virtual size for 3D acceleration. If you set Virtual to larger than 2048x2048, you won't be able to use 3D acceleration - which means no Compiz Desktop Effects. So you may have to trade off between having vast expanses of screen real estate, vs. having nifty 3D effects.

Once upon a time, long long ago, Linux users had to manually configure their X Window System in order to use graphical programs. Then came Linux distributions which provided install scripts that (most of the time) created a basic configuration file for the user, that they could then customize and/or fix. Today, we are transitioning towards a "config-less" X, that figures out everything those install scripts used to, but all inside X itself.

Of course, such a transition is not without some rough patches, and it's possible users may find themselves in a spot where they may still need to do some manual configuration in /etc/X11/xorg.conf. And that is what this page is for.

Oh, and one bit of good news - if you're not sure you need to read this, you probably don't! By and large X automatically configures itself now, or via GUI tools such as Screen Resolution. Where it doesn't, that's usually considered a bug, so you should handle it as you would any Ubuntu bug - head to [http://bugs.launchpad.net/ubuntu Launchpad].

Setting up dual-screen in xorg.conf using XRandR 1.2

If you have an ATI, Intel, or Nvidia video card with two outputs (such as a VGA + DVI) you can set up a dual screen configuration using the X Resize, Rotate and Reflection Extension (XRandR 1.2).

The easiest way to do this is using the Screen Resolution GNOME applet under System > Preferences. This tool doesn't modify your xorg.conf, but rather applies the changes dynamically during GNOME startup.

An alternative is to set it up manually in xorg.conf. You might want to do this if you're not running GNOME, or if you want it to take effect earlier on in the bootup sequence, or if you want to trick things out beyond what the GUI tool is capable of.

Here is an example xorg.conf setting up dual-head with XRandR in Ubuntu Hardy:

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "us"
        Option          "XkbOptions"    "lv3:ralt_switch"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "vmmouse"
        Option          "Emulate3Buttons"       "true"
EndSection

Section "Device"
        Identifier      "Configured Video Device"
        BusID           "PCI:1:0:0"
        Option          "Monitor-VGA" "Left Monitor"
        Option          "Monitor-DVI" "Right Monitor"
EndSection

Section "Monitor"
        Identifier      "Left Monitor"
EndSection

Section "Monitor"
        Identifier      "Right Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "Configured Video Device"
        DefaultDepth    24
        SubSection "Display"
            Depth           24
            Virtual         3840 1200
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
EndSection

There are two important things to note that you may have to alter.

The first is the BusID; look at the output of lspci | grep VGA to see what Bus ID your video card is on.

The second is the Virtual setting in the Display SubSection. In general, this should be set to the total size of your combined screen. So if you have two 1920x1200 monitors you plan to put side by side, this would be (1920*2) x 1200 = 3840 x 1200.

One important note: X has a limitation on Virtual size for 3D acceleration. If you set Virtual to larger than 2048x2048, you won't be able to use 3D acceleration - which means no Compiz Desktop Effects. So you may have to trade off between having vast expanses of screen real estate, vs. having nifty 3D effects.

References

X/Config (last edited 2020-10-13 09:10:05 by yktooo)