výstup_na_dva_monitory

Výstup na dva monitory

Pakliže potřebujete vytvořit výstup na více zobrazovacích zařízení např, dva monitory, tak ve většině případů se jedná o editaci konfiguračního souboru /etc/X11/xorg.conf.

Od Ubuntu 7.10 by mělo jít více monitorů lehce nastavit přes nástroj Systém → Správa → Obrazovky a grafické karty, případně příkazem displayconfig-gtk.

Grafické karty ATI

Pro rozchozeni MergedFB „dualhead“ konfigurace na ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] staci upravit konfiguraci Xorg takto:

ALT+F2
gksudo gedit /etc/X11/xorg.conf
Section "Files"
FontPath        "/usr/share/X11/fonts/misc"
FontPath        "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath        "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath        "/usr/share/X11/fonts/Type1"
FontPath        "/usr/share/X11/fonts/100dpi"
FontPath        "/usr/share/X11/fonts/75dpi"
FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
Load    "bitmap"
Load    "dbe"
Load    "ddc"
Load    "extmod"
Load    "freetype"
Load    "glx"
Load    "int10"
Load    "record"
Load    "type1"
Load    "vbe"
EndSection

Section "InputDevice"
Identifier      "Generic Keyboard"
Driver          "kbd"
Option          "CoreKeyboard"
Option          "XkbRules"      "xorg"
Option          "XkbModel"      "hpnc6000"
Option          "XkbLayout"     "us"
EndSection

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

Section "InputDevice"
Identifier      "Synaptics Touchpad"
Driver          "synaptics"
Option          "SendCoreEvents"        "true"
Option          "Device"                "/dev/psaux"
Option          "Protocol"              "auto-dev"
Option          "HorizScrollDelta"      "0"
EndSection

Section "Device"
Identifier      "ATI Mobility Radeon 9600"
Driver          "radeon"
BusID           "PCI:1:0:0"
Option          "DynamicClocks" "true"
Option          "MergedFB"      "true"
Option          "CRT2Position"  "RightOf"
Option          "MetaModes"     "1400x1050-1280x1024 1400x1050"
Option          "MergedNonRectangular"  "true"
EndSection

Section "Monitor"
Identifier      "Built-in LCD"
Option          "DPMS"
EndSection

Section "Screen"
Identifier      "Default Screen"
Device          "ATI Mobility Radeon 9600"
Monitor         "Built-in LCD"
DefaultDepth    24
SubSection "Display"
Depth           24
Modes           "1400x1050"
EndSubSection
EndSection

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

Section "DRI"
Mode    0666
EndSection

Prepinani mezi singlehead a dualhead konfiguraci se provadi takhle:

xrandr
xrandr -s 1400x1050
xrandr -s 2680x1050

Upozorneni: v Dapper Drake (aktualizovanem k Jun 15, 2006) je zapotrebi, aby pri startu X byl pripojeny externi monitor, jinak nepujde prepnout do dualhead rezimu. Konfigurace zvlada hibernaci pomoci swsusp, jen je potreba prepnout do konzole a zpet do grafiky (ctrl+alt+f1, alt+f7).

Grafické karty Intel

