Despite repeated searches I can't find anyone else reporting similar issues to me. My issue is that when I sleep my computer by closing the lid, sometimes when I open it again the screen is not locked. This is a bit of a security risk and it means that in order to guarantee my session is locked on sleep, I need to manually lock (e.g. Ctrl-Alt-L) before closing the laptop lid.
I can confirm that the computer is sleeping (i.e. I'm not mistaking the symptoms for a laptop that is failing to sleep: kernel and auth logs show lid close and open events; there is proof of sleep and wake in the logs; I can peek into the closed laptop to see that the power light and screen are off).
Furthermore I am quite confident that when I have manually locked the screen before closing the lid the screen is always locked on reopening (i.e. I don't believe the lock screen is 'dying' or failing).
My system is a Dell XPS 13 (2015 edition, 9343) running Ubuntu 16.04 LTS x64.
I really don't know what to do to investigate this and I'll gladly take any advice. I can't see any smoking gun when I compare the output of dmesg/kern.log/auth.logs/syslog between successful and unsuccessful sleep locks.
I'm really not an expert in Unity/Gnome so I'm not sure what process is responsible for the lock screen. I've seen it suggested that I should kill gnome-screensaver and run it in debug mode, however I can't see an instance of this running. When I attempt to run "gnome-screensaver --debug" under my session I get the message "WARNING **: screensaver already running in this session". I'm thinking that the advice might be out of date and that gnome-screensaver functionality has been absorbed by some other process.
So I'm currently at a loss, but very keen to solve this. Is anyone able to suggest what to try?
This problem also existed for me in 15.10, but I have not raised it until now in in case the new release fixed my issue. Sadly that did not make any difference. The 16.04 installation is fresh, not an upgrade. I cannot recall if I also experienced this in 15.04 or not.