Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-18 Thread Helge Hafting

Alejandro Bonilla Beeche wrote:


On Tue, 2005-08-16 at 23:44 -0400, Steven Rostedt wrote:
 


On Wed, 2005-08-17 at 13:29 +1000, Benjamin Herrenschmidt wrote:
   


On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:

 

(I'm blind and I use a braille display. I use those functions to blank 
my laptop's screen so people don't read it, and hopefully to conserve 
power.)
   


At the OLS I learned that the backlight of a laptop (when the screen is
black, but still glows) actually spends more wattage than when the
screen is lit.  So, unless you actually turn the laptop display off,
switching it to black will actually burn the battery quicker.
   



This sounds stupid. Who told you this? The actual brightness is the one
that consumes the most battery.
 


The backlight itself consume the same power wether the pixels are
transparent (white) or opaque (black).  The pixels themselves consume
more power when black in some kinds of screens - regardless of what
the backlight is doing.

So a black screen may waste power - because the backlight is still on
behind those black pixels.  Such a screen also get marginally hotter,
because wasted light from the backlight gets absorbed in black
pixels, but radiated into the room through white pixels.


If you want to save power:
1. turn the backlight off, if possible.  If there is no other way,
   close the lid and use an external keyboard.  Or jam the lid switch with
   something.  A good laptop should definitely have a way to turn it 
off though,

   for example if the user leaves the machine alone for a long while with
   the lid up.

2. For privacy (and power saving) blank all the pixels to white instead of
   black - _if_ it is a tft display.  There are of course designs where 
the

   white pixels use more power (all cases where light is produced in the
   pixels themselves, instead of relying on backlight.)  So there is no
   universal solution.


Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Antonino A. Daplas

Alejandro Bonilla Beeche wrote:

On Tue, 2005-08-16 at 23:44 -0400, Steven Rostedt wrote:

On Wed, 2005-08-17 at 13:29 +1000, Benjamin Herrenschmidt wrote:

On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:

(I'm blind and I use a braille display. I use those functions to blank 
my laptop's screen so people don't read it, and hopefully to conserve 
power.)

At the OLS I learned that the backlight of a laptop (when the screen is
black, but still glows) actually spends more wattage than when the
screen is lit.  So, unless you actually turn the laptop display off,
switching it to black will actually burn the battery quicker.


This sounds stupid. Who told you this? The actual brightness is the one
that consumes the most battery.

Seriously, who told you such thing?


