For locking the screen in ubuntu we don’t have to wait the screensaver to active, I prefer to activate manually, even I have to open the terminal windows first. I feel much better to control the locking.
here is the command
#gnome-screensaver-command –lock
source : here.