Linux 노트북의 디스플레이 패널을 사용하여 Xorg를 방지하려면 어떻게해야합니까? Linux)이 있습니다. 뚜껑을

데스크탑 컴퓨터로 대부분의 시간을 사용하는 랩톱 (~ 5 년 된 HP compaq nc6400 Fedora Linux)이 있습니다. 뚜껑을 닫은 상태로 도킹 스테이션에 연결하고 DVI 케이블을 통해 대형 외부 LCD 디스플레이에 연결합니다.

여러 가지 이유로 (로그인 인사가 닫힌 디스플레이에 표시되고 제한된 그래픽 카드가 두 디스플레이 모두에 3D를 동시에 수행 할 수 없음) 랩톱의 통합 디스플레이 패널이 X에서 전혀 사용되지 않도록하고 싶습니다. 도킹되어 있고 책상 위에있는 동안 (시간의 약 97 % 사용) 통합 랩톱 패널을 사용하지 않기를 바랍니다. 기본적으로 두 디스플레이간에 모든 것이 미러링되므로 부팅은 특별한 문제가 아닙니다. 또한 책상에서 멀리 떨어진 랩톱을 사용할 때 드문 경우에 설정을 취소 해야하는 ‘수동’솔루션이 마음에 들지 않습니다.

로그인하면 외부 모니터 만 사용하고 랩톱 패널에 “off”로 표시되도록 Gnome을 구성 할 수 있지만 초기 자동 구성된 X 상태 및 사전 로그인 인사 표시에는 영향을 미치지 않습니다. 놀랍게도 랩톱에는 뚜껑 센서가없는 것처럼 보이므로 뚜껑을 열거 나 닫아도 이벤트가 발생하지 않습니다. xrandr -display :0 --output LVDS1 --off --output DVI1 --auto로그인하기 전에 별도의 VC에서 사용할 수 있지만, 여전히 X가 시작하여 두 디스플레이를 사용하기로 결정하고 발견 한 후에 발생합니다.

다음 /etc/X11/xorg.conf.d/01-turn-off-laptop-display.conf을 포함 하는 파일 을 만들어 Xorg를 구성하려고 시도했습니다 .

Section "Monitor"
    Identifier  "laptop panel"
    Option  "Monitor-LVDS1" "laptop panel"
    Option  "Enable" "no"
EndSection
Section "Monitor"
    Identifier  "big display"
    Option  "Monitor-DVI1" "big display"
EndSection

Section "Screen"
    Identifier  "main"
    Device  "Default"
    Monitor "big display"
EndSection

그러나 이것은 유용한 효과가 없었습니다. 비디오 카드는 Intel 945GM입니다.

[dan@khorium ~]$ sudo lspci -v -s 0:2
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Hewlett-Packard Company Device 30ad
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at f4600000 (32-bit, non-prefetchable) [size=512K]
    I/O ports at 4000 [size=8]
    Memory at e0000000 (32-bit, prefetchable) [size=256M]
    Memory at f4680000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 2
    Kernel driver in use: i915
    Kernel modules: i915

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
    Subsystem: Hewlett-Packard Company Device 30ad
    Flags: bus master, fast devsel, latency 0
    Memory at f4700000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: [d0] Power Management version 2

머신은 약 10/11 버전부터 다양한 버전의 Fedora Linux (x86_64)를 실행하고 있습니다. 현재 Fedora 15 베타 (Gnome 3 포함)를 시도하고 있지만 이전 OS 릴리스에서 문제가 발생했습니다.



답변

다음 xorg.conf를 사용하여 원하는 목표를 달성 할 수있었습니다.

Section "Monitor"
        Identifier      "laptop panel"
        Option  "ignore"        "true"
EndSection
Section "Monitor"
        Identifier      "big display"
EndSection
Section "Device"
        Identifier      "onboard"
        Option  "Monitor-LVDS1" "laptop panel"
        Option  "Monitor-DVI1" "big display"
EndSection

중요한 요소 Option "Ignore" "true"입니다. 더 단순화 할 수는 있지만 작동합니다. 랩톱을 외부 디스플레이에서 멀리 사용하면 어떻게 될지 아직 알지 못합니다 .X는 오류와 함께 종료 될 수 있습니다. 완벽한 솔루션은 아니지만 해당 이벤트에서 구성을 벗어날 수 있습니다.


답변

랩톱을 랩톱으로 사용하려는 드문 경우에 더 융통성이있는 약간 다른 접근 방식을 제안합니다.

