On Ubuntu 22.04 (issue also noticed on many previous versions), in the power settings, I set the number of minutes of inactivity before the screen turns off under "Screen Blank". It works fine when my PC is not connected to an external monitor. The screen turns off and stay off until I move the mouse. Then, I get the lock screen with the clock:
However, if an external monitor is connected, the screens turn off but only for 12 seconds, then the lock screen with the clock (see above) shows up for 28 seconds, then the screens turn off for 12 seconds, and so on.
Is there a way to fix this buggy behavior so that the screens stay off (and then, the external monitor can suspend) until there is an event on the mouse or the keyboard?