CRазмeры дисплея, экраны и шрифты

xrandr

Supported Card Drivers

First step is just to type xrandr to see if it is supported, if xrandr is not supported go to sidxucc or check xorg version and driver used.

To change the resolution of your primary screen assuming your card can support it, for example:

xrandr --output VGA --mode 1440x900 
If your card does not support xrandr but you want another resolution as the default one you have to change xorg.conf for a static change

Как root выполнить в консоли следующее:

siduxcc

and follow the prompts, or with the GUI:Kmenu>System>sidux Control Centre>Display

Should X not automatically restart, restart X by doing

ctrl+alt+backspace

Dual Monitors and xrandr

You are about to edit xorg config files, please, please, please make a back-up of xorg.conf, before going any further!

One of the greatest advantages of xorg 7.3 is hotplug. With xrandr you can configure your primary and secondary screen without restarting X. xrandr replaces xinerama and mergedFB. With xrandr 1.2 enabled, the "old way configuration" in xorg.conf ( xinerama and mergedFB) may not work anymore.

Supported Card Drivers

Preparation for xrandr configurations of a PC with Dualhead

Note: Ideally, if you are running 2 monitors from a PC all the time, your xorg.conf should be altered to be permanently to reflect that mode.

A laptop/notebook needs to be dynamically configured (as opposed to a PC with 2 monitors) and when you reboot you will need to start over, unless you set up the dual-head with whatever parameters you use in xrandr, then you copy/paste that in a script to ~/.kde/Autostart/.

Getting familiar with xrandr

First step is just to type xrandr in a shell as user to get familiar with the output:

xrandr
Screen 0: minimum 320 x 200, current 2048 x 768, maximum 2048 x 768
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.1     70.1     60.0*    59.9
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        75.0     72.8     66.7     60.0
   720x400        70.1

Here you see that only vga, for the PC (see Appendix A for output name explanation). You see the resolutions that are supported by that screen and (which is important for dual head) the maximum screen size (here 1024x768).

Now connect your other external screen and run xrandr again:

$ xrandr
Screen 0: minimum 320 x 200, current 2048 x 768, maximum 2048 x 768
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.1     70.1     60.0*    59.9
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        75.0     72.8     66.7     60.0
   720x400        70.1
DVI-0 connected 1024x768+1024+0 (normal left inverted right x axis y axis) 310mm x 230mm
   1024x768_85.00   85.0*+
   1024x768       85.0 +   84.9     74.9     75.1     70.1     60.0     43.5
   832x624        74.6
   800x600        84.9     72.2     75.0     60.3     56.2
   640x480        84.6     75.0     72.8     66.7     60.0
   720x400        87.8     70.1
S-video disconnected (normal left inverted right x axis y axis)

Here you see that a DVI screen is connected as well, and it supports resolutions from 720x400 to 1024x768 at given refresh rates.

Configuration scenarios

Basic syntax

xrandr --output <output> --rate <rate> --mode <mode> --left-of|--right-of|--above|--below|--same-as <output>

Where:

Change resolution of primary screen
xrandr --output VGA --mode 1024x768
Clone

As many external screens / video projectors do not run on 1280x800 but on e.g. 1024x768, choose this as an example:

xrandr --output VGA --mode 1024x768 --output LVDS --mode 1024x768

To turn off secondary screen and get back normal resolution on primary screen just do a:

xrandr --output VGA --off --output LVDS --mode 1280x800
Multiple display desktop

As intel gma has a limitation of 2048x2048 for the virtual screen, the cannot put both screens next to each other in high resolution, both at 1024x768 work well:

xrandr --output LVDS --mode 1024x768 --output VGA --mode 1024x768 --left-of LVDS

To disable multi screen just disable secondary screen and change resolution of primary screen back (if needed):

xrandr --output VGA --off (--output LVDS --mode 1280x800)

Another option is to put the secondary screen above/below the primary:

xrandr --output LVDS --mode 1280x800 --output VGA --mode 1280x1024 --above LVDS

