Intending to switch off the display/monitor/screen instantly (and only be reenabled upon keypress) I resort to this solution:
#!/bin/sh echo 1 > /sys/devices/pci0000:00/0000:00:02.0/graphics/fb0/blank read keypress chvt 2
#!/bin/sh openvt -s -f -c 40 /bin/blankvt
Having setup this I can simply call
blank on the command line and the
screen will go off and energy is saved. Great!
While this solution works right now, it appears hackish and brittle and what I seek is the correct way to achieve the same effect.
blank at the shell prompt should result in the screen to be turned off.
My question hence: how can I switch of the monitor "correctly"?
I am not connected to the electrical grid, conserving energy is paramount to me. I need to have the laptop/PC do some calculations but would desire to turn off the superflous energy consumption by the display (which seems a non neglectible consumer anyway).
Best if I could achieve this within:
- GNOME Shell 3.32.2.
- Linux 5.xx