I want to use an old laptop(Dell E5420) as a CentOS7 server in my home, so it is not required at all to operate it on the console, and certainly there is no X-server or other GUI on it.
When it is running, the screen(monitor) always emits some annoying light. I can not simply close the lid, because this will suspend the computer. To prevent it from suspending when the lid is closed, I configured the HandleLidSwitch option of the /etc/systemd/logind.conf to ="ignore". It works, that the system does not suspend when the lid is closed, but the back-light of the screen still is on, and very glaring especially at night.
It is not only annoying, but also consuming power and lifetime of the screen unnecessarily.
I tried "
setterm -blank 1 -powersave powerdown".
If I issue this command on the console, it works, but does not if through a remote ssh terminal("
setterm -blank 1 -powersave powerdown >> /dev/tty0" doesn't work also).
If I issue the command through a pseudo terminal(ssh), the result is "
setterm: cannot (un)set powersave mode: Inappropriate ioctl for device
My ultimate purpose is put this command into a startup script or a systemd.service that will run once the system has started.
My question is : Is there a way in it I can turn off the backlight of the screen without logging-in the console of the laptop?
Btw, I tried to install vbetool but failed, maybe I should use another repo of yum?
Thanks a lot! Sorry for my English, I'm a Chinese.