Yes, there is a way. You can manage scripts which are run after/before suspend/hibernation (etc/pm/sleep.d/
). To make your computer load login screen (just before) suspend/hibernation just do the following:
Execute these commands in terminal:
sudo touch /etc/pm/sleep.d/99-login-screen.sh
gksu gedit /etc/pm/sleep.d/99-login-screen.sh
Paste this into file:
#!/bin/bash
case "$1" in
hibernate|suspend)
gdbus call --system --dest org.freedesktop.DisplayManager --object-path /org/freedesktop/DisplayManager/Seat0 --method org.freedesktop.DisplayManager.Seat.SwitchToGreeter
;;
esac
exit $?
and save it. Now try to suspend and resume your system :) [I tested it on ubuntu 12.04.02 LTS]