Buckfae
February 17, 2022, 7:43am
1
I want to disable sleep / hybernate / suspend on i3. I found How to Completely disable sleep/hibernate/suspend? which tells me to do
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
However, my screen still goes blank after a while. How can i prevent this?
I’m on a fresh install, my pc does not use a password at login (checked that in the installer), just in case that matters.
Thank you very much!
pebcak
February 17, 2022, 9:21am
2
There might be other (better) ways to do this but I installed xfce4-power-manager to manage the power settings of the system:
Set the desired values or disable altogether.
two different things
Display powermanagement is not handled by resume it is handled by xset in ~/.config/i3/config:
#exec_always --no-startup-id conky
# start a script to setup displays
# uncomment the next line, use arandr to setup displays and save the file as monitor:
exec --no-startup-id ~/.screenlayout/monitor.sh
# set wallpaper
exec --no-startup-id sleep 2 && nitrogen --restore
#exec --no-startup-id feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros_i3.png
# set powersavings for display:
exec --no-startup-id xset s 480 dpms 600 600 600
# disable power saving (for example if using xscreensaver)
#exec --no-startup-id xset -dpms
# xscreensaver
# https://www.jwz.org/xscreensaver
#exec --no-startup-id xscreensaver --no-splash
# Desktop notifications
Modify DPMS and screensaver settings with a command
It is possible to turn off your monitor with the xset command which is provided by the xorg-xset package.
Examples:
Command
Description
xset s off
Disable screen saver blanking
xset s 3600 3600
Change blank time to 1 hour
xset -dpms
Turn off DPMS
xset s off -dpms
Disable DPMS and prevent screen from blanking
xset dpms force off
Turn off screen immediately
xset dpms force standby
Standby screen
xset dpms force suspend
Suspend screen
pebcak
February 17, 2022, 10:29am
4
Revision:
There are better ways to do this.
your way works too i would bet?
But seems a bit “bloated” to install power management GUI to disable it in its own settings
Buckfae
February 17, 2022, 3:07pm
7
Thank you, this seems to have done the trick!
Do i need to undo
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
If i recall correctly, this just creates symlinks, should i delete them?
pebcak
February 17, 2022, 3:42pm
8
If you are not going to use suspension, hibernation etc. you could leave it as it is.
systemctl mask just creates links into /dev/null, that is into “nothingness” sort of.
At anytime later on, you can enable them as needed.
Buckfae
February 17, 2022, 5:56pm
9
What do i need to to in case that i want to use suspension / hibernation again?
pebcak
February 17, 2022, 7:51pm
10
You could unmask them at any time (systemctl unmask) enable them and set up the service you need.
Please refer to ArchWiki for power management, suspension, hibernation etc.