The result is a virtual screen resolution of 1280x1824 which is below 2048x2048 Another solution could be to rotate the screen:

xrandr --verbose --output LVDS --mode 1280x800 --output VGA  --mode 1024x768 --rotate left --left-of LVDS

NOTE: This only works if you can rotate your physical screen as well

Example of a permanently configured PC with dual monitors with xrandr

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver    "kbd"
        Option    "CoreKeyboard"
        Option    "XkbRules"        "xorg"
        Option    "XkbModel"        "pc104"
        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"
EndSection
 
Section "Device"
        Identifier      "ATI Technologies Inc RV370 [Sapphire X550 Silent]"
        Driver    "ati"
        BusID      "PCI:1:0:0"
        Option    "monitor-VGA-0" "ACER AL512"
        Option    "monitor-DVI-0" "VIEWSONIC E70"
EndSection
 
Section "Monitor"
        Identifier      "ACER AL512"
EndSection
 
Section "Monitor"
        Identifier      "VIEWSONIC E70"
        Option    "RightOf" "ACER AL512"
        # 1024x768 @ 85.00 Hz (GTF) hsync: 68.60 kHz; pclk: 94.39 MHz
        Modeline "1024x768_85.00"  94.39  1024 1088 1200 1376  768 769 772 807  -HSync +Vsync
        Option    "PreferredMode" "1024x768_85.00"
EndSection
 
Section "Screen"
        Identifier      "Default Screen"
        Device    "ATI Technologies Inc RV370 [Sapphire X550 Silent]"
        Monitor  "ACER AL512"
        DefaultDepth    24
        SubSection "Display"
                Virtual  2048 768
        EndSubSection
EndSection
 
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen    "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
EndSection

Note

Appendix A
Intel
Output names:
* LVDS: internal laptop panel
* TMDS-1: external DVI port
* VGA: external VGA port
* TV: external TV output
ATI
Output names:
* LVDS: internal laptop panel
* DVI-0: first external DVI port
* DVI-1: second external DVI port (if present)
* VGA-0: first external VGA port
* VGA-1: second external VGA port (if present)
* S-video
Nvidia
nv driver supports RandR1.2 on G80 boards
Output names:
* LVDS: internal laptop panel
* DVI0: first external DVI port
* DVI1: second external DVI port (if present)
Appendix B
xorg.conf the xorg 7.3 way:

Note: A serial mouse won't work with this configuration! Backup your xorg.conf before making changes!

Section "ServerLayout"
        Identifier      "XFree86 Configured"
        Screen          0       "Screen0"       0       0
        InputDevice     "Touchpad"
EndSection

Section "Files"
        FontPath        "/usr/share/fonts/X11/misc"
        FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/100dpi"
        FontPath        "/usr/share/fonts/X11/75dpi"
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load            "ddc"           # ddc probing of monitor
        Load            "dbe"
        Load            "dri"
        Load            "extmod"
        Load            "glx"
        Load            "bitmap"        # bitmap-fonts
        Load            "freetype"
        Load            "record"
EndSection

Section "InputDevice"
        Identifier      "Keyboard0"
        Driver          "kbd"
        Option          "XkbRules"              "xorg"
        Option          "XkbModel"              "pc105"
        Option          "XkbLayout"             "de"
        Option          "XkbVariant"            "nodeadkeys"
        Option          "XkbOptions"            "lv3:rwin_switch"
EndSection

Section "InputDevice"
        Identifier      "Touchpad"
        Driver          "synaptics"
        Option  "LeftEdge"      "100"
        Option  "RightEdge"     "1120"
        Option  "TopEdge"       "50"
        Option  "BottomEdge"    "310"
        Option  "FingerLow"     "20"
        Option  "FingerHigh"    "30"
        Option  "MaxTapTime"    "150"
        Option  "MaxTapMove"    "220"
        Option  "MaxDoubleTapTime"      "180"
        Option  "VertScrollDelta"       "20"
        Option  "HorizScrollDelta"      "50"
        Option  "MinSpeed"      "0.94"
        Option  "MaxSpeed"      "1"
        Option  "AccelFactor"   "0.0015"
        Option  "SHMConfig"     "on"
