Lock on leave

This section provides an overview of the various experiences enabled by Windows 11's presence sensing features. Each experience can be enabled independently, however Microsoft encourages the implementation of as many of these features as possible for a given hardware configuration.

Functional overview

Illustration of lock on leave

Lock on leave: When the user is no longer actively present in front of the device, the operating system will lock the screen.

Note

The feature does not directly lock the device, the screen is turned off which locks the device after some time.

Debounce mechanisms

The system has been manually locked, but the user is still present

The state machine tracks if a display on or off event has occurred while a human is detected. If the display has been turned off, which corresponds to lock, then the feature will not wake the system until the display is manually turned back on or user walks away then back. This prevents the system from being immediately woken after manually being put to sleep, such as the user manually locking via the Windows+L keyboard shortcut.

User is repeatedly moving in and out of the wake or lock distance threshold

The OS handles this case, no requirements to arbitrate this in firmware. The state machine will wait at least 15 seconds (5 seconds if the timeout is set to 10 seconds) between human presence-based locks to prevent the system from repeatedly switching between wake and lock states. This does not mean that the device will not be able to wake up immediately following a lock. An example of where this can occur is if the user is rocking back and forth in their chair so they repeatedly and quickly enter/exit the wake/lock detection distance. A single repeated motion switching between wake and lock state will trigger the mechanism.

User wakes device with keyboard or mouse while out of view of presence sensor

In the off-screen state, the person wakes up the screen with the mouse or any key on the keyboard from the side (the person is not within the recognition range), then the screen will not be locked after the person leaves, if they do not re-enter human presence. The human presence sensor needs to see a change from Present to Not Present.

Exceptions

At certain times, the user does not want their device to lock, even if they are not physically in proximity to the device. In these cases, the operating system should not lock the screen even if there is not a signal of human presence from the human presence sensor.

In any scenario that takes in a power request from the OS, the lock will not be executed. This applies to scenarios such as a video, ongoing call, etc. This behavior will mimic the current power management schema for current timeout-based locks. This is not configurable to the user since these exceptions are only activated at the kernel level.

Conflict with power settings timeout

For the screen timeout options under System > Power and battery, when human presence is enabled, the more aggressive setting wins. For example, if timeout is set to 1 minute and lock on leave is set to 2 minutes then the screen will turn off in 1 minute whether user is present or not. If timeout is set to never and lock on leave is set to 2 minutes then the screen will turn off after 2 minutes.

Holistic experience benchmarks

This section defines what the user should experience when using this feature, regardless of the hardware facilitating the experience.

Measure Metric Comments
Leave matency – maximum <15 seconds The time between the user leaving the device (reaching the distance 45cm, 75cm, or 120cm) and the system receiving the notification of user absence.
Leave latency – average <5 seconds Average of the three trials.
External monitor metrics Same as internal This is subject to change based on experimentation and further user research studies

Accuracy – user intent recognition framework:

Measure Description Target
False positives The device screen off based on presence, but the user is not actually in front of the device. <5%
False negatives The user leaves the device, but the device does not turn off screen. <5%

Directly measured: The PC placed on a standard desk, 30 inches (76.2 cm) off the floor. The user approaches the desk and chair from >1.2m away. See figure below. This concept is only used for consistency of measurement.

Person standing 2 meters away from a laptop placed at a height of 1.7 meters.

Example settings

The distance setting for Lock on Leave, the distance drop-down, is only available for distance capable devices.

In the Windows 11 22H2 May 2023 update, an additional toggle will be available, to enable or disable the feature when an external monitor is connected. This will be checked 'on' by default.

Windows 11, version 21H2

Settings for lock on leave on Windows 11, 21H2

Windows 11, version 22H2 and above

Example of settings for lock on leave in Windows 11 22H2 and later