方法一
禁止休眠
$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
解除禁止休眠
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
方法二
- 編輯
/etc/default/grub
文件,將GRUB_CMDLINE_LINUX_DEFAULT="quiet"
改爲GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi=off apm=off"
- 執行
sudo update-grub
命令
參考博客:https://shauway.github.io/2018/03/21/Debian9:Ubuntu16.04禁止休眠/