#switch two/three-finger-tap:
        Option "TapButton2" "3"
        Option "TapButton3" "2"
#scroll with two fingers:
        Option "VertTwoFingerScroll"  "1"
        Option "HorizTwoFingerScroll" "0"
EndSection

#This section is most important for xrandr, remove everything except the following:
Section "Monitor"
        Identifier      "Monitor0"
        Option  "DPMS"  "true"
EndSection

Section "Device"
        Identifier      "Card0"
        Driver          "intel"
          #This is just optional, "XAA" is probably more stable for the majority of users
        Option          "AccelMethod" "EXA"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Device          "Card0"
        Monitor         "Monitor0"
        DefaultColorDepth 24
        SubSection "Display"
                Depth   24
                # Here you can set virtual screen size:
 		Virtual 2048 2048
        EndSubSection
EndSection
Links

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

http://bgoglin.livejournal.com/9846.html

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420419

http://www.thinkwiki.org/wiki/Xorg_RandR_1.2

Dual Monitors (using binaries)

Перед любыми изменениями файла xorg.conf создавайте резервную копию рабочей версии!

nvidia

Для проприетарного драйвера nvidia возможно использовать стандартную программу xorg конфигурации nvidia ( http://www.sorgonet.com/linux/nv-online/) и все установки могут производиться в ней. Также необходимо обратить внимание: должно выбираться максимальное разрешение более слабого монитора и соответственно оба монитора должны быть установлены на то же самое разрешение.

Свободный (xorg) драйвер ATI - метод 1

В форуме с тематикой http://sidux.com/index.php?name=PNphpBB2&file=viewtopic&p=19794#19794 имеются некоторые примеры работы xorg.confs со свободным драйвером radeon.

ВАЖНО: Чтобы получить сведения конфигурации второго монитора, первый монитор должен быть отключен с последующей перезагрузкой с Live-CD, чтобы позволять сгенерировать xorg.conf. Необходимо скопировать и сохранить полученный файл конфигурации. Для первого монитора повторите описанные действия.

Свободный (xorg) драйвер ATI - метод 2

Произведя настройки для первого монитора используем их же для конфигурации второго. Конечно второй монитор должен иметь характеристики позволяющие использовать эти настройки.

в разделе:

Section "Device"
	Identifier "devname"
	Driver "ati"
   ...
EndSection

Здесь имеются обширные сведения о возможных конфигурациях: http://ftp.x.org/pub/X11R6.9.0/doc/html/radeon.4.html

ПРИМЕЧАНИЕ: Упомянутая ссылка использует драйвер Radeon, но установки были протестированы также на драйверах ATI, и они функционируют.

Проприетарный драйвер ATI

Сначала инсталлируется драйвер (fglrx).

get-sidux-gfx
или
sgfxi / smxi

Обратите внимание, пожалуйста, на раздел в руководстве sidux.

В связи с этим останавливаем сервер X.

ctrl+alt+F1
root
[Ввод данных пароля] # не выводится
init 3

Выполняем:

aticonfig --dtop=horizontal
init 5 && exit

Если расположение монитора изменено:

aticonfig --dtop=horizontal,reverse

Для информации можно читать руководство, которое очень подробно и предоставляет большое количество примеров по использованию тех или иных опций:

aticonfig --help

Внимание: оба экрана должны иметьодинаковое разрешение. Как правило, устанавливают наивысшее разрешение слабого монитора. Читайте, пожалуйста, спецификации мониторов в руководствах, если максимальное разрешение неизвестно.

В форуме с тематикой http://sidux.com/index.php?name=PNphpBB2&file=viewtopic&p=20231#20231 можно найти дополнительную информацию.

Для возврата от конфигурации двойного монитора к конфигурации с отдельным монитором, вводиться следующая команда:

aticonfig --initial --input=/etc/X11/xorg.conf
Page last revised 29/06/2008 1400