Random reaction to brightness hotkeys

Bug #376924 reported by phcoder
48
This bug affects 4 people
Affects Status Importance Assigned to Milestone
acpi
Fix Released
Medium
acpi (Ubuntu)
Triaged
Undecided
Unassigned
gnome-power-manager (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gnome-power-manager

When I try to change the brightness using hotkeys brightness jumps to a random value. Setting it through /proc/acpi or with xrandr works as expected. Relevant line from "xrandr --prop":
 BACKLIGHT_CONTROL: kernel
  supported: native legacy combination kernel
 BACKLIGHT: 3 (0x00000003) range: (0,6)

Also launching gnome-power-manager --verbose --no-daemon, pressing one time brightness-down and then brightness-up produces the attached log

Revision history for this message
phcoder (phcoder) wrote :
Revision history for this message
phcoder (phcoder) wrote :

I don't know if it's related but if the laptop stays idle it will change brightness for a second and then go back to original brightness. Same when I touch the touchpad after idle time
Here is lspci

Revision history for this message
phcoder (phcoder) wrote :

On my laptop I traced it back to kernel and here is the fix: http://marc.info/?l=linux-acpi&m=124456088526538&w=2

Revision history for this message
Scott Howard (showard314) wrote :

Thank you for your report and for finding and testing that patch! I'm marking confirmed in both gnome-power-manager and listing as an ACPI bug.

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Changed in acpi (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Howard (showard314) wrote :

There are several other bug reprots with similar symptoms that are now trying this patch.

Dmitriy Geels just added two dupes to this report. He has down some debugging at Bug #350912, I just wanted to make sure his info is carried over (there are more logs and files there, but the following info confirms the behavior the patch in this report fixes):

This laptop has 3 backlight control buttons: dim/bright and 'eco' (which should put laptop into economy mode).
Now, how buttons work (I press buttons not 1 time per second or less):
dmig@dmig-laptop:~$ watch -n 1 cat /proc/acpi/video/VGA1/LCDD/brightness
Every 1,0s: cat /proc/acpi/video/VGA1/LCDD/brightness Sun Mar 29 16:08:54 2009

levels: 0 1 2 3 4 5 6
current: 5

dim button: no changes, gnome brightness popup shows zero level brightness
bright button:
1st press
levels: 0 1 2 3 4 5 6
current: 1
2nd press
levels: 0 1 2 3 4 5 6
current: 4
3rd presslevels: 0 1 2 3 4 5 6
current: 1
4th press
levels: 0 1 2 3 4 5 6
current: 4

eco button:
eco off:
levels: 0 1 2 3 4 5 6
current: 4

eco on: no change
eco off:
backlight blinks twice, then:
levels: 0 1 2 3 4 5 6
current: 2

eco on: no change
eco off: screen blinks 3 times, then level rests on 2

Revision history for this message
Dmitriy Geels (dmig) wrote :

Applied this patch to .30 kernel -- it helped! Brightness control works as expected now. But gnome-brightness-applet is often loosing dbus connection to g-p-m with .30 kernel.

Revision history for this message
Scott Howard (showard314) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at: http://bugzilla.kernel.org/show_bug.cgi?id=13511

Changed in acpi:
status: Unknown → Confirmed
Revision history for this message
Scott Howard (showard314) wrote :

@phcoder: The linux-acpi developers have asked that you resend your patch to the linux-acpi mailing list again [1]. When you do, reference linux kernel bug #13511. Thanks for your help and fixing this bug for many HP laptop owners.

[1] http://bugzilla.kernel.org/show_bug.cgi?id=13511#c2

Revision history for this message
Scott Howard (showard314) wrote :

Relaying a message from the upstream developers:

http://bugzilla.kernel.org/show_bug.cgi?id=13511#c4

patch: create symbol link from backlight sys device to ACPI video device

you have only one backlight sysfs I/F, i.e. /sys/class/backlight/acpi_video0,
right?
please apply this patch [1], and get the output of "cat
/sys/class/backlight/acpi_video0/device/path".
this will help us to know which ACPI video device is used.

[1] http://bugzilla.kernel.org/attachment.cgi?id=21952

Changed in acpi:
status: Confirmed → Incomplete
Revision history for this message
Scott Howard (showard314) wrote :

sorry for the extra email, upstream updated the patch:
http://bugzilla.kernel.org/attachment.cgi?id=21978

use this instead of the one from my comment on 6/16

Revision history for this message
Dmitriy Geels (dmig) wrote :

Just disassembled laptop's DSDT, there a 3 device LCDD descriptors. All have method _BCL.
First 2 instances:
Device (LCDD)
{
...
Method (_BCL, 0, NotSerialized)
{
    Return (Package (0x10)
    {
        0x0F,
        0x0E,
        0x0D,
        0x0C,
        0x0B,
        0x0A,
        0x09,
        0x08,
        0x07,
        0x06,
        0x05,
        0x04,
        0x03,
        0x02,
        One,
        Zero
    })
}
...
}
And here is third one:
Device (LCDD)
{
...
Method (_BCL, 0, NotSerialized)
{
    Return (Package (0x09)
    {
        0x08,
        0x07,
        0x06,
        0x05,
        0x04,
        0x03,
        0x02,
        One,
        Zero
    })
}
...
}

As far as I understand, this causes backlight control problems and modifying first 2 instances to be like 3d one will fix problem without kernel modification (by overriding DSDT in initrd)?

Revision history for this message
Dmitriy Geels (dmig) wrote :

Hmm... This should be the reason, but patched DSDT didn't fix the problem. Or kernel refused to load my DSDT.
Dammit!
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_CUSTOM_DSDT_FILE=""

Bug #246222 reported for Intrepid alpha 3, marked as fixed, is still there!
Config from 2.6.28 contains one more line:
CONFIG_ACPI_CUSTOM_DSDT_INITRD=y

Revision history for this message
Dmitriy Geels (dmig) wrote :

Kernel refused to load my DSDT:
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_CUSTOM_DSDT_FILE=""

Bug #246222 reported for Intrepid alpha 3 and marked as fixed is still there!
Default kernel, 2.6.28 has one more line:
CONFIG_ACPI_CUSTOM_DSDT_INITRD=y

Revision history for this message
Scott Howard (showard314) wrote :

Thanks Dmitriy, can you post your comments at http://bugzilla.kernel.org/show_bug.cgi?id=13511? The patch and fix work is going on there, and it would probably be best if we directly work with them on that site.

After applying the patch, what was the output of:
cat /sys/class/backlight/acpi_video0/device/path

Could you post the result of that to the kernel bugzilla address?

Revision history for this message
Dmitriy Geels (dmig) wrote :

Oh, I haven't applied later patch. I will do that and post the result

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Invalid
Changed in acpi (Ubuntu):
status: Confirmed → Triaged
Changed in acpi:
status: Incomplete → Fix Released
Changed in acpi:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.