How to completely disable screen saver and power management?

I am using Kali Linux on vmware in windows 10. I went into PowerManager and disabled all savescreen,… but after about 10-15 minutes, Kali Linux went into sleep mode (power saving mode). Can anyone help me disable power saving mode in kali linux ?

In the terminal

xset q

to check your Screen Saver - Timeout settings (usually 600 secs), then

xset s off

To turn it off, or change the value to what you want

That should work

1 Like

i followed your instructions but it didn’t work

That’s to vague for me to be able to help more. Can you precise ?

try this instead;

xfce4-power-manager -q

or this;

xset -dpms

I’ve been installing and using Kali Linux for a while now and over the past few updates, I kept banging my head against the annoying automatic lock screen, so I’ve decided to find a solution! :expressionless_face:

I found that the xset commands work, but their changes are not persistent and not reflected in the Power Manager application.

:pushpin: After adjusting some settings via the Power Manager and Screensaver GUI tools, I checked the resulting values using the following Bash command:

for channel in xfce4-screensaver xfce4-power-manager; do
  echo "=== $channel ==="
  xfconf-query -c "$channel" -l | while read -r prop; do
    echo -n "$prop = "
    xfconf-query -c "$channel" -p "$prop"
  done
  echo
done

finding out which were the values changed by the GUI toggles.

:white_check_mark: In the end, I decided to configure those values directly via the terminal using explicit xfconf-query commands:

xfconf-query -c xfce4-screensaver -p /lock/enabled -n -t bool -s true
xfconf-query -c xfce4-screensaver -p /lock/saver-activation/enabled -n -t bool -s true
xfconf-query -c xfce4-screensaver -p /saver/enabled -n -t bool -s false
xfconf-query -c xfce4-screensaver -p /saver/fullscreen-inhibit -n -t bool -s true
xfconf-query -c xfce4-screensaver -p /saver/idle-activation/enabled -n -t bool -s false
xfconf-query -c xfce4-screensaver -p /saver/mode -n -t int -s 0

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-enabled -n -t bool -s false
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-off -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-sleep -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/general-notification -n -t bool -s true
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/lock-screen-suspend-hibernate -n -t bool -s true
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/power-button-action -n -t int -s 3
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/show-panel-label -n -t int -s 0
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/show-tray-icon -n -t bool -s false

I hope this helps others looking to configure Xfce power and screensaver settings more precisely.
Feel free to adapt these commands to your own setup.

1 Like