I have the latest Raspberry Pi OS (Debian Bullseye) on a Raspberry Pi 4. I want to achieve a setting whereby after a period of time the session will lock and no signal will get sent through HDMI so the monitor can switch to a sleep mode.
The default settings allow for the screen to blank (no signal sent to HDMI monitor so that the monitor can go into a sleep mode) after a period of time. However, it does not lock the screen. Xscreensaver allows for a lock screen but still sends a signal with a black image to the monitor such that the monitor will not sleep.
How do I achieve both a locked screen and no HDMI signal after  minutes of inactivity?