디스플레이 관리자 (아마도 GDM, KDM 또는 LightDM)에 따라 디스플레이 관리자가 시작될 때 스크립트를 실행할 수 있습니다. 수정 된 xorg.conf 파일이 전혀 필요하지 않습니다. 스크립트의 위치는 다음과 같습니다 (1).

  • KDM : / etc / kde / kdm / Xsetup (맨 아래)
  • SDDM : / etc / X11 / xdm / Xsetup (맨 아래)
  • XDM : / etc / X11 / xdm / Xsetup (맨 아래)
  • GDM : / etc / gdm / Init / Default-스크립트 코드를 “/ sbin / initctl”줄 바로 위에 놓으십시오. (1)
  • LightDM : /etc/lightdm/lightdm.conf- “display-setup-script =”는 스크립트가 원하는 곳을 가리 킵니다. 스크립트의 첫 번째 줄이 #! / bin / sh 이고 실행 가능한지 확인하십시오 .

스크립트는 이런 식일 수 있습니다. 모니터 이름을 컴퓨터에 적합한 이름으로 바꿔야합니다. 위의 xorg.conf를 기반으로 추측하려고했습니다.

/usr/bin/xrandr --current | grep "DVI1 connected "
if [ $? -eq 0 ]; then
  echo "DVI found"
  sleep 1s
  /usr/bin/xrandr --output LVDS1 --off
  /usr/bin/xrandr --output DVI1 --auto --primary
fi

DVI 모니터가 연결되어 있고 내장 디스플레이 대신 활성화되어 있는지 테스트합니다. 랩톱이 제대로 작동하도록 만드는 훨씬 더 복잡한 버전이 있지만 다른 곳에서는 사용하기에 좋습니다. 직장에서 5 개의 화면을 사용하고 있기 때문에 더 복잡합니다.

(1) http://forum.xfce.org/viewtopic.php?pid=25026#p25026의 일부 파일 위치 정보


답변

이전 게시물 xorg.conf의 약간 수정 된 버전

Section "Monitor"
   Identifier "hdmi out"
   Option "ignore" "true"
EndSection

Section "Monitor"
   Identifier "big display"
EndSection

Section "Device"
   Identifier "onboard"
   Option "Monitor-LVDS1" "hdmi out"
   Option "Monitor-VGA1" "big display"
EndSection

인텔 NM10 칩에서 작동하는 것 같습니다. 상자에는 “큰 디스플레이”를위한 vga가 있습니다.


답변

당신이 사용하는 경우 Option "ignore" "true"/etc/X11/xorg.conf당신은 그와 출력을 사용할 수 없습니다 xrandr전혀 (또는 따라 도구). 이 구성을 사용하여 방금 HDMI 출력을 비활성화했습니다.

Section "Monitor"
        Identifier "My-DVI-D"
        Option "Primary" "true"
        Option "PreferredMode" "1920x1080x60.0"
EndSection

Section "Monitor"
        Identifier "My-HDMI"
        Option "Enable" "false"
        Option "RightOf" "My-DVI-D"
EndSection

Section "Device"
        Identifier "onboard"
        Option "Monitor-HDMI1" "My-DVI-D"
        Option "Monitor-HDMI2" "My-HDMI"
EndSection

DVI-D (전체 해상도)를 활성화하고 HDMI를 비활성화하려면 모든 단일 구성 라인이 필요합니다.

출력을 찾아서 적절 xrandr -q하게 조정하십시오 Option "Monitor-.... 관련 맨 페이지 섹션은 다음과 같습니다.

   Option "Enable" "bool"
          This optional entry specifies whether the monitor should be turned on at  startup.   By  default,  the  server  will
          attempt to enable all connected monitors.  (RandR 1.2-supporting drivers only)
...
   Option "PreferredMode" "name"
          This optional entry specifies a mode to be marked as the preferred initial mode of the monitor.  (RandR 1.2-support‐
          ing drivers only)
...
   Option "Primary" "bool"
          This optional entry specifies that the monitor should be treated as the primary monitor. (RandR 1.2-supporting driv‐
          ers only)
...
   With RandR 1.2-enabled drivers, monitor sections may be tied to specific outputs of the video card.  Using the name of  the
   output  defined by the video driver plus the identifier of a monitor section, one associates a monitor section with an out‐
   put by adding an option to the Device section in the following format:

   Option "Monitor-outputname" "monitorsection"

   (for example, Option "Monitor-VGA" "VGA monitor" for a VGA output)