%EC%97%90%EC%84%9C%20%EC%9D%BC%EC%8B%9C%20%EC%A4%91%EC%A7%80%EB%A5%BC%20%EB%B9%84%ED%99%9C%EC%84%B1%ED%99%94%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95.png)
서버로 사용되는 우분투 20.04가 설치된 노트북이 있습니다. 따라서 나는 그것이 결코 중단되지 않기를 바랍니다.
기본적으로 뚜껑을 닫으면 자동으로 일시 중지됩니다.
SSH를 통해서만 액세스할 수 있으므로(어쨌든 X가 설치되어 있지 않음) CLI를 통해 비활성화해야 합니다.
여러 사이트에서 사용을 제안합니다.
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
이렇게 하면 덮개가 닫혀 있는 동안 노트북이 일시 중지되는 것이 실제로 중지되지만 systemd-logind는 100% CPU를 소비하고 다음을 지속적으로 기록하게 됩니다. (초당 여러 번)
systemd-logind[514]: Suspending...
systemd-logind[514]: Unit suspend.target is masked, refusing operation.
systemd-logind[514]: Failed to execute suspend operation: Permission denied
누구든지 나에게 방법을 말해 줄 수 있습니까?제대로정지를 비활성화하시겠습니까?
답변1
좀 더 검색한 결과 정답을 찾았습니다.
/etc/systemd/logind.conf
하단에 다음 줄을 추가합니다 .
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
그리고 달리다
systemctl restart systemd-logind
새로운 설정을 활성화합니다.