Bug 10285 - backlight is gone in X after closing/reopening the lid
Summary: backlight is gone in X after closing/reopening the lid
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: ACPI
Classification: Unclassified
Component: EC (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-19 15:20 UTC by Pavel Machek
Modified: 2008-10-17 14:40 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.25-rc6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Pavel Machek 2008-03-19 15:20:03 UTC
Latest working kernel version: 2.6.25-rc5
Earliest failing kernel version: 2.6.25-rc6

HW: Thinkpad X60
Steps to reproduce:

start X, close lid, reopen it, backlight flashes and then it is gone... making machine unusable until X are exited.

This revert of 9832 fixes it:

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 7222a18..caf873c 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -943,7 +943,11 @@ int __init acpi_ec_ecdt_probe(void)
                boot_ec->command_addr = ecdt_ptr->control.address;
                boot_ec->data_addr = ecdt_ptr->data.address;
                boot_ec->gpe = ecdt_ptr->gpe;
-               boot_ec->handle = ACPI_ROOT_OBJECT;
+               if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
+                               &boot_ec->handle))) {
+                       pr_info("Failed to locate handle for boot EC\n");
+                       boot_ec->handle = ACPI_ROOT_OBJECT;
+               }
        } else {
                /* This workaround is needed only on some broken machines,
                 * which require early EC, but fail to provide ECDT */
Comment 1 Rafael J. Wysocki 2008-03-19 15:27:26 UTC
This entry is being used for tracking a regression from 2.6.24.  Please don't
close it until the problem is fixed in the mainline.
Comment 2 Anonymous Emailer 2008-03-19 15:31:29 UTC
Reply-To: akpm@linux-foundation.org

On Wed, 19 Mar 2008 15:20:03 -0700 (PDT)
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=10285
> 
>            Summary: backlight is gone in X after closing/reopening the lid
>            Product: ACPI
>            Version: 2.5
>      KernelVersion: 2.6.25-rc6
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Power-Video
>         AssignedTo: acpi_power-video@kernel-bugs.osdl.org
>         ReportedBy: pavel@suse.cz
> OtherBugsDependingO 9832
>              nThis:
>         Regression: 1
> 
> 
> Latest working kernel version: 2.6.25-rc5
> Earliest failing kernel version: 2.6.25-rc6
> 
> HW: Thinkpad X60
> Steps to reproduce:
> 
> start X, close lid, reopen it, backlight flashes and then it is gone...
> making
> machine unusable until X are exited.
> 
> This revert of 9832 fixes it:

You mean "this revert of 4af8e10a6c57e7292862bd1703712f0565c7e429"

> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index 7222a18..caf873c 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -943,7 +943,11 @@ int __init acpi_ec_ecdt_probe(void)
>                 boot_ec->command_addr = ecdt_ptr->control.address;
>                 boot_ec->data_addr = ecdt_ptr->data.address;
>                 boot_ec->gpe = ecdt_ptr->gpe;
> -               boot_ec->handle = ACPI_ROOT_OBJECT;
> +               if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
> +                               &boot_ec->handle))) {
> +                       pr_info("Failed to locate handle for boot EC\n");
> +                       boot_ec->handle = ACPI_ROOT_OBJECT;
> +               }
>         } else {
>                 /* This workaround is needed only on some broken machines,
>                  * which require early EC, but fail to provide ECDT */
> 

But the patch which you're reverting is itself a revert of
Alexey's 208c70a45624400fafd7511b96bc426bf01f8f5e.

We seem to be stuck.  I think we'd generally prefer the current state:
leave http://bugzilla.kernel.org/show_bug.cgi?id=9916 unfixed.

But it's all rather confusing.  
Comment 3 Pavel Machek 2008-03-20 00:01:02 UTC
I'd certainly prefer #9916 unfixed over #10285.
Comment 4 Rafael J. Wysocki 2008-03-20 12:56:06 UTC
References : http://lkml.org/lkml/2008/3/20/127

Pavel said:

"I tried to do bisect, but it looks like the X-and-lid-close/open  problem is present in 2.6.24, too."
Comment 5 Anonymous Emailer 2008-03-20 13:53:38 UTC
Reply-To: pavel@ucw.cz

Hi!

> You mean "this revert of 4af8e10a6c57e7292862bd1703712f0565c7e429"
> 
> > diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> > index 7222a18..caf873c 100644
> > --- a/drivers/acpi/ec.c
> > +++ b/drivers/acpi/ec.c
> > @@ -943,7 +943,11 @@ int __init acpi_ec_ecdt_probe(void)
> >                 boot_ec->command_addr = ecdt_ptr->control.address;
> >                 boot_ec->data_addr = ecdt_ptr->data.address;
> >                 boot_ec->gpe = ecdt_ptr->gpe;
> > -               boot_ec->handle = ACPI_ROOT_OBJECT;
> > +               if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
> > +                               &boot_ec->handle))) {
> > +                       pr_info("Failed to locate handle for boot EC\n");
> > +                       boot_ec->handle = ACPI_ROOT_OBJECT;
> > +               }
> >         } else {
> >                 /* This workaround is needed only on some broken machines,
> >                  * which require early EC, but fail to provide ECDT */
> > 
> 
> But the patch which you're reverting is itself a revert of
> Alexey's 208c70a45624400fafd7511b96bc426bf01f8f5e.

I tried to seek to 

commit e760e716d47b48caf98da348368fd41b4a9b9e7e
tree 92d401fdbc618a4bdf4afe7ae5ee509e09dda0e6
parent b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0
parent 99109301d103fbf0de43fc5a580a406c12a501e0
author Linus Torvalds <torvalds@woody.linux-foundation.org> Wed, 13
Feb 2008 16:23:44 -0800
committer Linus Torvalds <torvalds@woody.linux-foundation.org> Wed, 13
Feb 2008 16:23:44 -0800

    Merge
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

    *
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

...which should before alexey's 208c7... and the X problem is there,
too.

									Pavel
Comment 6 Pavel Machek 2008-03-20 14:46:49 UTC
CONFIG_ACPI_VIDEO=n fixes it. This is how my bisect log looked like, but as rjw mentioned, it is useless: It was in 2.6.24, too, but only with CONFIG_ACPI_VIDEO set. Stupid me for not noticing that earlier.

git-bisect start
# bad: [e760e716d47b48caf98da348368fd41b4a9b9e7e] Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
git-bisect bad e760e716d47b48caf98da348368fd41b4a9b9e7e
# good: [49914084e797530d9baaf51df9eda77babc98fa8] Linux 2.6.24
git-bisect good 49914084e797530d9baaf51df9eda77babc98fa8
# bad: [f8c2ee224d8397364835204c6c0130d08c2e644c] x86: unify fault_32|64.c with ifdefs
git-bisect bad f8c2ee224d8397364835204c6c0130d08c2e644c
# bad: [f8c2ee224d8397364835204c6c0130d08c2e644c] x86: unify fault_32|64.c with ifdefs
git-bisect bad f8c2ee224d8397364835204c6c0130d08c2e644c
# bad: [f8c2ee224d8397364835204c6c0130d08c2e644c] x86: unify fault_32|64.c with ifdefs
git-bisect bad f8c2ee224d8397364835204c6c0130d08c2e644c
# bad: [f8c2ee224d8397364835204c6c0130d08c2e644c] x86: unify fault_32|64.c with ifdefs
git-bisect bad f8c2ee224d8397364835204c6c0130d08c2e644c
# bad: [1a2b441231ddc12b785940000320894bfa02bd82] x86: fix early_ioremap() on 64-bit
git-bisect bad 1a2b441231ddc12b785940000320894bfa02bd82
# bad: [b02aae9cf52956dfe1bec73f77f81a3d05d3902b] x86: provide a DMI based port 0x80 I/O delay override.
git-bisect bad b02aae9cf52956dfe1bec73f77f81a3d05d3902b
# bad: [f5eaa323eb6819d2f737ead42464efccaf2b98b9] kconfig: tristate choices with mixed tristate and boolean values
git-bisect bad f5eaa323eb6819d2f737ead42464efccaf2b98b9
# bad: [9c09a95cf431fcf5720f2e408befa24b32b8cf4d] slab: partially revert list3 changes
git-bisect bad 9c09a95cf431fcf5720f2e408befa24b32b8cf4d

It is still a regression from 2.6.25-rc5, but not regression from 2.6.24.
Comment 7 Zhang Rui 2008-03-21 00:04:58 UTC
(In reply to comment #6)
> CONFIG_ACPI_VIDEO=n fixes it. 
with ACPI video driver loaded, can you change the backlight via the /sys/class/backlight/... after closing/opening the lid?
Comment 8 Anonymous Emailer 2008-03-21 04:08:43 UTC
Reply-To: pavel@ucw.cz

Hi!

> (In reply to comment #6)
> > CONFIG_ACPI_VIDEO=n fixes it. 
> with ACPI video driver loaded, can you change the backlight via the
> /sys/class/backlight/... after closing/opening the lid?

I'll test that.

I can hit fn-home to set backlight by hotkey (with ACPI_VIDEO=y), and
it helps sometimes.
									Pavel
Comment 9 Len Brown 2008-03-26 23:28:29 UTC
clearing the regression flag, since per comment #6,
this failed in 2.6.24 also.
Comment 10 Zhang Rui 2008-05-05 23:48:46 UTC
Hi, Pavel,
Any updates on this?
does this still exist in the latest kernel release?
does the backlight sysfs I/F work for you?
does hotkey work for you?

Note You need to log in before you can comment on or make changes to this bug.