The screen in question is HDMI. The power off/on action is initiated by clicking on the on-screen capacitive button.

I just need to know if there is a way to get events like "now the screen is on", "now the screen is off/unplugged", "now the screen is in standby mode".

If at all possible, I would like to avoid timer-based approaches and to rely to events (however, a timer-based approach is still better than having no clue).


Try xset q to get DPMS settings. Seems to say things like 'Monitor is On'


  • That's unfortunately not working: I'm using Kodi through a framebuffer (RPi 2). I get xset: unable to open display "". Sorry for not specifying that before. – JohnW Dec 2 '15 at 20:12
  • By the way, specifying DISPLAY=0 or the like explicitly does not work either as Xorg is not even installed on the box. That said, Xorg gets its info from somewhere. If I knew what this "somewhere" was, that would work. – JohnW Dec 2 '15 at 20:17
  • Ah. ARM.I'd take a look at tvservice, vbetool and setterm as well. Or strace that xset and see what syscalls it does. Or look at the source. See: wiki.archlinux.org/index.php/… – Criveti Mihai Dec 2 '15 at 20:22
  • tvservice: that's how I can currently get the "screen turned on" event. vbetool: great hope, great disappointment (can just set DPMS, not read). setterm: same thing as vbetool but already disillusioned. :) – JohnW Dec 2 '15 at 20:58
  • BTW, I've already read all that has been cited (and much more). But except xset -q which works only with X, there is absolutely nothing about getting this kind of events. Only answers to the same tired (and unrelated) question: "doh, how can I turn off my screen from SW?". But this is not what I want. – JohnW Dec 2 '15 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.