Gnome 3.26은 monitors.xml을 존중하지 않습니다.

Gnome 3.26은 monitors.xml을 존중하지 않습니다.

저는 3개의 모니터가 있는 Arch에서 Gnome-Shell 3.26을 사용하고 있습니다(미니 디스플레이 포트를 통해 3개의 HDMI 허브에 연결됨). 이 하드웨어 설정은 이전 버전의 소프트웨어에서 제대로 작동했습니다.

내가 직면한 문제는 Gnome-Shell이 ​​내 monitors.xml을 존중하지 않는다는 것입니다. gnome 설정 인터페이스를 통해 디스플레이 구성을 수정하면 새 monitors.xml을 생성할 수 있지만 gnome을 다시 시작하자마자 쉘(alt-f2:r) 디스플레이 구성이 완전히 재설정됩니다.

이것은 내 monitors.xml입니다.

<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>3840</x>
      <y>0</y>
      <scale>1</scale>
      <monitor>
        <monitorspec>
          <connector>DP-1-2</connector>
          <vendor>ACI</vendor>
          <product>ASUS VS228</product>
          <serial>C7LMQS146415</serial>
        </monitorspec>
        <mode>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
        </mode>
      </monitor>
    </logicalmonitor>
    <logicalmonitor>
      <x>1920</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>DP-1-1-2</connector>
          <vendor>ACI</vendor>
          <product>VX279</product>
          <serial>ECLMRS015424</serial>
        </monitorspec>
        <mode>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
        </mode>
      </monitor>
    </logicalmonitor>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <monitor>
        <monitorspec>
          <connector>DP-1-1-1</connector>
          <vendor>ACI</vendor>
          <product>ASUS VS228</product>
          <serial>C9LMTF180907</serial>
        </monitorspec>
        <mode>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
        </mode>
      </monitor>
    </logicalmonitor>
    <disabled>
      <monitorspec>
        <connector>eDP-1</connector>
        <vendor>SDC</vendor>
        <product>0x424a</product>
        <serial>0x00000000</serial>
      </monitorspec>
    </disabled>
  </configuration>
</monitors>

이것은의 출력입니다xrandr -q | grep " connected"

eDP-1 connected (normal left inverted right x axis y axis)
DP-1-1-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 476mm x 268mm
DP-1-1-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
DP-1-2 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 476mm x 268mm

내 monitors.xml이 존중되지 않는 이유는 무엇입니까? 뭔가가 그것을 무시할 수 있습니까?

답변1

이 GNOME 쉘 확장은 이 문제를 해결하도록 되어 있습니다:https://extensions.gnome.org/extension/1066/fix-multi-monitors/

설치가 작동하지 않는 경우 다음을 수행할 수도 있습니다.http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost(보관된 사본), monitors.xml 파일을 삭제하고 GNOME이 파일을 다시 만들도록 제안합니다.

그래도 작동하지 않는 경우(에너지 절약 후 Arch Linux의 경우) 를 설치하고 xorg-xrandr디스플레이를 쿼리한 xrandr후 다음을 실행합니다.

xrandr  --output <CON1> --pos 0x0 --output <CON2> --pos 1920x0 --output <CON3> --pos 3840x0

xrandr예를 들어 DVI-0또는 의 연결 이름은 어디에 있습니까 ? DP-1-2 등 DisplayPort-0의 식별자도 작동하는지 아니면 동일한지 알 수 없습니다 .monitor.xml

위의 링크에는 이를 자동화하는 방법도 설명되어 있습니다. 링크가 중단될 경우를 대비하여 여기에 복사합니다.

/usr/local/sbin/업데이트-모니터-위치

#!/bin/bash
# -------------------------------------------------
#  Get monitors configuration from monitor.xml and apply it for current user session.
#  In case of multiple definitions in monitor.xml only first one is used.
#
#  See http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost
#  for instructions
#
#  Parameters :
#    $1 : waiting time in sec. before forcing configuration (optional)
#
#  Revision history :
#    19/04/2014, V1.0 - Creation by N. Bernaerts
#    10/07/2014, V1.1 - Wait 5 seconds for X to fully initialize
#    01/09/2014, V1.2 - Correct NULL file bug (thanks to Ivan Harmady) and handle rotation
#    07/10/2014, V1.3 - Add monitors size and rate handling (idea from jescalante)
#    08/10/2014, V1.4 - Handle primary display parameter
#    08/12/2014, V1.5 - Waiting time in seconds becomes a parameter
# -------------------------------------------------

# monitor.xml path
MONITOR_XML="$HOME/.config/monitors.xml"

# get number of declared monitors
NUM=$(xmllint --xpath 'count(//monitors/configuration['1']/output)' $MONITOR_XML)

# loop thru declared monitors to create the command line parameters
for (( i=1; i<=$NUM; i++)); do
  # get attributes of current monitor (name and x & y positions)
  NAME=$(xmllint --xpath 'string(//monitors/configuration['1']/output['$i']/@name)' $MONITOR_XML 2>/dev/null)
  POS_X=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/x/text()' $MONITOR_XML 2>/dev/null)
  POS_Y=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/y/text()' $MONITOR_XML 2>/dev/null)
  ROTATE=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/rotation/text()' $MONITOR_XML 2>/dev/null)
  WIDTH=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/width/text()' $MONITOR_XML 2>/dev/null)
  HEIGHT=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/height/text()' $MONITOR_XML 2>/dev/null)
  RATE=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/rate/text()' $MONITOR_XML 2>/dev/null)
  PRIMARY=$(xmllint --xpath '//monitors/configuration['1']/output['$i']/primary/text()' $MONITOR_XML 2>/dev/null)

  # if position is defined for current monitor, add its position and orientation to command line parameters
  [ -n "$POS_X" ] && PARAM_ARR=("${PARAM_ARR[@]}" "--output" "$NAME" "--pos" "${POS_X}x${POS_Y}" "--fbmm" "${WIDTH}x${HEIGHT}" "--rate" "$RATE" "--rotate" "$ROTATE")

  # if monitor is defined as primary, adds it to command line parameters
  [ "$PRIMARY" = "yes" ] && PARAM_ARR=("${PARAM_ARR[@]}" "--primary")
done

# if needed, wait for some seconds (for X to finish initialisation)
[ -n "$1" ] && sleep $1

# position all monitors
xrandr "${PARAM_ARR[@]}"

/usr/share/applications/update-monitor-position.desktop

[Desktop Entry]
Type=Application
Exec=update-monitor-position
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Update Monitors Position
Name=Update Monitors Position
Comment[en_US]=Force monitors position from monitor.xml
Comment=Force monitors position from monitor.xml
Icon=display

그런 다음 update-monitor-position.desktop을 실행하십시오.시작 응용 프로그램 기본 설정.

또 다른 가이드도 있어요http://www.calgorithms.com/blog/2014/07/30/fixing-multiple-monitor-position-in-ubuntu-gnome-14-dot-04/.

관련 정보