方法一
禁止休眠
$ 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禁止休眠/