As part of the on-going saga to find out why my (by-now-not-so-brand-new) server was repeatedly rebooting, I wanted to keep the monitor from “going to sleep”/going into power saving mode.
As per anything Linux-related, there was a myriad of mixed advice from the Internet, with some relevant and others not so.
The Shortcut
The simplest working solution I could find (that worked for me) required two “separate” actions:
- The first instructions I came across worked:
- But that only worked when logged in (i.e. the above setting was a per-user setting). The screen still blanked out when sitting on the log in page. Another search then led me to this solution… with but certain changes: as su (or using
sudo
):- in
/etc/lightdm/lightdm.conf.d/
create a file50-dpms.conf
, containing:
- in
[SeatDefaults] display-setup-script=/usr/local/bin/dpms-stop
-
- add root into the lightdm group*
usermod -a -G lightdm root
-
- in
/usr/local/bin/
create a filedpms-stop
, containing:
- in
#!/bin/sh /usr/bin/xset -dpms
-
- then make sure it is executable and owned by root:
chown root:root /usr/local/bin/dpms-stop
chmod u=rwx,go=rx /usr/local/bin/dpms-stop