LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 11-13-2004, 09:32 PM   #1
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
How to get LCD monitor backlight OFF with xlock


I did a search here and couldn't find this specific issue.

I would like for my desktop computer LCD monitor's backlight to turn off (the monitor is Energy Star compliant) when I initiate xlock. Sometimes it does; most often it doesn't. I've tried turning acpi and acpid on and that doesn't appear to make any difference. I run xlock with the "blank" option, just a black screen. But it's a "painted" black; you can still see the backlight on, and the power LED on the monitor remains green. When the backlight turns off, the power LED turns amber.

I have the monitor set to go to standby after ten minutes in the BIOS. Sometimes it does but more often it doesn't. Under version 9.2 Mandrake, it almost always went truly black after ten minutes. When I moved to 10.1 the other day, I started noticing the monitor backlight stayed on all the time, with rare unpredictable exceptions.

I'd just as soon leave the hard drives spinning all the time as I think it's worse for them to power up repeatedly than to go all the time. But the monitor backlight might as well be turned off when I'm away from the computer.
 
Old 11-13-2004, 09:55 PM   #2
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
I believe your laptop must support either APM or ACPI and ACPI must be enabled in the kernel, otherwise it will not work...

Anyway enable DPMS

e.g.

xset +dpms

then

xset dpms force off

should shut off the display.

Once dpms is enabled after a boot up, KDE's own display management should also shut off the display.
 
Old 11-13-2004, 10:31 PM   #3
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Original Poster
Rep: Reputation: 47
It's a desktop machine, but I'll try it anyway. Always seemed funny to me that power management is aimed more at laptops than desktops--because of the finicky batteries, I suppose. (I've had a succession of outmoded laptops.)

We'll give 'er a try, and if you never see me post again, you'll know it's because the monitor went off and won't come back on and I can't afford a new one.
 
Old 11-13-2004, 10:37 PM   #4
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Original Poster
Rep: Reputation: 47
Hey, that worked!

Since I don't use KDE (I just use IceWM), I'll put the command "xset dpms force off" in the little script I use to call up xlock. That ought to do just fine. I'll also put "xset +dpms" in my .xinitrc file so it will be ready to go.

Thanks, opjose!

Edit, a little later: That proved to be iffy, but I found a solution that does work, by...ahem...reading the xlock man page.

This works for my desktop computer:

xlock -dpmsoff 3

The "3" is supposed to represent seconds; in actual practice it turns out on my system to be thirty seconds, which is fine.

A value of "0" is said to be "infinite," whatever that means---I think I would have to wait an infinite length of time for the monitor to go into "off" condition. Not desirable.

I tried a value of "1" and it still took 30 seconds.

But it works.


Last edited by jonr; 11-13-2004 at 10:58 PM.
 
Old 11-13-2004, 11:17 PM   #5
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Quote:
Originally posted by jonr

We'll give 'er a try, and if you never see me post again, you'll know it's because the monitor went off and won't come back on and I can't afford a new one.
ROTFL!
 
Old 11-13-2004, 11:49 PM   #6
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Original Poster
Rep: Reputation: 47
This is a good example of asking a question, getting a good answer, it turns out not quite to fit your setup, but the answer contains clues that enable you to investigate further, and in the process you not only learn something new, but you may even find the solution to your problem.

I don't know where I'd be without LinuxQuestions. (And Google.) Would I even be using a computer? Possibly not. Long live these great resources and the generous people who post here.
 
Old 06-24-2009, 10:59 AM   #7
Andrew4096
LQ Newbie
 
Registered: Jun 2009
Location: near San Jose, California
Distribution: Ubuntu 10.04.1 LTS "Lucid Lynx"
Posts: 11

Rep: Reputation: 0
Cool Works with the mouse, too

I created a custom launcher on the Gnome panel containing the command "xlock -dpmsoff 1". One click with the mouse does it. It displays a random screen saver effect for ten seconds and then the screen goes completely dark. When I touch the mouse or press a key, a login screen appears, requiring my user password to restore the Gnome GUI screen.

To get xlock to work, I first had to install David A. Bagley's xlockmore on Ubuntu 8.10, which was very easy:

sudo apt-get install xlockmore

Another way to achieve this result is with Brightside. It works great for an aging Fry's Electronics "Great Quality" RX-7335 laptop I have in the bedroom. I have it set up so that when I move the mouse cursor to the upper left corner it quickly starts the screensaver -- a blank display in my case -- but this doesn't shut off the LCD backlight immediately; in fact, the backlight only goes off after about 30 minutes, according to the power management rules. When I want to go to sleep, I want it dark now, so I defined the lower left corner of the screen as "Enter DPMS off mode" and I don't have to put up with the LCD backlight bleed-through. By the time my head hits the pillow, the room is completely dark, except for a couple of power status LEDs on the machine and my digital alarm clock.

Update: That GQ RX-7335 laptop is history now, but Brightside continues to work well for me on a Shuttle XPC box with AMD Athlon CPU and nVidia GeForce graphics card, running Ubuntu 10.04.01 LTS. Unfortunately, Brightside isn't keeping up with the changing .deb package installation model, as it puts its icons in the wrong place under /usr and doesn't create launchers in Gnome 2.30.2. A bit of manual tweaking is needed to make it conveniently accessible from the panel menu. If you're lost, you can type brightside-config at the prompt in a terminal window to bring up the configuration dialog box. You should also add /usr/bin/brightside to the startup applications so it's available every time you start the system, as Brightside's current installer doesn't do that for you. Running brightside-config starts up Brightside if it isn't already running.

Last edited by Andrew4096; 12-31-2010 at 12:24 PM. Reason: moved to different system
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New LCD Monitor lordshipmayhem Linux - Hardware 1 04-10-2005 03:27 PM
LCD -monitor rogk Linux - Hardware 5 03-08-2005 03:19 PM
LCD monitor objorkum Linux - Software 1 12-26-2004 12:55 PM
LCD backlight does not turn off on console (acer travelmate 291LMi) zen_guerrilla Linux - Laptop and Netbook 0 07-16-2004 11:49 AM
Xlock / Xlock more with enterprise authentication yasir15 Linux - Software 0 04-20-2004 11:47 AM


All times are GMT -5. The time now is 01:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration