Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to query the power status of an Xorg/X11 display from command line? I want to know if my laptop LCD is powered on after the screen saver--apparently the backlight is still on. This is despite my gnome-screensaver-preferences setting that after 5 minutes of idling, the display is supposed to go to sleep. I am using Debian 6 and whatever x server comes with it.

I see that upower utility has some nifty switches, but they are not documented.

share|improve this question
add comment

1 Answer

To test whether your monitor is on or off you can use

$ xset q | grep Monitor
Monitor is On

In order to determine the brightness of your LCD backlight you can run

$ xbacklight
70.000000
share|improve this answer
    
The xset that comes with Debian 6 (or more recent Fedora 18 for that matter) does not show monitor status like yours. Which distro is it? The xbacklight utility is good to know (despite not doing/showing what I wanted). Thank you though. –  Wirawan Purwanto May 20 '13 at 18:27
    
I'm using Ubuntu 13.04 (is based on Debian) with the proprietary nvidia driver. Maybe it's a driver capability. –  Stefan Endrullis May 21 '13 at 16:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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