I'm running Ubuntu 17.10 on VM.
In the guest I opened GNOME terminal, launched Aptitude with sudo aptitude
, then switched to the host machine to do some tasks.
When I returned to the Ubuntu guest it was showing this notification on lock screen:
Power
1 new notification
and after unlocking:
Automatic suspend
Computer will suspend very soon because of inactivity.
Just after unlocking Aptitude says that it can't download packages because the system is offline.
How can I disable this behavior?
The solution is to disable automatic suspend:
gnome-control-center power
)This will change settings from
to
Summary:
Setting->Power : Suspend: "off"
Or open a terminal, and execute the command:
Detailed:
Use the setting dialog "Power" and set the automatic suspension to "OFF". Sometimes the setting is not available in the setting-dialog; it is simply missing. (e.g. Only the screen-timeout is shown.)
Please use a terminal instead then.
Check the current setting with the command:
it should reply:
Please check if the key is writable:
it should reply:
Check the range:
it should reply:
And set the value (with single, double or no quote on "nothing") to your choice:
Check afterwards, if the setting has changed:
it should show your changes:
Hint: Please avoid to use sudo or a root shell, this will prohibit the access to the local settings.
Just to add that given the myriad versions of the GUI control centre that appear to be floating around (mine looks nothing like the one upthread) I found the easiest way to make this change was: