I'm using Kali linux on vmware in windows7. I've been trying to crack my wpa password and noticed that when I leave the system running (in process of cracking password) and leave the laptop on and go away for about 10-15 minutes, Kali linux goes to sleep and I am not sure if the cracking process with reaver is still running or not. When I click onto the page a box comes up prompting me to type in my username and password. When I type that in it logs me back on but my screens that were left open cracking the password are no longer there and everything starts freezing up a lot. The mouse is freezing and if I try to click on anything there is a massive delay before anything happens or nothing at all.

Also there was no option prevent screen going in an inactive state infinitely..(lock and brightness-maximum time 1 hour)

enter image description here

I've since had to switch back to backtrack to do my cracking and has been running perfectly and does not go to sleep when left for long periods.

  • Now what I'd like to know is how can I prevent kali linux from going to sleep and closing my work that's in progress?

Any help on this issue would be appreciated.

  • How can i do that ?
    – Educ
    Oct 19, 2014 at 15:37
  • Deleted my last post since it is REALLY not recommended and therefore of bad quality. Try running xscreensaver-demo and looking for locking options there.
    – SailorCire
    Oct 19, 2014 at 15:39

11 Answers 11


With the gui, you do this by changing three settings. To access the settings, click any top right icon (a panel opens), then click the "settings" icon at the bottom left of the opened panel.

Once the "All Settings" appears:

  • Power > Power Saving > Blank screen: never
  • Power > Suspend & Power Button > Automatic suspend: off
  • Privacy > Screen Lock: off

With Kali XFCE, you can disable screen blanking using its power applet. Click on the applet and choose "Presentation Mode."

  • This is the only one that currently (2022-2023) worked for me.
    – cherouvim
    Jan 9, 2023 at 8:41
  1. Click on battery icon [1.][Icon]
  2. Pick settings [2.][Settings]
  3. Click display tab [3.][Display tab]
  4. Adjust to never [4.][Never]



Install Cmatrix to keep the screen busy without using a lot of ram:

# apt-get install cmatrix


$ cmatrix
  • Umm, actually, cmatrix can be a massive RAM hog… just saying :P
    – HalosGhost
    Jan 5, 2015 at 5:44
  • didn't help me at all. :) Sep 18, 2016 at 10:06

According to SailorCire, you have to kill the screensaver program, you have to insert the following code with a little change in /etc/init.d/rc.local :

pid=`ps ax |egrep -v grep |egrep pattern  |awk {'print $1'}`
kill $pid

You have to change pattern to part of the screensaver name. Of course unique.
May be above code doesn't work you have to call the kill command with -9 as argument.
By the way, if it doesn't work, make a script and insert into it, WHY? because may be your screen-saver program run with your graphical mode, Then call with startup program the given script.

  • please can you tell me step by step how to do that i'm newbie in Kali
    – Educ
    Oct 19, 2014 at 15:47
  • I guess you don't linux or unix not kali.Okey? Oct 19, 2014 at 15:54
  • 1
    before any change in rc.local, at first see man ps , man grep , don't worry about awk. Second you need to work with nano or pico editor. man pico or man nano Oct 19, 2014 at 15:56
  • 2
    man is usefule command , you can read manual of a command with this command such as man ls man pages categorize in 9 level you can set man 1 grep for search in manual pages, you can use man -k yourpattern Oct 19, 2014 at 15:59
  • 1
    Change pattern to gnome-screensaver But i suggesst you be sure learn linux , you need it, for example when you setting up metasploit you have to know postgresql , or when you setting up OpenVAS, you have to apt. learn getting fishing instead of get fish. Oct 19, 2014 at 16:52

sleepdaemon is not my best friend

try this (maybe +other gsettings):

sudo gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
sudo gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'
sudo setterm -blank 0 -powersave off -powerdown 0
sudo xset s 0 0
sudo xset dpms 0 0
sudo xset dpms force off
sudo xset s off
sudo service sleepd stop
sudo kill $(lsof | grep 'sleepd' | awk '{print $2}')

you can kill (sleep-daemon && xscreensaver && terminal powersave) with this code

  • Nothing good came from this either. Sep 18, 2016 at 10:07

For Kali sana:
1. Open All Setting (at top right corner of your home screen)
2. At hardware panel choose power
3. Disable Dim screen when inactive and blank screen

  • Came here to say POWER options.
    – Jeter-work
    Oct 5, 2016 at 14:55

When running Kali Linux without a monitor, I tired all of the above suggestions and many more. The only thing that worked was the GNOME Caffeine Extension. With this enabled my computer stayed awake all weekend without monitor attached.

To install you can run : sudo apt-get install gnome-shell-extension-caffeine


Type the below lines in a terminal. It worked for me, the screen still dimmed and locked, but computer did not go to sleep

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0

Actually, You just need to check the setting in : System Settings: (Workspace) Desktop Behavior > Screen Locking |> Lock screen automatically after: 5 Mins And, System Settings: (Hardware) Power Management> Energy Saving screen.


Just go to terminal and type /etc/root/scrnsver reset --u local

  • 2
    Hello and welcome! Maybe you could elaborate a little more on what this does and how it's going to help?
    – Ghanima
    Dec 7, 2014 at 23:35
  • No such file or directory - -1 Sep 18, 2016 at 10:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .