Документация по ОС FreeBSD Четверг, 25.04.2024, 12:07
Приветствую Вас Гость | RSS
Меню сайта

Категории каталога
Мои статьи [0]
Установка и настройка [281]
X Window [25]
Man pages [30]
Ports & Packages [26]
cvs [18]
Multimedia [20]
Нововсти в мире Unix [0]
RFC [4]
RFC (Request for Comments, Запрос на комментарии) - серия документов, публикуемая сообществом исследователей и разработчиков, руководствующихся практическими интересами, в которой описывается набор протоколов и обобщается опыт функционирования Интернет.
Безопасность [52]
Работа с железом [58]
Книги по FreeBSD [17]
Сеть [505]
Программирование [40]
FireWall [58]
Темы экзамена BSDA [14]
Официальные темы экзамена BSDA, включая подробноые описания и советы по обучению.

Главная » Статьи » X Window

FreeBSD: Конфиг X11 для использования двух мониторов [2011]
Xorg и два монитора
Две видеокарты, два монитора настройка xorg.conf
 
Многие из нас используют или хотят использовать для работы два монитора, ибо это удобно.
 
Решил выложить конфиги для иксов, т.к. хочу сохранить их для истории и с вами поделиться. Да и потом будет где подсмотреть, а не заново разбираться 

А то недавно махнул видюху и снова столкнулся с проблемой как заставить работать два монитора в своих иксах, да так что бы они не были дубликатами друг друга, а каждый был сам по себе.
 
Итак OS FreeBSD 8.2-STABLE, оболочка enlightenment-0.16.999.52995 и конфигурации X11 (xorg.conf) для работы с двумя мониторами.
 
Конфигов будет 3, под три разные карты, все они реализуют работу двух мониторов и все они рабочие, т.к. взяты копипастом с рабочих машин:
 
1. ATI Radeon: Radeon X850XT (PCIE) – двухголовая видюха:
 
Ставим порт с драйверами:

Port:   xf86-video-radeonhd-1.3.0_4
Path:   /usr/ports/x11-drivers/xf86-video-radeonhd
Info:   X.Org ati RadeonHD display driver 

Монитор «Benq» – основной
 Монитор «Samsung» – стоит справа от основного и является отдельным рабочим столом
 
/etc/X11/xorg.conf:

Section "ServerLayout"
 Identifier "Layout0"
 Screen 0 "Screen0" 0 0
 Screen 1 "Screen1" LeftOf "Screen0"
 InputDevice "Keyboard0" "CoreKeyboard"
 "AllowEmptyInput" "off"
 InputDevice "Mouse0" "CorePointer"
 "AllowEmptyInput" "off"
 Option "Clone" "false"
 Option "Xinerama" "true"
EndSection

Section "ServerFlags"
  Option "AutoAddDevices" "False"
EndSection

Section "Files"
    #RgbPath         "/usr/local/share/X11/rgb"
    ModulePath      "/usr/local/lib/xorg/modules"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/OTF"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/webfonts/"
EndSection

Section "Module"
    Load           "extmod"
    Load           "record"
    Load           "dbe"
    Load           "glx"
    Load           "xtrap"
    Load           "freetype"
    Load           "type1"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbModel" "pc101"
    Option         "XkbLayout" "us,ru"
    Option         "XkbVariant" ",winkeys"
    Option         "XKbOptions" "grp:ctrl_shift_toggle,grp_led:scroll_lock"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Benq"
        ModelName    "E2200HDA"
        HorizSync    30.0 - 83.0
        VertRefresh  50.0 - 76.0
        Option "PreferredMode" "1920x1080"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Samsung"
        ModelName    "SyncMaster 710N"
        HorizSync    30.0 - 81.0
        VertRefresh  56.0 - 75.0
        Option "PreferredMode" "1280x1024"
EndSection

Section "Device"
    Identifier   "Card0"
    Driver      "radeon"
    VendorName  "ATI Technologies Inc"
    BoardName   "R480 [Radeon X850XT (PCIE)] (Primary)"
    BusID       "PCI:4:0:0"
    Screen      0
    Option      "DualHead" "true"
    Option      "monitor-VGA-0" "Monitor0"
    Option      "monitor-DVI-0" "Monitor1"
EndSection

