Let my kali never sleep

1 Prohibit hibernation
$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
2 Unblock hibernation
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

3 Edit the /etc/default/grub file and change GRUB_CMDLINE_LINUX_DEFAULT="quiet" to GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi=off apm=off" and
execute the sudo update-grub command

4 Let the notebook be closed without sleeping
. Edit logind.conf in the terminal
sudo vim /etc/systemd/logind.conf
and modify the following line after opening the file:
#HandleLidSwitch=suspend #After the
modification is as follows,
HandleLidSwitch=ignore,
save and restart.

5 Cancel Debian screen saver and monitor sleep
dpms monitor sleep settings:
open: $ sudo xset dpms 1 1 2
Cancel: $ sudo xset -dpms
xset set screen saver:
set the screen saver after 10 seconds: $ sudo xset s 10 600 to
restore the system default value: $ sudo xset s 0 600
Cancel the screen saver: $ sudo xset s off The
test found that the command to cancel the screen saver does not work, so you can speculatively cancel it. Delay the arrival of the screen saver by setting a large time value: $ sudo xset s 99999 99999
but passed $ sudo xset q Check the settings and find that the maximum value is limited, and the set time value cannot be reached

Guess you like

Origin blog.csdn.net/seaship/article/details/107403604