Dual Screen with radeon

Материал из ALT Linux Wiki

(Различия между версиями)
Перейти к: навигация, поиск
м (xrog.conf: typo fix)
(Содержимое страницы заменено на «Убрано на http://freesource.info/wiki/DualScreenWithRadeon»)
 
Строка 1: Строка 1:
-
== Xrandr ==
+
Убрано на http://freesource.info/wiki/DualScreenWithRadeon
-
a-la XINERAMA: один Screen, экран имеет ширину в два монитора
+
-
 
+
-
=== xorg.conf ===
+
-
Section "ServerLayout"
+
-
  Identifier    "radeon"
+
-
  Screen        ''"radeon|0"''
+
-
  ...
+
-
EndSection
+
-
+
-
# остался от fglrx.
+
-
Section "Monitor"
+
-
  Identifier  ''"aticonfig-Monitor[0]"''
+
-
  Option     "VendorName" "ATI Proprietary Driver"
+
-
  Option     "ModelName" "Generic Autodetecting Monitor"
+
-
  Option     "DPMS" "true"
+
-
  DisplaySize 375 302
+
-
EndSection
+
-
+
-
Section "Device"
+
-
  Identifier  ''"radeon|0"''
+
-
  Driver      "radeon"
+
-
EndSection
+
-
+
-
Section "Screen"
+
-
  Identifier ''"radeon|0"''
+
-
  Device    ''"radeon|0"''
+
-
  Monitor    ''"aticonfig-Monitor[0]"''
+
-
  DefaultDepth    24
+
-
  Option "Backingstore"  "true"
+
-
  SubSection "Display"
+
-
  Depth      24
+
-
  Modes      "1280x1024"
+
-
  '''Virtual    2560 1024'''
+
-
  EndSubSection
+
-
EndSection
+
-
 
+
-
Обращаю внимание на выделенный жирным ''Virtual''. не будет его, <tt>xrandr</tt> может начать ругаться (в моем случае)
+
-
xrandr: screen cannot be larger than 1280x1280 (desired size 2560x1024)
+
-
как я понял, причина, что <tt>xrandr</tt> работает в пределах ''Virtual'' и за них не вылезает.
+
-
 
+
-
в принципе это вся конфигурация <tt>xorg</tt>. остальное делается динамически.
+
-
 
+
-
=== xrandr invocation ===
+
-
==== получение списка выводов ====
+
-
перво-наперво смотрим, какие выводы мы имеем:
+
-
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum '''1280 x 1280'''
+
-
<font color=red>DVI-0</font> connected 1280x1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
+
-
  1280x1024      59.9*+  60.0 
+
-
  1280x960      60.0 
+
-
  1024x768      60.0 
+
-
  800x600        60.3 
+
-
  640x480        59.9 
+
-
<font color=red>DVI-1</font> connected 1280x1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
+
-
  1280x1024      59.9*+  60.0 
+
-
  1280x960      60.0 
+
-
  1024x768      60.0 
+
-
  800x600        60.3 
+
-
  640x480        59.9 
+
-
 
+
-
<font color=red>DVI-0</font> и <font color=red>DVI-1</font> - выводы для <tt>xrandr</tt> ( подставляется в <tt>--output</tt>).
+
-
''обращаю внимание на выделенное 1280x1280: это тот самый region, на котором рабоатает xrandr. меняется через Virtual, как сказано выше.''
+
-
 
+
-
==== запуск dual-head режима ====
+
-
xrandr --output DVI-0 --left-of DVI-1
+
-
в большинстве случаев после этой команды ничего делать тне нужно.
+
-
 
+
-
==== привязка выхода к монтору ====
+
-
так случилось, что после запуска <tt>xrandr</tt> с <tt>--left-of</tt>, второй монитор начал показывать один в один то, что показывает первый. но по taskbar'у fluxbox'а заметно, что двойной режим-то включен. исправило ситуацию следующие команды:
+
-
xrandr --output DVI-0 --crtc 0 --auto
+
-
xrandr --output DVI-1 --crtc 1 --auto
+
-
здесь устанавливается привязка монтора (crtc) и вывода (output). <tt>--auto</tt> указан для того, чтобы после этих команда мониторы не выключались.
+
-
 
+
-
==== уменщились/увеличились шрифты ====
+
-
второй проблемой, с которой я столкнулся, были шрифты. после запуска <tt>xrandr</tt> с <tt>--left-of</tt> dpi шрифтов изменились, как и размеры монитора в выводе <tt>xdpyinfo</tt>:
+
-
...
+
-
screen #0:
+
-
  print screen:    no
+
-
  '''dimensions:    1280x1024 pixels (360x270 millimeters)
+
-
  resolution:    96x96 dots per inch
+
-
  depths (7):    24, 1, 4, 8, 15, 16, 32
+
-
  root window id:    0xa1
+
-
  depth of root window:    24 planes
+
-
...
+
-
мне же нужно было:
+
-
screen #0:
+
-
  ...
+
-
  print screen:    no
+
-
  '''dimensions:    1280x1024 pixels (375x302 millimeters)'''
+
-
  resolution:    87x86 dots per inch
+
-
  depths (7):    24, 1, 4, 8, 15, 16, 32
+
-
  root window id:    0xa1
+
-
  depth of root window:    24 planes
+
-
  ...
+
-
для чего я и указывал ''DisplaySize 375 302'' в xorg.conf, но после <tt>xrandr</tt> ''DisplaySIze'' к сожалению сбросился.
+
-
установка вручную происходит следующим образом:
+
-
xrandr --output DVI-0 --fbmm 375x302
+
-
xrandr --output DVI-1 --fbmm 375x302
+
-
после перезапуска программ (<tt>fluxbox</tt> restart, <tt>opera</tt>, etc) шрифты вернулись на место.
+
-
 
+
-
==== сброс dual-head ====
+
-
чисто случайно испробовал я следующую команду:
+
-
xrandr --output DVI-1 --same-as DVI-0
+
-
после неё X сервер вернулся к clone режиму.
+
-
 
+
-
=== Помещение в автозапуск ===
+
-
в <tt>/etc/X11/xinit</tt> есть файл <tt>xrandrrc</tt>. он считывает <tt>/etc/sysconfig/xrandr</tt> и <tt>$HOME/.Xrandr</tt> записи вида:
+
-
:[0-9]*  <xrandr options>
+
-
поэтому для атвтоматического запуска <tt>xrandr</tt> достаточно поместить в один из этих файлов команды. мне хватило следующих:
+
-
:0 --output DVI-0 --fbmm 375x302
+
-
:0 --output DVI-1 --fbmm 375x302
+
-
:0 --output DVI-0 --crtc 0 --auto
+
-
:0 --output DVI-1 --crtc 1 --auto
+
-
:0 --output DVI-0 --left-of DVI-1
+
-
 
+
-
== Dual Screen режим ==
+
-
как в <tt>XINERAMA</tt>, так и в <tt>xrandr</tt> мне не понравилось, что после их запуска программы экраном считают не один монитор, а оба сразу. например программа установки обев растягивала картинку на оба монитора.
+
-
с другой <tt>xrandr</tt> для этого и предназначен, потому нужен был иной подход: радзделение мониторов по разным Screen'ам.
+
-
я нашел только, как это сделать статически:
+
-
Section "ServerLayout"
+
-
  Identifier    "radeon"
+
-
  <font color=red>Screen        "radeon|0"</font>
+
-
  <font color=red>Screen        "radeon|1" RightOf "radeon|0"</font>
+
-
  ...
+
-
EndSection
+
-
+
-
Section "Monitor"
+
-
  Identifier  "aticonfig-Monitor[0]"
+
-
  Option     "VendorName" "ATI Proprietary Driver"
+
-
  Option     "ModelName" "Generic Autodetecting Monitor"
+
-
  Option     "DPMS" "true"
+
-
  DisplaySize 375 302
+
-
EndSection
+
-
+
-
Section "Monitor"
+
-
  Identifier  "aticonfig-Monitor[1]"
+
-
  Option     "VendorName" "ATI Proprietary Driver"
+
-
  Option     "ModelName" "Generic Autodetecting Monitor"
+
-
  Option     "DPMS" "true"
+
-
  DisplaySize 375 302
+
-
EndSection
+
-
+
-
Section "Device"
+
-
  Identifier  "radeon|0"
+
-
  Driver      "radeon"
+
-
  Option      "DRI"  "off"
+
-
  <font color=red>Screen      0</font>
+
-
EndSection
+
-
+
-
Section "Device"
+
-
  Identifier  "radeon|1"
+
-
  Driver      "radeon"
+
-
  Option      "DRI"  "off"
+
-
  <font color=red>Screen      1</font>
+
-
EndSection
+
-
+
-
Section "Screen"
+
-
  Identifier "radeon|0"
+
-
  Device    "radeon|0"
+
-
  Monitor    "aticonfig-Monitor[0]"
+
-
  DefaultDepth    24
+
-
  Option "Backingstore"  "true"
+
-
  SubSection "Display"
+
-
  Depth      24
+
-
  Modes      "1280x1024"
+
-
  EndSubSection
+
-
EndSection
+
-
+
-
Section "Screen"
+
-
  Identifier "radeon|1"
+
-
  Device    "radeon|1"
+
-
  Monitor    "aticonfig-Monitor[1]"
+
-
  DefaultDepth    24
+
-
  Option "Backingstore"  "true"
+
-
  SubSection "Display"
+
-
  Depth      24
+
-
  Modes      "1280x1024"
+
-
  EndSubSection
+
-
EndSection
+
-
красным выделены критичные строчки.
+
-
в <tt>ServerLayout</tt> строка
+
-
Screen        "radeon|0"
+
-
важна! в противном случае X сервер матерится, что не может найти подходящий screen для работы.
+

Текущая версия на 09:20, 8 ноября 2008

Убрано на http://freesource.info/wiki/DualScreenWithRadeon

 
Личные инструменты