LKML Archive on
help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <>
To: Richard Purdie <>
Cc: Alex Romosan <>,
	Yaroslav Halchenko <>,
	Andrew Morton <>,,,
	James Simmons <>
Subject: Re: no backlight on radeon after recent kernel "upgrade"s
Date: Thu, 22 Feb 2007 00:13:56 -0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <1172106616.5790.90.camel@localhost.localdomain>

On Thu, 22 Feb 2007, Richard Purdie wrote:
> The following sequence is reproducible:
> echo 7 > brightness (repeat until actual_brightness reads 7)
> echo 0 > brightness (brightness reads 0, actual_brightness reads 4)
> echo 0 > brightness (brightness reads 0, actual_brightness reads 0)

As I said, it works fine on 2.6.20 on the hardware I have.  I will see if I
can test on 2.6.21, but it is something non-trivial for me to do right now.

> I suspect this is interference from software on the machine as it does
> show an onscreen display when I change the values in sysfs and the

Yes, I am using something like that here too, and it doesn't break anything.

> values on the OSD don't match what's really going on.  The
> actual_brightness does match the screen.

So something is screwing with what gets written to the EC, and it does it
AFTER ibm-acpi started processing the brightness change request.

actual_brightness asks the *EC* what the current brightness value is, so it
will never be wrong on a new-enough ThinkPad.

> I guess this just means we need to get userspace to agree on one method
> of access for this kind of thing. It makes me wondering where the
> hardware brightness keys fit into things though...

For ThinkPads:

The Golden Rule: never talk to the EC or write to firmware-command-space in
the CMOS NVRAM in userspace.  If you do, bad things could happen and it is
your fault.

Here's how brightness control works in ThinkPads:

0. Brightness and backlight on/off state are decoupled.  Turning the
backlight on or off is done through DPMS or something else video-card
specific.  Newer models shut the backlight off by EC firmware (or maybe even
on hardware) when the lid is closed, too.

1. The thinkpad does everything brightness-related in firmware (EC+BIOS).
If you keep your hands off, it works correctly on every O.S.

2. The brightness up key exports hotkey events (all models) and a brightness
up ACPI event (*60 and newer thinkpads, with 2.x BIOS).  It is a bad idea to
use those events to change the backlight brightness, because the firmware
will be doing just that too.

3. It doesn't export anything for brightness down.  You find it happened
snooping the CMOS nvram.

4. Ibm-acpi doesn't care about the ACPI events much, it just asks the EC
what the brightness level is when it needs to do something, then it issues
both CMOS commands and EC writes to make damn sure the level is changed.
The CMOS commands are step-style, so to go from 4 to 7, you issue 3x
brightness up.

> > Well, if you have the ACPI video module loaded, unload it.  Does it work
> > now?
> No change if unloaded.

I am out of ideas. But blacklist that module on your ThinkPad, it just gets
in the way, even if you are not using ibm-acpi.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2007-02-22  2:14 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-19  4:46 Yaroslav Halchenko
2007-02-19  8:04 ` Andrew Morton
2007-02-19  9:19   ` Richard Purdie
2007-02-21  5:56     ` Yaroslav Halchenko
2007-02-22  0:34       ` Richard Purdie
2007-02-22  1:07         ` James Simmons
2007-02-22  9:46           ` Richard Purdie
2007-02-22 15:18             ` James Simmons
2007-02-22  1:11       ` [Linux-fbdev-devel] " James Simmons
2007-02-22  2:09         ` Joel Becker
2007-02-22 15:55           ` James Simmons
2007-02-22 17:28             ` David Miller
2007-02-28 16:55               ` James Simmons
2007-03-01 10:57                 ` Richard Purdie
2007-03-01 21:08                   ` James Simmons
2007-02-21 22:18     ` Alex Romosan
2007-02-21 22:41       ` Richard Purdie
2007-02-21 23:17         ` Henrique de Moraes Holschuh
2007-02-22  0:12           ` Richard Purdie
2007-02-22  0:51             ` Henrique de Moraes Holschuh
2007-02-22  1:10               ` Richard Purdie
2007-02-22  2:13                 ` Henrique de Moraes Holschuh [this message]
2007-02-22  1:10               ` Henrique de Moraes Holschuh
2007-02-22  1:16                 ` ACPI: ibm-acpi: fix initial status of backlight device Henrique de Moraes Holschuh
2007-02-22 10:03                   ` Richard Purdie
2007-02-22 14:45                     ` Henrique de Moraes Holschuh
2007-02-22 18:19                       ` Henrique de Moraes Holschuh
2007-02-22 10:00                 ` no backlight on radeon after recent kernel "upgrade"s Richard Purdie
2007-02-22 14:56                   ` Henrique de Moraes Holschuh
2007-02-22 15:19                     ` Richard Purdie
2007-02-22 16:00                       ` James Simmons
2007-02-22 16:34                       ` Henrique de Moraes Holschuh
2007-02-22 17:08                         ` Richard Purdie
2007-02-21 23:51         ` Alex Romosan
2007-02-22  1:13           ` James Simmons
2007-02-22  9:56             ` Richard Purdie
2007-02-22 14:38               ` Henrique de Moraes Holschuh
2007-02-22  4:03         ` Alex Romosan
2007-02-22  4:58         ` Alex Romosan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: no backlight on radeon after recent kernel "upgrade"s' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).