Ubuntuのノートブックパソコン:「モニターを閉じるとサスペンドされる」を防止する方法

はてなブックマーク - Ubuntuのノートブックパソコン:「モニターを閉じるとサスペンドされる」を防止する方法
LINEで送る
Pocket


背景

Ubuntuのデフォルトの設定ではノートブックパソコンのフタ(モニター)を閉めるとシステムをサスペンドしてしまうので、ネットワークに接続しっぱなしして利用するとき、フタを閉めるとsshやVNCが切れてしまってアクセスができなくなりますので、「モニターを閉じるとサスペンドされるの」を無効にする方法を調べました。

1つのファイルを修正

下記のファイルを開いて

/etc/systemd/logind.conf
この属性を
HandleLidSwitch
ignoreに設定し直します。
- #HandleLidSwitch=suspend
+ HandleLidSwitch=ignore

 

設定反映

reboot

あるいは(私の環境 : Ubuntu14.04)

 sudo restart systemd-logind

あるいは(Ubuntu 15.04 systemd以降:systemdデフォルトとしてリリースされた

sudo systemctl restart systemd-logind

参考:Ubuntu Server 13.10 now goes to sleep when closing laptop lid – Ask Ubuntu

 

はてなブックマーク - Ubuntuのノートブックパソコン:「モニターを閉じるとサスペンドされる」を防止する方法
LINEで送る
Pocket

Add a Comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close