はじめに
TeraTermでデスクトップにインストールしたDebian12(bookworm)にログインして何も操作せずに20分経過すると「サスペンドした」と表示されので、無効化する方法を探しました。
環境
- Debian12 bookworm
無効化する方法1
設定ファイルを編集します。
sudo vi /etc/gdm3/greeter.dconf-defaults
修正箇所は以下となります。
sleep-inactive-ac-timeout=0 sleep-inactive-ac-type='nothing'
gdm、gdm3を再起動します。
sudo systemctl restart gdm3 sudo systemctl restart gdm
ノートパソコンの場合は、
sleep-inactive-battery-timeout=1200 sleep-inactive-battery-type='suspend'
も修正する必要があります。
![](https://cdn.sstatic.net/Sites/unix/Img/apple-touch-icon.png?v=5cf7fe716a89)
Disabling Suspend, etc. on Debian 12
Just installed Debian 12.0.0. Upgrade from 11.2 didn't work, so installed clean from Bookworm DVD. s...
無効化する方法2
設定ファイルを編集します。
「man 5 systemd-sleep.conf」で詳細を確認できます。
sudo vi /etc/systemd/sleep.conf
修正箇所は以下となります。
[Sleep] AllowSuspend=no AllowHibernation=no AllowSuspendThenHibernate=no AllowHybridSleep=no
再起動します。
無効化する方法3
以下のコマンドを実行します。
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Comments