How can I know whether the monitor is on or off if X
is not running, and without appealing to /proc/acpi/video
? The latter isn't available from my kernel.
If X
is running it's just a matter of
$ DISPLAY=:0 xset -q 2>/dev/null| grep "^\s*Monitor is"
But what if X
is not running?
Best Answer
Looking through this Q&A on StackOverflow titled: How to Determine if LCD Monitor is Turned on From Linux Command Line I found this utility called ddccontrol that says it can report if a monitor is turned on or off. You can check out the documentation for using version 0.4.
You can basically run this command:
If it returns any output, then the monitor is on, if it returns nothing the monitor is off.
References