In TFT displays, nontransmissive pixels consume more power than transmissive
pixels.  So a black background consumes more power than a white one. And
if you are using these ioctl's to blank the screen, it will default to
"normal blank" (if you don't set the vesa blanking mode first), which,
in vgacon or most of the fbdev's, will just turn the color palette to all
black.  So yes, you might be consuming more power with this method.

You're probably better off turning the brightness down, if you cannot turn
the backlight off. 


Tony

PS: I don't know the resulting power consumption if you use the vesa
blanking modes (TIOCL_SETVESABLANK) to blank while leaving the backlight on.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Steven Rostedt
On Tue, 2005-08-16 at 21:55 -0600, Alejandro Bonilla Beeche wrote:
> On Tue, 2005-08-16 at 23:44 -0400, Steven Rostedt wrote:
> > On Wed, 2005-08-17 at 13:29 +1000, Benjamin Herrenschmidt wrote:
> > > On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:
> > > 
> > > > (I'm blind and I use a braille display. I use those functions to blank 
> > > > my laptop's screen so people don't read it, and hopefully to conserve 
> > > > power.)
> > 
> > At the OLS I learned that the backlight of a laptop (when the screen is
> > black, but still glows) actually spends more wattage than when the
> > screen is lit.  So, unless you actually turn the laptop display off,
> > switching it to black will actually burn the battery quicker.
> 
> This sounds stupid. Who told you this? The actual brightness is the one
> that consumes the most battery.
> 
> Seriously, who told you such thing?
> 

It was one of the speakers during the presentation.  He seemed to know
what he was talking about, in fact, I was caught so off guard by the
statement, I got up and ask him the question again. "Did you say that
the backlight of the laptop takes up more energy than when it is on?"
and he replied "yes"!

I rememeber this being in room C (could be wrong, I went to so many
sessions).  Looking at the program, it could have been "Linux Power
Management" by Patrick Mochel. But I honestly don't remember which
session it was. (I'm CCing him to see if he can clear things up :-)

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Alejandro Bonilla Beeche
On Tue, 2005-08-16 at 23:44 -0400, Steven Rostedt wrote:
> On Wed, 2005-08-17 at 13:29 +1000, Benjamin Herrenschmidt wrote:
> > On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:
> > 
> > > (I'm blind and I use a braille display. I use those functions to blank 
> > > my laptop's screen so people don't read it, and hopefully to conserve 
> > > power.)
> 
> At the OLS I learned that the backlight of a laptop (when the screen is
> black, but still glows) actually spends more wattage than when the
> screen is lit.  So, unless you actually turn the laptop display off,
> switching it to black will actually burn the battery quicker.

This sounds stupid. Who told you this? The actual brightness is the one
that consumes the most battery.

Seriously, who told you such thing?

.Alejandro

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Benjamin Herrenschmidt
On Tue, 2005-08-16 at 23:44 -0400, Steven Rostedt wrote:
> On Wed, 2005-08-17 at 13:29 +1000, Benjamin Herrenschmidt wrote:
> > On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:
> > 
> > > (I'm blind and I use a braille display. I use those functions to blank 
> > > my laptop's screen so people don't read it, and hopefully to conserve 
> > > power.)
> 
> At the OLS I learned that the backlight of a laptop (when the screen is
> black, but still glows) actually spends more wattage than when the
> screen is lit.  So, unless you actually turn the laptop display off,
> switching it to black will actually burn the battery quicker.

Actually, it's not the backlight. The backlight definitely eats less
power when off. The panel itself, however, at least some of them afaik,
will use a bit more power for opaque pixels than for transparent pixels.

Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Jon Smirl
As an alternative to using VT IOCTLs you should be able to echo these
values to /sys/class/graphics/fb0/blank and blank the screen. The
attribute is pretty new so it hasn't had a lot of testing on the
various fbdev drivers.

#define VESA_NO_BLANKING0
#define VESA_VSYNC_SUSPEND  1
#define VESA_HSYNC_SUSPEND  2
#define VESA_POWERDOWN  3


On 8/16/05, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote:
> On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:
> 
> > (I'm blind and I use a braille display. I use those functions to blank
> > my laptop's screen so people don't read it, and hopefully to conserve
> > power.)
> 
> Oops ! I _am_not_ the one who is blind, though thanks a lot for some of
> the comments ;) I just forgot the line:
> 
> From: Stéphane Doyon <[EMAIL PROTECTED]>
> 
> (I'm still stuck to Signed-off-by only lines)
> 
> 
> Stephane is to congratulate for this fix.
> 
> Ben.
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Steven Rostedt
On Wed, 2005-08-17 at 13:29 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:
> 
> > (I'm blind and I use a braille display. I use those functions to blank 
> > my laptop's screen so people don't read it, and hopefully to conserve 
> > power.)

At the OLS I learned that the backlight of a laptop (when the screen is
black, but still glows) actually spends more wattage than when the
screen is lit.  So, unless you actually turn the laptop display off,
switching it to black will actually burn the battery quicker.

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Benjamin Herrenschmidt
On Wed, 2005-08-17 at 11:41 +1000, Benjamin Herrenschmidt wrote:

> (I'm blind and I use a braille display. I use those functions to blank 
> my laptop's screen so people don't read it, and hopefully to conserve 
> power.)

Oops ! I _am_not_ the one who is blind, though thanks a lot for some of
the comments ;) I just forgot the line:

From: Stéphane Doyon <[EMAIL PROTECTED]>

(I'm still stuck to Signed-off-by only lines)


Stephane is to congratulate for this fix.

Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] [Fwd: Console locking and blanking]

2005-08-16 Thread Benjamin Herrenschmidt
I've had WARN_CONSOLE_UNLOCKED warnings when calling TIOCLINUX 
TIOCL_BLANKSCREEN and TIOCL_UNBLANKSCREEN.

(I'm blind and I use a braille display. I use those functions to blank 
my laptop's screen so people don't read it, and hopefully to conserve 
power.)

The warnings are from these places:
do_blank_screen at drivers/char/vt.c:2754 (Not tainted)
save_screen at drivers/char/vt.c:575 (Not tainted)
do_unblank_screen at drivers/char/vt.c:2822 (Not tainted)
set_palette at drivers/char/vt.c:2908 (Not tainted)

At a glance I would think the following patch ought to fix that. Tested on 
one machine. Could you please tell me if this is correct and/or forward 
the patch where appropriate...

Signed-off-by: Stéphane Doyon <[EMAIL PROTECTED]>
Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>

--- linux-2.6.12/drivers/char/vt.c.orig 2005-08-16 15:39:14.0 -0400
+++ linux-2.6.12/drivers/char/vt.c  2005-08-16 15:41:04.0 -0400
@@ -2272,7 +2272,9 @@
ret = paste_selection(tty);
break;
case TIOCL_UNBLANKSCREEN:
+   acquire_console_sem();
unblank_screen();
+   release_console_sem();
break;
case TIOCL_SELLOADLUT:
ret = sel_loadlut(p);
@@ -2317,8 +2319,10 @@
}
break;
case TIOCL_BLANKSCREEN: /* until explicitly unblanked, not only 
poked */
+   acquire_console_sem();
ignore_poke = 1;
do_blank_screen(0);
+   release_console_sem();
break;
case TIOCL_BLANKEDSCREEN:
ret = console_blanked;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/