I had the same issue after upgrading to ubuntu 22.04 and the logs showed the following error.
Failed to connect to the screen saver: Error al llamar StartSereviceByName para org.gnome.ScreenSaver: Failed to execute program org.gnome.ScreenSaver: No such file or directory
The missing file was /usr/bin/gjs which I was able to solve by installing the gjs package. After restarting session the display powered off as espected.
I hope your problem is the same and you can solve it.
I had the same issue after upgrading to ubuntu 22.04 and the logs showed the following error.
Failed to connect to the screen saver: Error al llamar StartSereviceByName para org.gnome. ScreenSaver: Failed to execute program org.gnome. ScreenSaver: No such file or directory
The missing file was /usr/bin/gjs which I was able to solve by installing the gjs package. After restarting session the display powered off as espected.
I hope your problem is the same and you can solve it.