[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xorg.conf mit 2 Monitoren



Am Dienstag 11 November 2008 schrieb Andreas Pakulat:
> Hi,

Hi Andreas,

> hab hier ein Setup mit 2 Monitoren und haette es ganz gerne, dass ich
> ohne einen nachtraeglichen xrandr Aufruf die korrekten Aufloesungen
> bekomme.
>
> Im Moment werden beide mit 1440x1050 gestartet, was das hoechste ist
> das der kleinere Monitor hinbekommt. Der grosse jedoch soll mit
> 1920x1200 betrieben werden.
>
> Die xorg.conf schaut im Moment so aus:

Einfach bei Google How to randr suchen ;-) und unten stehenden Wikitext 
finden. Das Ausschalten des VGA-Ausgangs via Ignore-Option hat auf meinem 
ThinkPad T42 mit Radeon-Treiber nicht funktioniert - vielleicht klappt es 
mittlerweile. Ich habe einen xrandr-Befehl dazu im KDE-Autostart.

Neben gtf gibts auch noch cvt für Flachbildschirme.

Ich denke, PreferredMode brauchst Du nur, wenn Du mit einem der 
automatisch erkannten und gewählten Modi nicht zufrieden bist.

---------------------------------------------------------------------
III. xorg.conf based configuration

Running xrandr is convenient for dynamic configuration, but it may be 
boring if you have to run it after every startup of your X server. 
Section III.6 summarizes all this by showing an example of modern 
configuration. 


III.1. Per Output Config

Before configuring an output, you need to know how to specify it in the 
config file. To do so, you may add a Monitor-FOO option to the Device 
section to identify the monitor section for output FOO. For instance: 

  Section "Device"
    Identifier "My Graphic Board"
    ...
    Option "Monitor-LVDS" "Internal Panel"
    Option "Monitor-VGA" "External VGA Monitor"
  EndSection
  Section "Monitor"
    Identifier "Internal Panel"
    ...
  EndSection
  Section "Monitor"
    Identifier "External VGA Monitor"
    ...
  EndSection

Then, all output-specific options should go in the corresponding Monitor 
section. 


III.2. Placing outputs

Add the following line to place one monitor on the right of another one as 
xrandr --output FOO --right-of BAR would do: 

  Section "Monitor"
    Identifier "FOO"
  EndSection
  Section "Monitor"
    Identifier "BAR"
    Option "RightOf" "FOO"
  EndSection


III.3. Changing DPI and DisplaySize
If your monitor size isn't detected correctly and thus generates a wrong 
DPI, you need to add a DisplaySize option to the corresponding monitor 
section. For output FOO, use: 

  Section "Monitor"
    Identifier "MyMonitor"
    DisplaySize 304 228
  EndSection
  Section "Device"
    ...
    Option "Monitor-FOO" "MyMonitor"
  EndSection


III.4. Forcing outputs off or on

If for some reason one output of your graphic board is enabled while it 
should not, you might want to disable it (for instance because the number 
of CRTCs available is limited). To do so, add: 

    Option "Ignore" "true"

If for some reason one output is disabled by the driver (for instance 
VGA-0 on Radeon Xpress 200 because load detection is not reliable in the 
driver yet), you might want to enable it by force. To do so, add: 

    Option "Enable" "true"

Then, you might need to add modes since such an output may not query modes 
correctly. See "Forcing a preferred mode" to do so. 


III.5. Forcing a preferred mode

This is one of rare cases where the ModeLine open is still useful these 
days. If the preferred mode reported by your monitor isn't the one you 
want by default, or if there is no preferred mode and the driver does not 
choose the right one, you might want to force another mode on an output. 
Assuming you want to force 1280x1024 at 75Hz at startup, add something 
like the following to the Monitor section: 

    Modeline "1280x1024_75.00"  138.54  1280 1368 1504 1728  1024 1025 
1028 1069  -HSync +Vsync
    Option "PreferredMode" "1280x1024_75.00"

The ModeLine line may be obtained by looking at your current Xorg.0.log if 
the mode is already detected (when it appears in the output of xrandr). 
Or you may generate a new one using:
 
  $ gtf 1280 1024 75
  Modeline "1280x1024_75.00"  138.54  1280 1368 1504 1728  1024 1025 1028 
1069  -HSync +Vsync


III.6. Example of modern configuration

Here's an example of xorg.conf for a ATI board with DVI-0 (with 
DisplaySize and preferred mode forced), LVDS (placed on the right of 
DVI-0) and VGA-0 (disabled) outputs. 

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "keyboard"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc101"
        Option          "XkbLayout"     "us"
EndSection

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"       "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

# external DVI with DisplaySize and preferred mode overriden
Section "Monitor"
    Identifier      "External DVI"
    DisplaySize     304 228
    Modeline "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 
1028 1060  -HSync +Vsync
    Option "PreferredMode" "1280x1024_60.00"
EndSection
# internal laptop panel to place on the right of DVI-0

Section "Monitor"
    Identifier      "Integrated LCD"
    Option          "RightOf" "External DVI"
EndSection

# disable VGA by default
Section "Monitor"
    Identifier      "VGA-0"
    Option "Ignore" "true"
EndSection
Section "Device"
    Identifier      "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    Driver          "ati"
    BusID           "PCI:1:0:0"
    Option          "AccelMethod"   "EXA"
    Option          "Monitor-DVI-0" "External DVI"
    Option          "Monitor-LVDS"  "Integrated LCD"
    # no need to specific Monitor-VGA-0, it uses the "VGA-0" identifier 
automatically
EndSection

Section "Screen"
    Identifier      "Default Screen"
    Device          "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    DefaultDepth    24
    SubSection "Display"
        Depth           24
        # big virtual screen to place
        Virtual         3072 1200
    EndSubSection
EndSection

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

http://wiki.debian.org/XStrikeForce/HowToRandR12

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: