본문 바로가기

기타/Linux

[우분투] Ubuntu 20.04 노트북 덮개 닫기 파워 설정 방법

Ubuntu 20.04 노트북 덮개 닫기 동작 설정

 

Ubuntu 20.04 노트북 덮개 동작

systemd 전원 설정방법

Ubuntu 20.04 설치된 노트북에서 덮개가 닫힌 상태에서도 전원을 유지해도록 설정한다. 터미널 창에서 /etc/systemd/logind.conf 파일을 sudo 권한으로 수정한다.

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

HandleLidSwitch 는 default 로 suspend 로 되어 있으나, ignore 로 변경할 경우, 덮개(lid) 를 닫아도 power on 상태를 유지한다. 설정을 변경하고 재부팅 하거나 서비스를 재시작해야한다.

systemctl restart systemd-logind.service

참고자료

logind.conf, logind.conf.d — Login manager configuration files

https://www.freedesktop.org/software/systemd/man/logind.conf.html

 

logind.conf

Name logind.conf, logind.conf.d — Login manager configuration files Synopsis /etc/systemd/logind.conf /etc/systemd/logind.conf.d/*.conf /run/systemd/logind.conf.d/*.conf /usr/lib/systemd/logind.conf.d/*.conf Configuration Directories and Precedence The d

www.freedesktop.org