XRandR/X11: 두 개의 모니터를 하나의 화면으로 병합하지 마세요

XRandR/X11: 두 개의 모니터를 하나의 화면으로 병합하지 마세요

저는 최근 Gentoo에서 Void Linux로 전환하여 모니터가 하나만 있는 시스템에 설치했습니다.

하지만 지금은 위치를 바꿔서 2개의 모니터 시스템을 사용하고 있습니다. 내 Gentoo 설치에서는 모든 것이 잘 작동하며 X11은 두 화면이 서로 병합되어서는 안 되고 서로 다른 화면이어야 한다는 것을 인식합니다.

XRandR의 출력은 다음과 같습니다.

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  50.00    59.94
   1600x1200     60.00
   1680x1050     60.00
   1600x900      60.00
   1280x1024     75.02    60.02
   1440x900      60.00
   1280x800      60.00
   1152x864      75.00
   1280x720      60.00    50.00    59.94
   1024x768      75.03    60.00
   800x600       75.00    60.32
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    60.00    59.94
   720x400       70.08
HDMI-A-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 698mm x 393mm
   1920x1080     60.00*+ 239.96   144.00   120.00   119.88   119.98    50.00    59.94
   1680x1050     60.00
   1280x1024     75.02    60.02
   1440x900      60.00
   1280x800      60.00
   1280x720      60.00    50.00    59.94
   1024x768     119.99    75.03    70.07    60.00
   832x624       74.55
   800x600      119.97    72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    72.81    66.67    60.00    59.94
   720x400       70.08
DVI-D-0 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

적어도 제 생각에는 문제는 HDMI-A-0(1920x1080+1920+0)을 확장한다는 것입니다. X11이 애플리케이션에 제공하는 모든 화면을 얻기 위해 GHC를 사용하면 이 두려움이 확인됩니다.

명령 출력

ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo"

다음과 같이:

[Rectangle {rect_x = 0, rect_y = 0, rect_width = 3840, rect_height = 1080}]

명확히 하자면, 제가 원하는 것은 X11이 하나의 긴 화면(3840x1080)이 아닌 두 개의 화면(각각 1920x1080)을 제공하는 것입니다.

다음 명령을 포함하여 온라인에서 답변을 찾아 보았습니다. 그들 중 누구도 직업을 갖고 있지 않다.

xrandr --output HDMI-A-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --scale 1x1 --size 1920x1080+0+0 \
      --output DisplayPort-0 --mode 1920x1080 --left-of HDMI-A-0 --rotate normal --scale 1x1 --size 1920x1080+0+0 ;
xrandr --output DisplayPort-0 --auto --mode 1920x1080 --left-of HDMI-A-0 --pos 1920x0
xrandr --output DisplayPort-0 --auto --mode 1920x1080 --left-of HDMI-A-0 --pos 0x0
xrandr --output DisplayPort-0 --auto --mode 1920x1080 --left-of HDMI-A-0

등..

당신의 도움에 감사드립니다

답변1

한 가지 이유는 "당신의 HaskellX11 라이브러리Xinerama용으로 제작되지 않았습니다."

다음 점검을 수행해야 합니다.앞으로조사하다 openDisplay "" >>= getScreenInfo:

ghc -e Graphics.X11.Xinerama.compiledWithXinerama

https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Multi_head_or_xinerama_troubles


NixOS에서 스택과 함께 Xmonad를 사용할 때 이 문제가 발생했으며 stack.yaml다음 파일로 해결했습니다.

resolver: lts-19.33
packages:
  - .
nix:
  enable: true
  packages:
    - xorg.libX11
    - xorg.libXinerama # <-- important for multi-display support
    - xorg.libXext
    - xorg.libXft
    - xorg.libXrandr
    - xorg.libXScrnSaver
    - pkg-config

X11 라이브러리를 강제로 다시 빌드해야 한다는 점에 유의하세요(예: rm -rf ~/.stack매우 조잡한 방법인 를 통해).

관련 정보