2022年9月13日 星期二

關閉Debian 11的睡眠、休眠等模式

最近安裝好的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上面會導致睡著的設定:

  1. systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
  2. 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.)

未來若要重新啟動休眠,則是使用下面指令

  1. systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target


參考資料

_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

沒有留言:

張貼留言