Section "Device"
    Identifier   "Card1"
    Driver      "radeon"
    VendorName  "ATI Technologies Inc"
    BoardName   "R480 [Radeon X850XT (PCIE)] (Secondary)"
    BusID       "PCI:4:0:1"
    Screen      1
    Option      "DualHead" "true"
    Option      "RightOf" "VGA-0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    SubSection     "Display"
        Viewport    0 0
        Depth       1
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       32
        Modes "1920x1080" "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "Card1"
    Monitor    "Monitor1"
    SubSection     "Display"
        Viewport    0 0
        Depth       1
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       32
        Modes "1280x1024" "800x600" "640x480"
        Virtual 3200 3200
    EndSubSection
EndSection 

2. Zotac GT220 ZONE на чипсете NVIDIA
 
Ставим порт с драйверами:

Port:   nvidia-driver-256.53_1
Path:   /usr/ports/x11/nvidia-driver
Info:   NVidia graphics card binary drivers for hardware OpenGL rendering 

Подгружаем:

# kldload nvidia.ko

 
Делаем чтобы подгружалось само после бута, правим /boot/loader.conf и добавляем:

nvidia_load="YES" 

Монитор «Benq» – основной
 Монитор «Samsung» – стоит справа от основного и является отдельным рабочим столом
 
/etc/X11/xorg.conf:
 
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "AllowEmptyInput" "off"
    Option "Clone" "false"
    Option "Xinerama" "false"
EndSection

Section "ServerFlags"
  Option "AutoAddDevices" "False"
EndSection

Section "Files"
    ModulePath      "/usr/X11R6/lib/xorg/modules"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/"
    FontPath        "/usr/X11R6/lib/X11/fonts/bitstream-vera/"
    FontPath        "/usr/local/lib/X11/fonts/OTF"
    FontPath        "/usr/local/lib/X11/fonts/webfonts/"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "glx"
    Load           "extmod"
    Load           "record"
    Load           "dbe"
    Load           "xtrap"
    Load           "freetype"
    Load           "type1"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "XkbModel" "pc101"
    Option         "XkbLayout" "us,ru"
    Option         "XkbVariant" ",winkeys"
    Option         "XKbOptions" "grp:ctrl_shift_toggle,grp_led:scroll_lock"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Benq"
    ModelName    "E2200HDA"
    HorizSync    30.0 - 83.0
    VertRefresh  50.0 - 76.0
    Option "PreferredMode" "1920x1080"
EndSection

Section "Monitor"
    Identifier   "Monitor1"
    VendorName   "Samsung"
    ModelName    "SyncMaster 710N"
    HorizSync    30.0 - 81.0
    VertRefresh  56.0 - 75.0
    Option "PreferredMode" "1280x1024"
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    BusID       "PCI:1:0:0"
    Option      "TwinView" "true"
    Option      "TwinViewOrientation"      "RightOf"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "HWcursor"
    Option         "CursorShadow"
    Option         "UseEdidDpi" "FALSE"
    Option         "DPI" "96 x 96"
    SubSection     "Display"
        Viewport    0 0
        Depth       1
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       32
    EndSubSection
EndSection 
3. G86 [GeForce 8400M GS] rev 161 на чипсете NVIDIA (ноутбук SONY VAIO модель PSG-6S6P)
 
Ставим порт с драйверами:
 Port:   nvidia-driver-256.53_1
Path:   /usr/ports/x11/nvidia-driver
Info:   NVidia graphics card binary drivers for hardware OpenGL rendering 
Подгружаем:
 # kldload nvidia.ko
 
Делаем чтобы подгружалось само после бута, правим /boot/loader.conf и добавляем:
 nvidia_load="YES" 
Монитор «Samsung» – основной
 Ноутбук – стоит слева от основного и является отдельным рабочим столом
 
/etc/X11/xorg.conf:
 Section "ServerLayout"
        Identifier "Layout0"
        Screen 0 "Screen0" 0 0
        InputDevice "Keyboard0" "CoreKeyboard"
        "AllowEmptyInput" "off"
        InputDevice "Mouse0" "CorePointer"
        "AllowEmptyInput" "off"
        Option "Xinerama" "true"
EndSection

Section "ServerFlags"
        Option "AutoAddDevices" "False"
EndSection

Section "Files"
    ModulePath  "/usr/local/lib/xorg/modules"
    FontPath    "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath    "/usr/local/lib/X11/fonts/TTF/"
    FontPath    "/usr/local/lib/X11/fonts/OTF"
    FontPath    "/usr/local/lib/X11/fonts/misc"
    FontPath    "/usr/local/lib/X11/fonts/webfonts/"
    FontPath    "/usr/local/lib/X11/fonts/avifonts/"
    FontPath    "/usr/local/lib/X11/fonts/bitstream-vera/"
