Skip to content

ludvikjerabek/StopSaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stop Saver

GitHub Downloads (all assets, all releases)

Stop Saver is a statically compiled Windows VC binary designed to prevent screensaver activation, sleep, and inactivity.

Why I Created This Tool

I built Stop Saver to solve a common frustration: system lockouts and sleep interruptions while working from home. Many systems automatically disconnect VPN sessions after periods of inactivity, which can disrupt critical tasks like long-running SSH sessions, monitoring, or downloads.

With Stop Saver, your computer stays active and responsive—no manual intervention needed.

Why I Chose to Build It Myself

  • I didn’t trust other online solutions.
  • I wanted a simple, lightweight approach.
  • I needed a native Win32 C/C++ single-binary solution.

Requirements

  • Windows 7 or greater (x86 or x64)

Standalone Installation

Download the appropriate standalone version of the application for your system from the releases area.

Note: The standalone installation will not auto-launch upon login. You will need to configure this manually.

Installation via MSI Installers

Download the appropriate version of the MSI package for your system from the releases area.

Once the installation is complete, you can launch Stop Saver from the application menu.

Application Menu

Usage

After launching Stop Saver, you will see a task tray icon as shown below.

Task Tray Icon

Click the icon and select the desired state.

image

Once you select "Start," the icon will change as shown below.

Start Icon

Safety Features

If the user session is locked, Stop Saver will disable to prevent battery drain (e.g., closing the laptop lid to travel).

Tray Configuration Options

image
  • Start automatically on launch - Once the applicaiton lanches, it will automatically be in the started state.
  • Restore active state on unlock - If you lock your system, walk away, and unlock. The prior running state will resume.
  • Show user as active - Send input type INPUT_MOUSE and event type MOUSEEVENTF_MOVE which tells the system the mouse moved.
    • Note: This is what keeps other apps showing as active.

User Registry Options (Manual Overrides)

Under the HKEY_CURRENT_USER\Software\StopSaver registry

  • LogFile - REG_EXPAND_SZ value can be used to change the logfile path. Default is %USERPROFILE%/stopsaver.log
  • LogLevel - REG_SZ string values trace, debug, info, warn, error, critical, off. Default is error
  • MaxSizeLogSize - REG_DWORD value max size of logfile in bytes. Default is 10485760 10MB
  • MouseIntervalMs - REG_DWORD value from 1000 to 60000 (in miliseconds). Default is 30000 (30s).
  • AutoStartOnLaunch - REG_DWORD value 0 or 1 are associated with the Tray Configuration Option Start automatically on launch
  • RestoreOnUnlock - REG_DWORD value 0 or 1 are associated with theTray Configuration Option Restore active state on unlock
  • ShowUserAsActive - REG_DWORD value 0 or 1 are associated with theTray Configuration Option Show user as active

How it works

There are two mechanisms to prevent sleep:

  • SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED); - Will prevent the system from sleeping, much like a Zoom session.
  • SendInput(1, &input, sizeof(INPUT)); - The input type is INPUT_MOUSE and event type is MOUSEEVENTF_MOVE which tells the system the mouse moved.

The SendInput call notifies other applications that the mouse is moving, preventing inactivity.

Performance

Stop Saver is very low on resource consumption.

image

Note: When the application starts task manager will show higher memory, but it falls after running for a while.

Feedback and Bugs

Is anyone still running Windows XP or earlier versions of Windows where this tool might be useful?
If so, please reach out and let me know, it may be possible to make it compatible with older versions.

If you discover any bugs or have suggestions for improvements, please feel free to share them.

About

Windows screensaver, inactivity, and lockout preventer

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published