turn off laptop LCD monitor
November 12th, 2006 mysurface Posted in cat, Misc, X11, xset | Hits: 105035 | 38 Comments »
In order to save power, I often turn off my LCD monitor when I away from keyboard for long. Bare in mind, blank screen is not consider turn off the monitor, because it still uses backlight. To do that, first you need to make sure you have ACPI enabled in your kernel.
cat /proc/acpi/info
If this exist, then you can turn off the monitor by running the command line bellow.
xset dpms force off
xset is a util for setting property of X, dpms force off is to turn off the backlight.
What if I want to set it so that it can be done automatically? Check out xscreensaver at advance tab, there are power management where your can set the duration of getting idle it turns off the backlight. Another alternative you can do is to edit your xorg.conf. Check out this gentoo wiki and mini-HowTo for more information.







November 13th, 2006 at 12:35 am
[…] Du kan læse mere her […]
December 1st, 2006 at 3:08 pm
this doesn’t work
December 2nd, 2006 at 12:25 am
Well, It is either your ACPI is disabled at your kernel or your kernel do not support that at all. It works under linux kernel 2.6.14.
Check again, and good luck.
December 3rd, 2006 at 2:21 am
this blanks my screen, but doesn’t actually turn
the monitor off. Is there some trick to actually
get it to power off?
By the way, it monitor is an X2GEN LCD tv, so
I don’t know if there are some limitations with
those.
December 3rd, 2006 at 3:03 am
A lots of possibilities and uncertainties, depends on what linux kernel you are running, and whether the kernel is compiled with enable ACPI support or not.
It might be also happen when some programs also did call ACPI functions. Which it happens to me when I switch off the backlight, will be do the blank screen instead, due to xscreensaver is running at the backgroup process. I kill the xscreensaver, and still X windows by default do call some ACPI functions.
You can read the references I post, It do help to make you understand how ACPI works on linux. Wish you good luck, if you find the solution, please do not hesitate to share with us, might be a lots of us have the same problem you are facing now.
January 11th, 2007 at 9:56 pm
works great for me, once i emerged xset. i’m running gentoo, linux smp 2.1.18-r6 and my LCD is an Apple CinemaHD 23″
thanks for the info and good work.
September 25th, 2007 at 7:15 am
Works well thanks a lot
To power on the screen, just move the mouse and wait for a while..
February 14th, 2008 at 10:16 am
Hi,
Thank you for this tip, now how can I make a bat. file and place it on my desktop?
Or even create a hot key for ths?
March 4th, 2008 at 5:24 am
Works good for me too. ive searching how do this for some time..
May 15th, 2008 at 2:03 pm
[…] […]
August 4th, 2008 at 6:15 am
Thanks man! That was a cool trick! :)
August 5th, 2008 at 6:32 am
Exactly what I was looking for. Really, you don’t have to waste energy while waiting for a file operation to finish.
September 15th, 2008 at 6:28 am
Thanks a lot dude ..my NB has a exhaustion exit under the screen so close it generate heat on the screen.”I Like to sleep and hear music, but set the screensaver to shutdown the screen every time sucks”
Shortcut on the KeyBoard
installing:
$ apt-get install xbindkeys xbinkeys-config
create default file:
$ xbindkeys –defaults > ~/.xbindkeysrc
to start the daemon:
$ xbindkeys &
to configure the app:
$xbindkeys-config
add the command in the session initialization
$gnome-session-properties
xbindkeys
see ya
February 4th, 2009 at 3:00 am
Hey,
This is a really neat trick. I just created a custom launcher and put in on my panel. All I need to do now to switch off the screen is to click on the launcher. Helps me save a lot of battery. Just like fabioxxxx above, I like to sleep listening to music and there is no point in keeping the monitor on if you don’t need it right?
Thanx a lot dude!!! Really…. :-)
July 26th, 2009 at 6:37 am
tnxXx!!
I installed pommed on my gentoo box to get my MPB keyboard features back on GNU/Linux.
The only thing I missed is How to turn off monitor just like OS X??
Now I assigned this useful command to F12 key in ccsm.
But I’m wondering how to assign it for example to fn+F3 key??
tnxXx again!!
May 2nd, 2010 at 5:38 pm
Works like a charm.
Many thanks.
I made a custom application launcher for this in the panel so I can turn off the screens by clicking on the butoon when I go away from my rig. I had been looking for something like this for a long time.
June 30th, 2010 at 2:56 pm
Works great to me (Kubuntu 10.10 64 bits)
I created a new entry in Kmenu and assigned a global shotcut (ctrl+alt+down). It’s lovely. I was wondering if was possible to keep the screen turned off even if I use the computer. Maybe this sound strange but I can explain. I like to study listening music and like any other NB these days, my NB has multimedia keys and if I change the music the display will turn on again.
That way is right now is great, but f I could assign a hotkey to shutdown (like is already now) and another one to turn on would be just perfect.
This is the only thing I miss from the old crap desk computers… a screen power switch. =] Thank you again.
June 30th, 2010 at 2:58 pm
Just one correction: Kubuntu 10.04 64 bits.
=]
July 5th, 2010 at 6:39 pm
Hi,
works great on Lucid. I just added it to the \’Keyboard Shortcuts\’ and associated it with the ThinkVantage key
July 18th, 2010 at 5:20 pm
Works on command line. Would like to connect it to standard screensavers.
eeePC 901, Ubuntu 10.04 UNR run as Gnome.
August 20th, 2010 at 3:08 am
i love you!
the screen turns on after a click on ubuntu 10.04!
September 10th, 2010 at 12:00 am
This disables every monitor that is connected, till the keypress or whatever. I was looking for the way to turn the given output screen cause i have netbook and a big 24′ samsung connected to it. I’ve found the way to do it. I am using UNR os, and there is a program called xrandr.
Calling xrandr it bumps out every (connected or not) output, name, current resolution and so on. Then I call “xrandr –output OutputName –off” and it done! In my case OutputName was LVDS1. With this program you can also change the resolution by –mode option, see the manual pages for more info, I hope it helped who was in the simmilar situation:)
November 26th, 2010 at 11:55 am
it switches off my display then switches on it back,donno why?
March 15th, 2011 at 4:56 am
The new Zune browser is surprisingly good, but not as good as the iPod’s. It works well, but isn’t as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that’s not an issue, but if you’re planning to browse the web alot from your PMP then the iPod’s larger screen and better browser may be important. nhl jerseys
May 15th, 2011 at 12:04 am
Thanks a bunch for sharing this with all of us you actually know what you’re talking about! Bookmarked. Kindly also visit my website =). We could have a link exchange contract between us!
May 19th, 2011 at 2:36 am
Thank you so much for giving everyone a very brilliant chance to discover important secrets from this site. It is often very lovely plus stuffed with fun for me and my office fellow workers to search your blog not less than three times in one week to learn the newest stuff you have. And of course, I am just certainly contented with your outstanding secrets you give. Some 4 areas in this posting are truly the finest we have had.
November 2nd, 2011 at 4:23 am
This doesnt work for me, I get
xset: unable to open display “”
This is maybe because I dont have X!
Its a server only, running on a laptop, but I still want to turn the backlight off!
January 6th, 2012 at 6:12 am
thanks! :) works great on Fedora 16 with Gnome3 (on a compaq cq61), even though I don’t have /proc/acpi/info:
ls -la /proc/acpi/
total 0
dr-xr-xr-x 5 root root 0 Jan 5 23:09 .
dr-xr-xr-x 198 root root 0 Jan 5 22:56 ..
dr-xr-xr-x 3 root root 0 Jan 5 23:09 ac_adapter
dr-xr-xr-x 3 root root 0 Jan 5 23:09 battery
dr-xr-xr-x 3 root root 0 Jan 5 23:09 button
-rw-r–r– 1 root root 0 Jan 5 23:09 wakeup
btw, that xrandr thing seems to crash gnome3 :(
it turned off the display, but it wouldn’t come back after
“xrandr –output LVDS –off”
June 17th, 2013 at 2:00 am
[…] turn off laptop LCD monitor In order to save power, I often turn off my LCD monitor when I away from keyboard for long. Bare in mind, blank screen i… […]
July 9th, 2014 at 3:40 am
“Hey! Someone in my Facebook group shared this site with us so I
came to look it over. I’m definitely enjoying the information. I’m
bookmarking and will be tweeting this to my followers! Exceptional blog and
superb design and style.Here is my site; Snoring during pregnancy”
August 6th, 2014 at 4:41 pm
Today, I went to the beach front with my kids. I found a
sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell
to her ear and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is totally off topic but I had to tell someone!
December 10th, 2014 at 6:06 am
This piece of writing is truly a fastidious one it helps new web people, who
are wishing in favor of blogging.
December 13th, 2014 at 8:25 am
very nice
January 25th, 2015 at 5:45 pm
My spouse and I stumbled over here different page and thought I might check things out.
I like what I see so now i am following you. Look forward to looking at your web page repeatedly.
web site (Alethea)
February 23rd, 2015 at 7:34 pm
Thanks, worked as a charm with
xset dpms force standby
Even if the cat-command does not give results!
September 1st, 2015 at 2:35 am
Hey awesome site! Man. Exceptional. Excellent. I’m going to book mark your blog in addition to use the feeds likewise? Now i am pleased to find loads of handy information below inside the set up, we’d like work out additional practices labels on homeopathic products, thanks for expressing reparatii calculatoare.
April 30th, 2017 at 3:50 am
My brother suggested I might like this web site. He used to be entirely right.
This put up actually made my day. You can not consider simply how so much time I had spent
for this information! Thanks!
September 13th, 2017 at 9:47 am
I had a problem with
xset dpms force off
The screen sometimes came on after a few seconds.
I searched the net and found the following script on
http://news.softpedia.com/news/Easily-Turn-Off-LCDs-With-a-Shortcut-Key-in-Ubuntu-223343.shtml
But I had to make a small change to it(see below).
———– script requires Python ———
#!/usr/bin/python
import time
import subprocess
from Xlib import X
from Xlib.display import Display
display = Display(‘:0’)
root = display.screen().root
root.grab_pointer(True,
X.ButtonPressMask | X.ButtonReleaseMask | X.PointerMotionMask,
X.GrabModeAsync, X.GrabModeAsync, 0, 0, X.CurrentTime)
root.grab_keyboard(True,
X.GrabModeAsync, X.GrabModeAsync, X.CurrentTime)
subprocess.call(‘xset dpms force off’.split())
#original
#p = subprocess.Popen(‘gnome-screensaver-command -a’.split())
#changed
#p = subprocess.Popen(‘xset dpms force off’.split())
time.sleep(1)
while True:
print display.next_event()
p.terminate()
break