EndSection

Section "Module"
    Load           "extmod"
    Load           "record"
    Load           "dbe"
    Load           "glx"
    Load           "freetype"
    Load           "type1"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        # gtf 1680 1050 60
        Identifier   "CRT-0"
        VendorName   "Samsung"
        ModelName    "SyncMaster 2243nw"
        Gamma 0 0 0
        Modeline "1680x1050_60.00"  119.00  1680 1728 1760 1840  1050 1053 1059 1080 +hsync -vsync
EndSection

Section "Monitor"
        #gtf 1280 800 60
        Identifier   "DFP-0"
        VendorName   "Sony"
        Gamma 0 0 0
        Modeline "1280x800_60.00"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync
EndSection

Section "Device"
        Option          "HWcursor"      "true"
        Identifier      "Card0"
        Driver          "nvidia"
        BusID           "PCI:1:0:0"
        Option          "TwinView" "true"
        Option          "TwinViewOrientation"      "LeftOf"
        Option          "metamodes"     "DFP-0:1280x800_60.00+0+0,CRT-0:1680x1050_60.00+1280+0"
        Option          "ConnectedMonitor" "DFP-0,CRT-0"
        Screen  0
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "DFP-0"
    SubSection     "Display"
        Viewport    0 0
        Depth       1
        Modes  "1280x800" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       4
        Modes   "1280x800" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       8
        Modes   "1280x800" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       15
        Modes   "1280x800" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
        Modes   "1280x800" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes   "1280x800" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       32
        Modes   "1280x800" "800x600" "640x480"
    EndSubSection
EndSection 

Коментарии
 
а) Если у вас видюха на чипсете NVIDIA, то вы можете поставить порт:

Port:   nvidia-settings-270.18
Path:   /usr/ports/x11/nvidia-settings
Info:   Display Control Panel for X NVidia driver 

запустив иксы, выполните в консоли:
 
# nvidia-settings

что запустит графическую оболочку для настройки видео карты, где можно включить и настроить работу второго монитора.
 
ВНИМАНИЕ, в этой утилите есть кнопка «Save to X Configuration File», но если вы ей воспользуетесь и укажете в кач-ве файла для сохранения текущий конфиг хорга, то тулза его ОБНУЛИТ и ничего так и не сохранит. У нас три компа и на всех трех компах так, будьте аккуратны и всегда бекапте xorg.conf перед какими либо действиями над ним.
 
б) Откуда взять BuSID, указанный в секции Device ?
 
Его можно узнать посмотрев вывод команды:
 
# pciconf -lv
 
…skiped…
 
vgapci0@pci0:1:0:0:     class=0×030000 card=0x113219da chip=0x0a2010de rev=0xa2 hdr=0×00
     vendor     = 'NVIDIA Corporation'
    class      = display
    subclass   = VGA ...skiped... 
Так же его можно наблюдать в Xorg.0.log:
 (--) PCI:*(0:1:0:0) 10de:0a20:19da:1132 nVidia Corporation GT216 [GeForce GT 220] rev 162, Mem @ 0xf9000000/16777216, 0xd0000000/268435456, 0xee000000/33554432, I/O @ 0x0000bf00/128, BIOS @ 0x????????/65536 

в) Имена мониторов, указанные в секции Device, можно увидеть в файле лога:
 /var/log/Xorg.0.log
 
К нему следует обратиться если у вас что то не получается и иксы не стартуют, а вываливаются с сообщением:
 
fatal server error:
no screens found
 
Файл лога поможет вам идентифицировать проблему и даст дополнительную информацию о железе.
 
г) Если у вас совсем ничего не получается, то попробуйте воспользоваться портом nvidia-xconfig:

Port:   nvidia-xconfig-270.18
Path:   /usr/ports/x11/nvidia-xconfig
Info:   Tool to manipulate X configuration files for the NVidia driver 

Установив и запустив:
 
# nvidia-xconfig

 На выходе вы получите xorg.conf
 
д) ну и конечно более подробно о том что можно указать в xorg.conf вы можете узнать из мануала:
 
# man xorg.conf


Источник: http://subnets.ru/blog/?p=1842
Категория: X Window | Добавил: oleg (13.05.2011) | Автор: admin
Просмотров: 1275 | Рейтинг: 0.0/0 |
Всего комментариев: 0
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]
Форма входа

Beastie

Друзья сайта

Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0
links

Copyright MyCorp © 2024