Screen not restarting after being locked for hours

I use Ubuntu Mate 18.04. I did the latest updates and upgrades. But the system seems to be having problems. The main problem is: suppose I lock the screen and then switch the screen off. And return to it after a few hours. Then the when I power the screen back, it just keeps showing me the last desktop session. The login dialog box does not appear. The screen remains frozen. The mouse pointer moves but I am not able to do anything. Should I install a third-party screen-locker or should I not switch my monitors when I leave it locked for hours?

This sounds like the issue in this topic - likely your monitor is seen as "unplugged" when it's turned off and causes a glitch in MATE Screensaver, which is responsible for presenting the lock screen.

The bug has been fixed, but unfortunately the fix hasn't been applied to 18.04 due to SRU approval issues.

Try updating the packages manually and see if this fixes your issue:

Ok, I will try this. Btw, I went to Screensaver > Power Management, and chose never option for "Put display to sleep when inactive for". My problem seems solved for now but if it again appears I will try your method. I don't want to install non-standard packages until no option is left.

These are new versions of the standard packages built by the official build service (Launchpad). They are stuck in the -proposed archive. Newer Ubuntu MATE versions will have this new version.

Glad you've found a solution, which makes sense as this doesn't trigger the screen saver (lock screen) with the bug.