Background
There are 2 solutions that were determined for this particular problem. The 1st involved launching xscreensaver
, and disabling it so that no screensaver is configured.
The 2nd method involved completely disabling the screensaver in X altogether, through the use of the xset
command.
Solution #1
A solution with a narrow scope (by cipricus) is that of adding a fourth step to those included in the answer.
- Install xscreensaver
- Remove gnome-screensaver
- Set Xscreensaver NOT to use any screensaver ('Disable screensaver')
Add xscreensaver in the startup programs list. The command to add is:
xscreensaver -no-splash
This solution was suggested by the fact that this message appeared when starting xscreensaver
before adding the fourth step:
Further instructions came from this source.
NOTE: To add a program to startup list in eOS, go to System Settings > Stertup Applications > Add
Solution #2
A solution with a wider scope by slm:
xset
Check to see what the xset
setting is for screen blanking as well. You can check using this command:
$ xset q
We're specifically interested in this section of the output from the above command:
$ xset q
...
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 600 cycle: 600
...
Disabling screensaver
You can change these settings like this:
$ xset s off
$ xset s noblank
Confirm by running xset q
again:
$ xset q
...
Screen Saver:
prefer blanking: no allow exposures: yes
timeout: 0 cycle: 600
...
DPMS
You might also need to disable power management as well, that's the DPMS settings in the xset q
output:
$ xset q
...
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Enabled
Monitor is On
...
Disable it like so:
$ xset -dpms
Confirm:
$ xset q
...
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Disabled
...
Re-enabling features
You can re-enable these features at any time with these commands
$ xset s blank # blanking screensaver
$ xset s 600 600 # five minute interval
$ xset +dpms # enable power management
Confirming changes:
$ xset q
...
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 600 cycle: 600
...
...
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Enabled
Monitor is On
...
Assuming the laptop's also plugged into external power; you'd also need to explicitly add the following to /etc/systemd/logind.conf:
HandleLidSwitchExternalPower=suspend
Per man logind.conf
HandleLidSwitchExternalPower= is completely ignored by default (for backwards compatibility) — an explicit value must be set before it will be used to determine behaviour.
If the system is inserted in a docking station, or if more than one display is connected, the action specified by HandleLidSwitchDocked= occurs; if the system is on external power the action (if any) specified by HandleLidSwitchExternalPower= occurs; otherwise the HandleLidSwitch= action occurs.
Best Answer
From this answer: https://superuser.com/questions/748482/how-to-suspend-from-lockscreen-in-gnome-3 , in your
/etc/systemd/logind.conf
change the line to:and then
sudo systemctl restart systemd-logind
to restart the service.