Few ThinkPad products support features related to “Human Presence Detection”.
This feature is “Screen OFF on Leave” aka Screen “Lock on leave” .
Earlier this feature was called as “Lock on Leave” but in future, this feature will be changed to “Screen OFF” only on Leave for user convenience. This will be same as Windows also.
Add Screen-Off-On-Leave Feature to gnome-control-center
I cannot provide the source code for this for now, but basically the feature is the prototype as shown above in Nitin’s Post.
Above modifications were made on gnome-46 and Ubuntu 24.04 as of now, but will eventually update to latest versions.
However, could not fully test gsettings-desktop-schema ScreenOffOnLeave modification because of issues during install. So during testing, I am currently testing on a branch without screen-off-on-leave implementation for both the gnome-shell extension and GUI app.
How this works:
Set Screen-Off-On-Leave setting → True when Screen-Off-On-Leave Feature is enabled
(Extension is enabled) Screen-Off-On-Leave Feature will utilize HPD Proximity and Distance values for determining if Screen Blank should be triggered. Screen-Blank Sequence is triggered (by setting idle-delay to 1 sec) when person is not detected after set amount of time and distance.
Disable-lock-screen is set to True
Screen-Off-On-Leave setting is checked if it is True in the extension. If True, disable-lock-screen setting is checked. If True, then during screen blank, fade animation is disabled.
The normal idle-delay value is restored after this sequence.
The proposal might be rough around the edges, but I am very much open to any suggestions on how best to implement this feature.
@felipeborges Thanks for your comment ! No , we have not considered it as we can use sysfs directly . Also , since the functionality is GUI based and we can use it directly in GNOME . Is it recommended to check it ?
I have tried checking it today but it seems can’t see hpd sensor information … may need some support for iio_proxy_sensor maintainer, if we need to use it ,
Btw , as @Josef-Ouano has mentioned, do you have any comment regarding Screenshied and gsettings-desktop schema changes ?