X11 的双显示器问题

X11 的双显示器问题

花了两天时间研究这个问题,了解了 RandR 和 Xinerama 以及许多其他东西。我陷入了困境,所以觉得我应该在这里问。基本上,我无法让双显示器设置按照我想要的方式工作。以下是问题的细分:

设置:我有一台运行 Slackware 13.37 的 HP Pavillion G 系列笔记本电脑。我有一个外接显示器:Dell 2000FP。窗口管理器是 xfce。我想将两个显示器用于一个“桌面”(即一个连续的屏幕,我可以将窗口从笔记本电脑显示器滑动到戴尔显示器等)。我以前用其他笔记本电脑做过这个,事实上,使用此设置,如果我启动 Windows 而不是 Linux,它会自动处理。但在我使用的 slackware 版本中存在奇怪的问题。我将我的 xorg.conf 文件发布在这个问题的末尾,因为它可能相关。

问题:使用我发布的 xorg.conf 文件,结果基本正常。我确实在两个显示器之间有一个连续的桌面。笔记本电脑上的分辨率是正确的,但外接显示器上的分辨率是 800x600,而它应该是 1600x1200。有一个用于“Display”变量的 GUI 界面,启动时会返回错误:显示器上缺少 RandR 扩展“:0.0”。

根据我所做的研究,问题在于 Xinerama 和 RandR 之间存在冲突。在我的第一个 xorg.conf 文件中,我将它们都设置为“ON”。因此,我注释掉了“选项“Xinerama”“ON”行,然后发生了几件事:1) 两个屏幕上的分辨率保持不变 2) 我不再收到错误消息,但“显示”变量 gui 没有“1600x1200”作为外接显示器的选项(即使这是 xorg.conf 中列出的唯一分辨率)。3)“屏幕”将允许鼠标在显示器之间移动,就像它是一个大的“屏幕”,但不允许将窗口从一个显示器拖到另一个显示器!(我真的不明白这一点)。

基本上,我只需要让两个显示器有一个屏幕,并且都具有适当的分辨率。我正在发布我的 xorg.conf 文件。

Section "Module"
   Load        "dbe"  
   Load        "type1"
   Load        "freetype"
   Load        "glx"     
   SubSection  "extmod"
     Option    "omit xfree86-dga" 
   EndSubSection
 EndSection

 Section "Files"
   ModulePath  "/usr/lib64/xorg/modules"
   FontPath     "/usr/share/fonts/misc" 
   FontPath     "/usr/share/fonts/util" 
   FontPath     "/usr/share/fonts/OTF" 
   FontPath     "/usr/share/fonts/TTF" 
   FontPath     "/usr/share/fonts/Type1" 
   FontPath     "/usr/share/fonts/Speedo"
   FontPath     "/usr/share/fonts/75dpi:unscaled"
   FontPath     "/usr/share/fonts/100dpi:unscaled"   
   FontPath     "/usr/share/fonts/75dpi"
   FontPath     "/usr/share/fonts/100dpi"
   FontPath     "/usr/share/fonts/encodings"
   FontPath     "/usr/share/fonts/cyrillic"
 EndSection

Section "Module"
Load  "glx"
Load  "extmod"
Load  "record"
Load  "dri2"
Load  "dbe"
Load  "dri"
EndSection

Section "ServerFlags"
Option      "BlankTime"    "0" 
Option      "StandbyTime"  "0"
Option      "SuspendTime"  "0"
Option      "OffTime"      "0"
Option      "Xinerama"     "ON"
#Option     "RandR"    "ON"
Option  "DefaultServerLayout" "DualScreens"
EndSection

Section "InputDevice"
   Identifier   "Keyboard0"
   Driver   "kbd"
 Option "CoreKeyboard"
 Option "SendCoreEvent" "1"  
EndSection

Section "InputDevice"
   Identifier   "Mouse0"
   Driver   "mouse"
   Option "Protocol"    "PS/2"
   Option "Device"      "/dev/mouse"
   Option "CorePointer"
   Option "SendCoreEvent" "1"
EndSection

Section "Monitor" # laptop
    Identifier "Monitor0"
    VendorName   "SEC"
    ModelName    "4251"
    Option "DPMS"
EndSection

Section "Monitor" # external monitor
  Identifier "Monitor1"
  VendorName "DELL"
  ModelName  "DELL 2000FP"
  HorizSync 31.0-80.0
  VertRefresh 56.0-76.0
  Option "DPMS"
EndSection

Section "Device" # laptop
Identifier  "Card0"
Driver      "radeon"
Screen 0    
Option "Monitor-LVDS"  "Monitor0"    # fbe2
EndSection

Section "Device" # external monitor
  Identifier "Card1"
  Driver     "radeon"
  Screen 1
  Option "Monitor-VGA" "Monitor1"    # fbe2
EndSection

Section "Screen"
 Identifier  "Screen 0" # laptop display
 Device      "Card0"
 Monitor     "Monitor0"
DefaultDepth 16
SubSection "Display"
  Depth     8
      Modes "1366x768"      
EndSubSection
SubSection "Display"
  Depth     15
      Modes "1366x768"      
EndSubSection   
Subsection "Display"
      Depth    16
      Modes "1366x768"
  EndSubsection
  Subsection "Display"
    Depth    24
    Modes "1366x768"
  EndSubsection     
EndSection

Section "Screen"
 Identifier  "Screen 1" # Dell 2000FP
 Device      "Card1"
 Monitor     "Monitor1"
DefaultDepth 16
SubSection "Display"
  Depth     8
      Modes "1600x1200"     
EndSubSection
SubSection "Display"
  Depth     15
      Modes "1600x1200"     
EndSubSection       
Subsection "Display"
      Depth    16
      Modes "1600x1200"
    EndSubsection
    Subsection "Display"
      Depth    24
      Modes "1600x1200"
    EndSubsection       
EndSection

 Section "ServerLayout"
   Identifier  "DualScreens"
   Screen 0 "Screen 0" 0 0
   Screen 1 "Screen 1" RightOf "Screen 0"
   InputDevice "Mouse0" "CorePointer"
   InputDevice "Keyboard0" "CoreKeyboard"
EndSection

相关内容