9

I'd like to leave my screen in a locked state, but without the machine being suspended. I need to have long computations running in the background while I go grab a coffee, while making sure no one around can access the machine.

Locking the screen also suspends the machine, which is not what I want. How do I lock my screen without suspending the machine?

This isn't quite a duplicate of this question, because I am not looking for how to disable suspend. @user535733 is right: it appears to be suspended, more so because I'm using GNOME Shell system-monitor, which looks like this after unlocking the screen:
this

Prior to 18.04, I was used to indicator-multiload, which remains active when the screen is locked/display is off. Which is why GNOME Shell system-monitor looked like the system was suspended. Leaving this up in case anyone else has the same confusion.

pomsky
  • 68,507
  • 2
    It may look like it's suspending the machine, becasue the screen flashes and goes dark...but that visual feedback is misleading. Run a test job for a minute or two and see for yourself. – user535733 Oct 25 '18 at 07:59

2 Answers2

9

When you lock your machine with Super+L it locks and turns off display then. It doesn't go to suspend state in that moment.

But it can suspend later according with your settings. To prevent suspending open Settings -> Power and turn off Automatic suspend "On Battery Power" and "Plugged in".

pomsky
  • 68,507
Snaker
  • 508
2

Answer by @Snaker explained pretty well that if you lock the screen, display is turned off automatically, but it doesn't suspend the system immediately.

Here's the explanation why the 'system-monitor' in GNOME shell looks like this after unlocking
enter image description here

'system-monitor' is a GNOME shell extension. As per GNOME's security policy, whenever you lock the screen or suspend, all the GNOME shell extensions get disabled automatically until you get back in, and then the extensions get re-enabled.

So while the screen is locked, system-monitor stops working and it gets reactivated once you unlock again. Thus it starts showing system status since the time of reactivation and doesn't show anything for the period your screen was locked.

pomsky
  • 68,507