Lockscreen not working after update to 21.10

Open gedit, copy the following and paste it into gedit, save it as screensaver-autorun.sh in a place where you’re not gonna move it. Then in the menu search for ‘Startup Applications’, click add, give it a name and in ‘Command’ click ‘Browse’ and select screensaver-autorun.sh.

That should do it