Pokud používáte kartu intel s ovladačem i810 podporujícím i810, i810-DC100, i810e, i815, 830M, 845G, 852GM, 855GM, 865G, 915G and 915GM chipsety, tak můžete použít následující nastavení /etc/X11/xorg.conf použité pro notebook s externím monitorem. (další nastavení pro tento driver naleznete např. zde: http://www.die.net/doc/linux/man/man4/i810.4.html)

ALT+F2
gksudo gedit /etc/X11/xorg.conf
Section "Files"
        FontPath        "/usr/share/X11/fonts/misc"
        FontPath        "/usr/share/X11/fonts/cyrillic"
        FontPath        "/usr/share/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/share/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/share/X11/fonts/Type1"
        FontPath        "/usr/share/X11/fonts/100dpi"
        FontPath        "/usr/share/X11/fonts/75dpi"
        # path to defoma fonts
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load    "i2c"
        Load    "bitmap"
        Load    "ddc"
        Load    "dri"
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "type1"
        Load    "vbe"
EndSection

#Zde zacinaji sekce definic vstupnich zarizeni
Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "kbd"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xorg"
        Option          "XkbModel"      "pc104"
        Option          "XkbLayout"     "cz(qwerty),us"
        Option          "XkbOptions"    "grp:switch,grp:shifts_toggle"
EndSection

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

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "HorizScrollDelta"      "0"
EndSection
#Zde konci sekce definic vstupnich zarizeni

#Zde zacinaji sekce definic graficke karty
Section "Device"
       Identifier       "Device Interni"
       Driver           "i810"
       BusID            "PCI:0:2:0"
       Option           "MonitorLayout" "NONE,LFP"
       #VideoRam        131072 #pro 128MB Video Ram jen nove karty
       VideoRam 65536 #pro 64MB Video Ram
EndSection

Section "Device"
       Identifier       "Device Externi"
       Driver           "i810"
       BusID            "PCI:0:2:0"
       Option           "MonitorLayout" "NONE,CRT"
       #VideoRam        131072 #pro 128MB Video Ram jen nove karty
       VideoRam 65536 #pro 64MB Video Ram
EndSection

Section "Device"
       Identifier       "Device Interni Dual"
       Driver           "i810"
       BusID            "PCI:0:2:0"
       Option           "MonitorLayout" "CRT,LFP"
       Screen           0
EndSection

Section "Device"
       Identifier       "Device Externi Dual"
       Driver           "i810"
       BusID            "PCI:0:2:0"
       Screen           1
EndSection
#Zde konci sekce definic graficke karty

#Zde zacinaji sekce definic monitoru
Section "Monitor"
        Identifier      "Interni Monitor"
        Option          "DPMS"
EndSection

Section "Monitor"
        Identifier      "Externi Monitor"
        Option          "DPMS"
        HorizSync       30.0 - 81.0
        VertRefresh     56.0 - 75.0
EndSection
#Zde konci sekce definic monitoru

#Zde zacinaji sekce definic nastaveni rozliseni a barev s vyuzitim sekci predchozich
Section "Screen"
       Identifier      "Screen Externi"
       Device          "Device Externi"
       Monitor         "Externi Monitor"
       DefaultDepth    24
       SubSection "Display"
               Depth   16
               Modes   "1280x1024" "1024x768"
       EndSubSection
       SubSection "Display"
               Depth   24
               Modes   "1280x1024" "1024x768"
       EndSubSection
EndSection

Section "Screen"
       Identifier      "Screen Interni"
       Device          "Device Interni"
       Monitor         "Interni Monitor"
       DefaultDepth    24
       SubSection "Display"
               Depth   16
               Modes   "1024x768"
       EndSubSection
       SubSection "Display"
               Depth   24
               Modes   "1024x768"
       EndSubSection
EndSection

Section "Screen"
       Identifier      "Screen Externi Dual"
       Device          "Device Externi Dual"
       Monitor         "Externi Monitor"
       DefaultDepth    24
       SubSection "Display"
               Depth   16
               Modes   "1280x1024" "1024x768"
       EndSubSection
       SubSection "Display"
               Depth   24
               Modes   "1280x1024" "1024x768"
       EndSubSection
EndSection

Section "Screen"
       Identifier      "Screen Interni Dual"
       Device          "Device Interni Dual"
       Monitor         "Interni Monitor"
       DefaultDepth    24
       SubSection "Display"
               Depth   16
               Modes   "1024x768"
       EndSubSection
       SubSection "Display"
               Depth   24
               Modes   "1024x768"
       EndSubSection
EndSection
#Zde konci sekce definic nastaveni rozliseni a barev s vyuzitim sekci predchozich

#Zde zacinaji sekce konecnych prostredi s vyuzitim vsech predchozich definic
Section "ServerLayout"
        Identifier      "Dual"
        Screen          0 "Screen Interni Dual"
        Screen          1 "Screen Externi Dual" LeftOf "Screen Interni Dual"
#       Screen          1 "Screen Externi Dual" RightOf "Screen Interni Dual"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        InputDevice     "Synaptics Touchpad"
        Option          "Xinerama" "true"
EndSection

Section "ServerLayout"
        Identifier      "Externi"
        Screen          "Screen Externi"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        InputDevice     "Synaptics Touchpad"
EndSection

Section "ServerLayout"
        Identifier      "Interni"
        Screen          "Screen Interni"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        InputDevice     "Synaptics Touchpad"
EndSection
#Zde konci sekce konecnych prostredi s vyuzitim vsech predchozich definic

Section "DRI"
        Mode    0666
EndSection

# Zde zacina sekce pro specialni volby pro cele xka,
# v nasem pripade urcujeme s jakym nastavenim ze vsech
# definovanych maji nakonec xka nabehnout
Section "ServerFlags"
        #Option         "DefaultServerLayout" "Interni"
        Option          "DefaultServerLayout" "Externi"
        #Option         "DefaultServerLayout" "Dual"
EndSection
# Zde konci sekce pro specialni volby pro cele xka

Grafické karty NVIDIA

Využijte standardního nástroje nvidia-settings pro nastavování parametrů grafické karty a obrazu. V Terminálu spusťte příkaz:

nvidia-settings

Pokud se má nastavení uložit, je třeba použít tento příkaz

gksudo nvidia-settings

V okně lze nastavit důležité parametry pro zobrazení jak plochy tak videa. Okno generuje dva důležité soubory a sice Xorg.conf a .nvidia-settings-rc Lze v nich nastavit barvy obrazu videa, hodnotu gamma pro monitor, rozlišení přidaného monitoru. Pro TV přijímač je důležité to, že je obraz na výstupu pouze v normě NTSC tak že televizor, který nezvládá zobrazení v této normě, bude mít černobílý a případně ještě svisle nestabilní obraz.

Obnova souboru Xorg.conf při ztrátě správného rozlišení. Po startu do záchranného módu (recovery) zadejte:

sudo nvidia-xconfig

a restartujte.

Pomocí utilit 'xrandr' a 'grandr' lze vnutit zobrazení na potřebný monitor. Užitečné zejména při připojení většího externího panelu k notebooku nebo přepnutí na projekci při předvádění. Jednoduchý skript toto zajistí jak při startu tak i později. Ukázku kódu můžete zkopírovat a uložit třeba na plochu a kdykoli použít.

echo "Detekuji monitory"
/usr/bin/xrandr
echo "monitor v notebooku"
/usr/bin/xrandr --output LVDS --auto
echo "externí monitor"
/usr/bin/xrandr --output VGA --off

kde lze položky na konci řádků upravit podle potřeby - auto - on- off.

V nastavení vlastností obrazu si nastavte věci podle potřeby. Pár obrázků a lehký popis je možné najít i zde

  • Poslední úprava: 2019/02/25 18:21
  • autor: 127.0.0.1