Ubuntu 20.04에서 덮개를 닫을 때 외부 디스플레이를 끄는 방법

Ubuntu 20.04에서 덮개를 닫을 때 외부 디스플레이를 끄는 방법

반대로 묻는 질문이 많이 있다고 생각합니다. 그러나 나에게는 노트북 덮개를 닫을 때 외부 모니터가 계속 실행 중이므로 노트북 덮개를 닫을 때 계속 실행을 중지하고 싶습니다.
Ubuntu 버전: 20.04.1
다음 작업을 수행했지만 그 중 아무 것도 작동하지 않는 것 같습니다.

  1. /etc/systemd/logind.conf다음과 같이 편집되었습니다 .
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
  1. lid-close-ac-actiondconf-editor의 옵션을 다음 /org/gnome/settings-daemon/plugins/power으로 변경했습니다 .suspend

    편집하다:
  2. lid-close-suspend-with-external-monitordconf-editor의 옵션 을 true.

답변1

세 가지 구성이 필요합니다.

  • 활성화된 dconf-editor org.gnome.settings-daemon.plugins.power설정 에서lid-close-suspend-with-external-monitor
  • 파일에서 /etc/UPower/UPower.conf매개변수를 IgnoreLid다음으로 변경합니다 true(로 끝남 IgnoreLid=true).
  • /etc/systemd/logind.conf필요한 파일에HandleLidSwitchDocked=suspend

답변2

추가 설정이 있는 것 같아요.
실행 중인 항목에 따라 명령줄에서 다음을 시도해 보세요.

gsettings set com.canonical.unity.settings-daemon.plugins.power lid-close-suspend-with-external-monitor true

또는

gsettings set org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor true

아니면 둘 다인지 확실하지 않은 경우...

관련 정보