In I had the problem, that locking the screen would just not work any more. It turned out that gnome-screensaver must be perpetualy runnung in the background in order to be able to lock the screen.

Also this would affect the computer not locking the screen when suspending.

It might be that Gnome/Ubuntu are user-friendly, however the bloat is starting to annoy me. Why do I need to be running 214 processes, when the only thing that is actually being used is firefox and a terminal? Why do I need a process (gnome-screensaver) that is using up CPU cycles and virtual memory, when it’s actually never doing anything useful?

Thus I purged gnome-screensaver (8MB) and installed i3lock.

There are three things missing:

​1) Make the laptop lock the screen when suspending:

​2) Add it to the panel:

​3) integrate it into package management, so that I don’t accidentaly remove packages on which the screen locking depends:

Of course, it’s a hack. However it works and is easy to adapt. Let me know at tpo at in case you get to make it more generic.

That’s it. Saved runtime bloat. Saved disk space (i3lock is 60K large).