LoginSignup
0
0

More than 5 years have passed since last update.

ノートPCのふたを閉じたらサスペンドされるのを変更

Posted at

古いノートPCに作業用としてdebian 9.5をインストールしたところ、ふたを閉じたらサスペンド状態になったため、こうならないように変更しました。

こういった状態変更はsystemd上のsystemd-logind.serviceが行っていて、設定は/etc/systemd/logind.confから行えるとのこと。
https://www.freedesktop.org/software/systemd/man/logind.conf.html

今回行うのは、HandleLidSwitchの設定。
以下のようにコメントアウトされているので、その下に追記しておきます。
(デフォルトを残したいという好みの問題です)

#HandleLidSwitch=suspend
HandleLidSwitch=ignone

設定の反映は以下のコマンドで実行。
# systemctl restart systemd-logind.service

なお、設定値は以下の値が取れる様子。

  • ignore
  • poweroff
  • reboot
  • halt
  • kexec
  • suspend
  • hibernate
  • hybrid-sleep
  • suspend-then-hibernate
  • lock
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0