How to automatically lock your computer when you step away (and why you should do it)

Whether you work in a crowded office, have roommates, or simply want to keep your computer private, it’s always a good idea to lock your computer when not in use.
Now, imagine how great it would be if your computer automatically shut down whenever you moved away from it. You wouldn’t have to remember anything, and it would ensure better privacy and battery life.
The good news is that Windows can already do that. The operating system offers several different ways to automatically lock your computer, which may or may not be available depending on your device.
Keep reading to find out why automatic locking can be very useful, the different available methods, and how to set it up.
Why You Should Auto Lock Your PC
We’ve all seen spy movies or played games where characters snoop on desktop computers. When someone steps away from their computer for a moment, it leaves them vulnerable to prying eyes.
While real life isn’t exactly like Cyberpunk 2077, there are clear risks when leaving your computer open. If you’re in an office, anyone passing by could access your sensitive data or perform actions on the company’s network traced back to your computer. Or if you’re at home, your roommates or family members could spy on your emails or browsing history.
But it’s a pain to do something else every time you step away to leave your computer, isn’t it? Even if you learn a keyboard shortcut to lock the screen, there’s always a chance you’ll forget it.
Related: Useful Keyboard Shortcuts for Windows 11 I Use Every Day
So why not have your computer automatically lock itself on your behalf? There are not many downsides to that. You can only stand to gain.
I recommend using one of the built-in features in Windows for this purpose, which are Dynamic Lock and Presence Sensing. Keep reading to see how they differ, which is better for you, and how to use them.
Using Dynamic Lock on Your PC
Dynamic Lock is a relatively unknown feature available on both Windows 10 and Windows 11 operating systems. All you need is a computer that supports Bluetooth technology, along with a smartphone that supports Bluetooth. (And of course, both Android and iPhone devices can achieve this.)
Related: Mysterious Windows Features Everyone Should Know
Here is a simple explanation of how Dynamic Lock works: Your phone pairs with your computer via Bluetooth. When you move away with your phone, the Bluetooth signal weakens. When Windows detects a weak enough signal, it secures your computer. It’s that easy.
Setting Up Dynamic Lock
To set up Dynamic Lock, go to Settings > Accounts > Sign-in Options. Scroll down to the Dynamic Lock section and click to expand it, then enable the checkbox for Allow Windows to lock your device automatically when you’re away:
After activating the option, Windows may tell you that you don’t have a phone paired with your computer. If so, click on Bluetooth and other devices in the right navigation bar, then click on Add device to pair a new Bluetooth device. Make sure to enable Bluetooth on your phone as well.
With your phone turned on and Bluetooth enabled, it should appear as a pairable device on Windows. (In some cases, you may need to tinker with the Bluetooth pairing settings on your phone if it doesn’t show up.)
A Few Caveats with Dynamic Lock
Dynamic Lock works well most of the time, but it can be somewhat tricky. It doesn’t sense your physical presence, it simply cuts off the Bluetooth connection to your phone. So, if you pick up your laptop and move away from your phone, it will also lock itself.
Another downside is that if you disable Bluetooth on your phone, your computer will interpret that as your phone no longer being nearby and will lock itself. (If this happens, you can simply enter your PIN, password, or biometrics for Windows Hello to unlock your computer as usual. Not a big deal.)
The final downside of Dynamic Lock is that it only locks. There’s no unlocking dynamically. So, while it locks your computer automatically when you move away, it doesn’t unlock it automatically when you return. (You can overcome this by setting up Windows Hello with facial recognition.)
Using Presence Sensing on Your PC
Presence Sensing is an advanced feature that can detect if you are actually nearby. By using this, Windows can automatically lock your computer and then unlock it automatically upon your return. Along with a Windows Hello-compatible webcam for facial recognition, your computer can activate itself, scan your face, and log you in directly when you sit down. Yes, it’s as awesome as it sounds.
A Few Caveats with Presence Sensing
You can’t use Presence Sensing unless you have a modern laptop running Windows 11 with a built-in presence sensor, which measures your presence and attention. This feature has become more common in newer laptops, but it’s not always available.
While many laptops running on Qualcomm Snapdragon X have presence sensors – like the Lenovo Yoga Slim 7x – the Microsoft Surface Laptop 7 does not have it for some reason. If you want to use the presence sensing feature, make sure to look for the presence sensor in your next laptop purchase process.
Presence Sensing also has benefits for laptop battery life. When you move away from your laptop, it can quickly go to sleep; when you return, it can wake up automatically and log you in on your behalf. This saves power and extends the battery life of your laptop.
Setting Up Presence Sensing
To check if your Windows 11 computer has presence sensors, go to Settings > System > Power and Battery. Expand the Display and Sleep Timeout section. Then scroll down and look for the following options:
- Turn off my screen when I’m away
- Wake my device when I’m close
- Dim my screen when I look away
These are the Presence Sensing settings and you will only see them here if your computer has a compatible built-in presence sensor:
If you want your computer to automatically lock when you move away, activate the Turn off my screen when I’m away option. When Windows turns off your screen, it will also lock your computer.
If your computer has a Windows Hello-compatible webcam and you’ve activated the Wake my device when I’m close option, it will use the Presence Sensing feature to alert your computer and then Windows Hello to unlock your computer upon your return – all automatically without touching anything.
Click on any of the settings to view the detailed Presence Sensing settings page where you can customize everything, including the distance you need to be from your computer and the duration it waits to turn off the screen when you move away.
Note: If you find your computer turning off its screen even while in use, consider adjusting the distance to be farther or setting a longer duration away.
Don’t Forget the Keyboard Shortcut
Whether you decide to use Dynamic Lock or Presence Sensing or either of them, it might also be easy to know a keyboard shortcut to lock your computer instantly when needed. You don’t have to open the “Start” menu or press Ctrl + Alt + Del and search for the lock option.
Instead, simply press Windows key + L to quickly lock your computer. This shortcut is incredibly fast and easy, so you can press it while standing up, resulting in your computer locking immediately without searching through any menus.
It’s incredibly convenient – but unlike Dynamic Lock or Presence Sensing, it is also possible to forget.
More Reading: You Should Know Windows 11 Security Settings