最近安裝好的Debian 11 Bulleye開機一陣子就會睡著,睡著的狀態是電源燈會閃爍,硬碟燈全暗且螢幕沒有任何畫面。 推測睡著和系統設定有關。使用下面的指令來確認:
- systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
若有看到下面的字樣,則代表系統有五花八門睡著的方式:
loaded (/lib/systemd/system/sleep.target; static)
loaded (/lib/systemd/system/suspend.target; static)
loaded (/lib/systemd/system/hibernate.target; static)
loaded (/lib/systemd/system/hybrid-sleep.target; static)
解決方法則是用下面指令關閉systemd上面會導致睡著的設定:
- systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
- systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
看到下面的字樣則代表成功關閉暫停、睡眠、休眠等狀態:
masked (Reason: Unit sleep.target is masked.)
masked (Reason: Unit suspend.target is masked.)
masked (Reason: Unit hibernate.target is masked.)
masked (Reason: Unit hybrid-sleep.target is masked.)
未來若要重新啟動休眠,則是使用下面指令
- systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
參考資料
- How to Disable Suspend and Hibernation Modes In Linux
- Normal suspend, suspend to RAM
關掉大部分零件的電源,但保留記憶體的電源,這樣恢復的時間會比較短但還是會稍微吃一些電 - Hibernate, suspend to Disk
完全關掉電源,整台系統的狀態都會塞到硬碟swap裡面,待回復的時候再轉出來,需要較長的時間 - Hybrid suspend, suspend to both
- How To: Disable Sleep And Hibernation on Ubuntu Server
- Correct way to execute a script on resume from suspend
- 如何在Linux中禁用和挂起休眠
- Understanding Suspend:Ubuntu系統進入suspend會做的動作
_EOF_
a highly detailed digital image of an imagination machine, concept art, artstation, cgsociety, very detailed, intricate, detailed illustration, by greg rutkowski and alphonse mucha, Paul Lehr and Beeple, iridescent accents, ray tracing, product lighting, sharp, smooth, masterpiece
Steps: 25, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 39991289, Size: 512x512, Model hash: 6ce0161689, Model: v1-5-pruned-emaonly, Version: v1.6.0-2-g4afaaf8a
沒有留言:
張貼留言