Using Caffeine To Prevent Your Computer From Going To Sleep

You’re watching a video or running a slide deck, when suddenly the screen dims. Or you step away from the PC for an extended period and come back to find it locked out or in standby mode.

Why does this happen? Because Windows hasn’t logged any mouse or keyboard activity, so its power-saving settings kick in. This is a potential bother for users running critical apps. For instance, halfway through the latest video game you may not want to go through the rigmarole of wriggling the mouse and pressing keys at random to wake up your device.

Caffeine comes to the rescue by simulating a ‘key up’ event every minute. Once activated, Windows will act as though you are sitting in front of the keyboard even when you are away.

Install Microsoft Visual Studio

Caffeine is written using Microsoft Visual Studio, so in order to use it you must first install Microsoft Visual C++ 2008 Redistributable Package (x86) . 

To do this, open your web browser and navigate tohttps://www.microsoft.com/en-us/download/details.aspx?id=10015. 

Click the ‘Download’ button then choose ‘Run’ to begin installation. Click ‘Yes’ to allow the installer to make changes. Once the Setup Wizard launches click ‘Next’ to continue. 

Download and install Caffeine

Open your web browser and navigate to the Caffeine download page. Scroll up and click the link marked ‘caffeine.zip’ to begin the download. 

If you are using Microsoft Edge click ‘Save’ to copy Caffeine to your ‘Downloads’ folder. Next, click ‘Open Folder’ and find the file named ‘caffeine.zip’. Left click once on the file to select it, then choose ‘Extract’ from the Explorer options at the top of the window. Select ‘Extract All’ then click ‘Extract’ to confirm. 

The icon is shown above – it’s the leftmost one in the task tray, and this is all you see. Double-clicking the icon empties the coffee pot (that’s what the icon is) and temporarily disables the program. Double-clicking it again refills the pot, and will keep your machine awake.

True to its name, Caffeine is like coffee for your computer. Every 59 seconds, it simulates the press of the F15 key to keep your machine out of screensaver/standby mode. By default the app starts enabled, and works every 59 seconds. F15? It’s a key recognized by Windows, but virtually nonexistent on actual keyboards, and therefore not likely to be assigned in any programs you use. In other words, repeated F15 presses shouldn’t mess with anything you’re doing. If it does, however, there’s a command-line option that will use the Shift key instead.

Caffeine basics

Caffeine is designed to be simple to use. Double-click the Caffeine icon at the bottom-right of the screen to activate/deactivate. If active, the coffee pot icon will appear to be full.

Right-click on the Caffeine icon for further configuration options. Keeping your computer screen on indefinitely can reduce performance and potentially damage your hardware. 

Caffeine can be configured to stop working after a certain amount of time, after which your ‘Power & Sleep settings’ will return to their default values. To do this, hover your mouse over ‘Active For’ and choose from 1, 2, 4, 8 or 24 hours respectively.

You can also program Caffeine to kick in after an allotted amount of time. This can be useful if, for instance, you want to keep your screensaver settings but don’t want your hard disk to power down. To get started, hover your mouse over ‘Inactive for’ and select the time period you need e.g. 4 hours.

Download

Foe MAC:

 Intelliscape Software have written a separate app, also named Caffeine, which can help you out.

Alternatives

There are some other alternatives which you might find it is helpful if for some reasons Caffeine is not working as expected. I do notice in some VDI (Virtual Desktop Infrastructure) environment, it might not able to prevent system to go to locked mode.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: