22 maja 2008

Dual desktop + Ubuntu + praca na dwóch monitorach

Po kilku dniach walki z dodatkiem xorg.conf oraz dodatkiem xinerama nie poddaję się :-)
Przeglądam i rozpoznaję nadal ważne wątki:
http://www.systhread.net/texts/200506extendedX.php
http://lists.freedesktop.org/archives/xorg/2004-February/000015.html
http://digital-domain.net/lug/multi-monitor/
http://ubuntuforums.org/showthread.php?t=238518
http://digital-domain.net/lug/multi-monitor/xorg.conf
http://gentoo-wiki.com/HOWTO_Dual_Monitors
http://lists.freebsd.org/pipermail/freebsd-questions/2005-May/087929.html
http://p4a.dk/conf/xorg.conf
ftp://download.nvidia.com/XFree86/Linux-x86/1.0-8178/README/appendix-g.html
http://mkaz.com/ref/gentoo_dual.html
http://wiki.osuosl.org/display/howto/Set+Up+Dual+Monitors+-+xorg.conf


Pomyślałem sobie, że jednak wciąż nie dorównuje toto sterownikom w konkurencyjnych OSach ... i już zamierzałem wyłączyć kompa ... kiedy ujrzałem magiczne
xrandr / grandr
http://packages.ubuntu.com/gutsy/xrandr
http://www.newlinuxuser.com/a-better-xrandr-tool-for-the-next-ubuntu-release/
http://ubuntuforums.org/tags.php?tag=xrandr
http://douglasfils.blogspot.com/2008/04/xrandr-with-ubuntu-804-and-external.html


Zachciało mi się pracy na kilku monitorach i udało się coś wycedzić:
Wystarczyło do xorg.conf dopisać:
Virtual 3000 2000
w poniższej sekcji:
Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Monitor "PLE1900WS"
DefaultDepth 24
SubSection "Display"
Modes "1440x900" "1400x1050" "1280x1024" "1280x960" "1280x800" "1152x864" "1024x768" "800x600" "640x480"
Virtual 3000 2000
EndSubSection
EndSection

Następnie z konsoli na zwykłym koncie:
xrandr -q
Efekt działania:
Screen 0: minimum 320 x 200, current 2720 x 900, maximum 3000 x 2000
VGA connected 1440x900+1280+0 (normal left inverted right) 410mm x 257mm
1440x900 59.9*+ 75.0 59.9
1280x1024 75.0 59.9
1280x960 59.9
1152x864 75.0 74.8
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
LVDS connected 1280x800+0+0 (normal left inverted right) 0mm x 0mm
1280x800 60.0*+ 60.0
1280x768 60.0
1152x768 54.8
1024x768 85.0 75.0 70.1 60.0
832x624 74.6
800x600 85.1 72.2 75.0 60.3 56.2
640x480 85.0 72.8 75.0 59.9
720x400 85.0
640x400 85.1
640x350 85.1
TV disconnected (normal left inverted right)

Generowanie optymalnego trybu
modline dla monitora:
$ gtf 1440 900 60 -v
1: [H PIXELS RND] : 1440.000000
2: [V LINES RND] : 900.000000
3: [V FIELD RATE RQD] : 60.000000
4: [TOP MARGIN (LINES)] : 0.000000
5: [BOT MARGIN (LINES)] : 0.000000
6: [INTERLACE] : 0.000000
7: [H PERIOD EST] : 17.887533
8: [V SYNC+BP] : 31.000000
9: [V BACK PORCH] : 28.000000
10: [TOTAL V LINES] : 932.000000
11: [V FIELD RATE EST] : 59.983753
12: [H PERIOD] : 17.882690
13: [V FIELD RATE] : 59.999996
14: [V FRAME RATE] : 59.999996
15: [LEFT MARGIN (PIXELS)] : 0.000000
16: [RIGHT MARGIN (PIXELS)] : 0.000000
17: [TOTAL ACTIVE PIXELS] : 1440.000000
18: [IDEAL DUTY CYCLE] : 24.635193
19: [H BLANK (PIXELS)] : 464.000000
20: [TOTAL PIXELS] : 1904.000000
21: [PIXEL FREQ] : 106.471672
22: [H FREQ] : 55.919998
17: [H SYNC (PIXELS)] : 152.000000
18: [H FRONT PORCH (PIXELS)] : 80.000000
36: [V ODD FRONT PORCH(LINES)] : 1.000000


# 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
Modeline "1440x900_60.00" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync


Po czym wydałem kilka nieskomplikowanych poleceń i mogę pracowac na dwa monitorki ;)

Ustawianie dwóch monitorów jedną linijką:

$ xrandr --output LVDS --mode 1280x800 --output VGA --mode 1440x900_60 --right-of LVDS

Dla lubiących klikać jest też grandr, który w moich testach nie wypadł zbyt wspaniale ... cóż kiedyś polubiłem terminale ;)

Oto moja konfiguracja xorg.conf dla Ubuntu 7.10, dla sprzętu:
laptop: TOSHIBA A-120
monitor: ProLite E1900WS

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "pl"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/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 "HorizEdgeScroll" "0"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Driver "intel"
BusID "PCI:0:2:0"
EndSection

Section "Monitor"
Identifier "PLE1900WS"
Option "DPMS"
HorizSync 30-83
### test
# HorizSync 30-85
VertRefresh 50-85

# 1440x960 @ 60.00 Hz (GTF) hsync: 59.64 kHz; pclk: 114.51 MHz
Modeline "1440x960_60" 114.51 1440 1528 1680 1920 960 961 964 994 -HSync +Vsync

# 1440x960 @ 85.00 Hz (GTF) hsync: 85.68 kHz; pclk: 167.25 MHz
Modeline "1440x960_85" 167.25 1440 1536 1696 1952 960 961 964 1008 -HSync +Vsync

# 1440x1024 @ 60.00 Hz (GTF) hsync: 63.60 kHz; pclk: 122.11 MHz
Modeline "1440x1024_60" 122.11 1440 1528 1680 1920 1024 1025 1028 1060 -HSync +Vsync

# 1440x1024 @ 85.00 Hz (GTF) hsync: 91.38 kHz; pclk: 179.83 MHz
Modeline "1440x1024_85" 179.83 1440 1544 1704 1968 1024 1025 1028 1075 -HSync +Vsync

# 1440x900 @ 85.00 Hz (GTF) hsync: 80.33 kHz; pclk: 156.79 MHz
Modeline "1440x900_85" 156.79 1440 1536 1696 1952 900 901 904 945 -HSync +Vsync

# 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
Modeline "1440x900_60" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Monitor "PLE1900WS"
DefaultDepth 24
SubSection "Display"
Modes "1440x900" "1440x1024" "1400x1050" "1280x1024" "1280x960" "1280x800" "1152x864" "1024x768" "800x600" "640x480"
Virtual 3000 2000
EndSubSection
EndSection

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

# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection


Dla chcących przetestować powyższą konfigurację z Compizem polecam nastepujący wpis

Brak komentarzy: