Bug 13955 - Buggy _BCM - acer aspire 5715Z
Summary: Buggy _BCM - acer aspire 5715Z
Status: CLOSED UNREPRODUCIBLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: BIOS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 12:15 UTC by Alain Tavan
Modified: 2009-12-16 00:47 UTC (History)
3 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
the dmesg output after patching video.c with debug and 5715 patch (52.10 KB, application/octet-stream)
2009-08-10 12:15 UTC, Alain Tavan
Details
debug patch (590 bytes, patch)
2009-08-11 02:32 UTC, Zhang Rui
Details | Diff
dmesg output with 5715 patch when brightness work (unfortunately it isn't working at every boot) (57.86 KB, application/octet-stream)
2009-08-11 06:26 UTC, Alain Tavan
Details
the new dmesg with patch given in comment 1 of this report (63.12 KB, application/octet-stream)
2009-08-11 07:02 UTC, Alain Tavan
Details
patch for upstream, which is based on top of Dmitry's changes (1.02 KB, patch)
2009-08-11 08:22 UTC, Zhang Rui
Details | Diff
the result before keypress (2.12 KB, application/octet-stream)
2009-08-12 06:19 UTC, Alain Tavan
Details
result after one keypress on brightness down key (2.12 KB, application/octet-stream)
2009-08-12 06:20 UTC, Alain Tavan
Details
patch based on upstream kernel (1.36 KB, patch)
2009-08-31 06:26 UTC, Zhang Rui
Details | Diff
patch based on upstream kernel v2 (1.65 KB, patch)
2009-08-31 06:39 UTC, Zhang Rui
Details | Diff
dmesg on ubuntu 2.6.31-10.35 (57.46 KB, text/plain)
2009-09-23 09:27 UTC, Alain Tavan
Details
disable _BQC if it returns an invalid value (2.81 KB, patch)
2009-09-28 06:33 UTC, Zhang Rui
Details | Diff
patch: disable _BQC once it returns an invalid value (3.35 KB, patch)
2009-10-09 03:18 UTC, Zhang Rui
Details | Diff
debug patch (1.02 KB, patch)
2009-10-09 03:26 UTC, Zhang Rui
Details | Diff

Description Alain Tavan 2009-08-10 12:15:26 UTC
Created attachment 22662 [details]
the dmesg output after patching video.c with debug and 5715 patch

as told on this bug report http://bugzilla.kernel.org/show_bug.cgi?id=13121 my acer aspire 5715Z don't change brightness with brightness keys

i tried the patch in comment 41 : http://bugzilla.kernel.org/attachment.cgi?id=21801

but it didn't help

i also used the debug patch, like Zhang Rui told me

so here is my dmesg


i really hope you guys will find something to help me


i use ubuntu karmic up to date, disabled KMS because brightness does not work on KMS (at least on my other notebook)
and i currently use dualscreen (external LCD 22" on my VGA port)
Comment 1 Zhang Rui 2009-08-11 02:32:02 UTC
Created attachment 22672 [details]
debug patch

please apply this debug patch on top.

This laptop has buggy _BQC implemented.
From the dmesg, we can see the _BQC returns 2351 after boot, which is surely an invalid value.
Comment 2 Zhang Rui 2009-08-11 02:33:15 UTC
I think we should have brightness support with this debug patch.
does the brightness sysfs I/F and hotkeys work this time?
if not, please attach the dmesg output after poking the backlight sysfs I/F.
Comment 3 Alain Tavan 2009-08-11 06:26:59 UTC
Created attachment 22673 [details]
dmesg output with 5715 patch when brightness work (unfortunately it isn't working at every boot)

i will try the patch (i did a full kernel compilation for the two other patchs)
the fun is, i power on my computer at work this morning and the brightness work ....

just in case here is a second dmesg

but i will compile the driver with path in comment 1,
i will give you feedback ASAP and hope it will work every time ^^

ps : after this battle, i'm going to bother the KMS team for making brightness work there too
Comment 4 Alain Tavan 2009-08-11 07:02:20 UTC
Created attachment 22674 [details]
the new dmesg with patch given in comment 1 of this report

i applied the patch
only compile the video.ko driver the way you told me : 
make modules M=drivers/acpi/

after this, i did a 
cp drivers/acpi/video.ko /lib/modules/2.6.31-rc5video/kernel/drivers/acpi/video.ko

(insmod is not working, because driver is in use :( )

i reboot
and the brightness is working

unfortunatly, i use my computer to work right now, so i can not reboot or power down often

i will do some more tests after work

now i also have a acpi_video0 in /sys/class/backlight

and the result of cat /proc/acpi/video/*/*/brightness
is now :
<not supported>
<not supported>
levels:  10 20 30 40 50 60 70 80 90 100
current: 100
<not supported>
<not supported>

doing echo 3 > /sys/class/backlight/acpi_video0/brightness
now work too

as well as xbacklight and gnome backlight applet ^^


REALLY REALLY THANK YOU !!! this bug was disturbing me a lot
Comment 5 Alain Tavan 2009-08-11 07:27:47 UTC
i did an other test
i shut down the computer
plug out the power
wait a little
power on
test brightness => work without a problem
plug power in => work without a problem ^^
check dmesg to see if there is some kind of ACPI error/warning => nothing :)

once again thank you Rui !

can you put the patches in next kernel ?
Comment 6 Zhang Rui 2009-08-11 08:17:23 UTC
good news. :) 
As I said in comment #1, the bug of your laptop is that _BQC returns an uninitialized value for the first time.
This explains why the backlight works sometimes because it may return a value less than 10 occasionally, which is actually supported.
I'll generate a patch to workaround this issue, but it needs a couple of days to hit upstream because we have a lot of changes in ACPI video driver recently. :)
Comment 7 Zhang Rui 2009-08-11 08:22:10 UTC
Created attachment 22675 [details]
patch for upstream,  which is based on top of Dmitry's changes
Comment 9 Alain Tavan 2009-08-11 08:51:06 UTC
ok i will give a try
should i begin with the unpatched video.c driver, or should i apply these patches directly on the current version (with 5715 patch, comment1 patch, debug patch)
Comment 10 Zhang Rui 2009-08-11 09:06:34 UTC
just on top of the 5715 patch, which will hit upstream soon. :)
Comment 11 Alain Tavan 2009-08-11 09:09:14 UTC
ok i will give you some feedback ASAP

once again thanks for your help !
Comment 12 Alain Tavan 2009-08-11 09:53:13 UTC
it work :)

but there is a little bug on my computer 

it may be a keypress or key release problem, i don't think it came from the patches... but i didn't notice it before, so i'm not sure...

but even with this kind of bug, its a lot better, than no brightness change possibility

i have brightness at 100%
i press once the decrease brightness key
and on screen i see that the brightness decrease twice


alain@ubuntu:/proc/acpi/video/OVGA/DD03$ cat brightness 
levels:  10 20 30 40 50 60 70 80 90 100
current: 100

I press decrease once 

alain@ubuntu:/proc/acpi/video/OVGA/DD03$ cat brightness 
levels:  10 20 30 40 50 60 70 80 90 100
current: 70

but like i said, this is not as disturbing as having no way to change the brightness level
Comment 13 Zhang Rui 2009-08-12 05:57:48 UTC
please attach the output of "grep . /sys/firmware/acpi/interrupts/*" both before and after pressing the hotkey.
Comment 14 Alain Tavan 2009-08-12 06:19:25 UTC
Created attachment 22684 [details]
the result before keypress

ok here are the results
Comment 15 Alain Tavan 2009-08-12 06:20:04 UTC
Created attachment 22685 [details]
result after one keypress on brightness down key
Comment 16 Len Brown 2009-08-30 03:36:14 UTC
re-opening, since the patch in comment #7 doesn't apply to upstream,
and applies only on top of patches that no longer apply to upstream.
(ie. needs re-fresh)
Comment 17 MaximAtmashkin 2009-08-30 12:27:08 UTC
Same problem with kernels 2.6.30-2.6.31 on Acer Aspire 5530. On kernel 2.6.29 brightness is controllable, but also there are some problems : during boot it decreases to the lowest level (10); when i try to increase it, sometimes it's resisting to increasing :); when i'm decreasing it, it decreases by 30 (not 10).
Comment 18 Zhang Rui 2009-08-31 06:26:06 UTC
Created attachment 22918 [details]
patch based on upstream kernel
Comment 19 Zhang Rui 2009-08-31 06:39:49 UTC
Created attachment 22919 [details]
patch based on upstream kernel v2
Comment 20 Len Brown 2009-09-01 01:45:47 UTC
commit 90c53ca426cb93d15eefea79dcf6bd15ad3ffeb4
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Mon Aug 31 12:39:54 2009 -0400

    ACPI video: work-around BIOS AML bug in _BQC

applied to acpi-test tree
Comment 21 Alain Tavan 2009-09-09 07:06:13 UTC
hi, do i need to apply other patchs to make it work, or is the patch in comment #19 working alone ?

well, i'll try this patch on ubuntu kernel 2.6.31-10 and give feedback ASAP
Comment 22 Alain Tavan 2009-09-22 16:26:58 UTC
Well i applied the patch in comment #19 on the last ubuntu kernel, and brightness did not work... still have ACPI: Failed to switch the brightness
Comment 23 Zhang Rui 2009-09-23 03:23:07 UTC
can you redo the test and attach the dmesg output as you did in comment #0?
Comment 24 Alain Tavan 2009-09-23 09:27:41 UTC
Created attachment 23146 [details]
dmesg on ubuntu 2.6.31-10.35

I applied the debug patch, and the patch in comment #19, here is the dmesg
Comment 25 Len Brown 2009-09-24 21:53:38 UTC
FYI
commit 90c53ca426cb93d15eefea79dcf6bd15ad3ffeb4
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Mon Aug 31 12:39:54 2009 -0400

    ACPI video: work-around BIOS AML bug in _BQC


shipped in Linux-2.6.31-git-14
Comment 26 Zhang Rui 2009-09-28 06:33:46 UTC
Created attachment 23195 [details]
disable _BQC if it returns an invalid value

please try this patch.
Comment 27 Alain Tavan 2009-09-28 09:06:27 UTC
thanks
it's not working 100% but it's working, let me explain

on X without KMS when i press the brightness keys it change the brightness (but gnome did not show the progress bar of the brightness level)

on console mode, the brightness is not changing and i still receive 
ACPI: Failed to switch the brightness

the gnome brightness applet is not working, maybe because of

cat /proc/acpi/video/*/*/brightness
<not supported>
<not supported>
<not supported>
<not supported>
<not supported>

alain@portable-al1:/sys/class/backlight$ ls
alain@portable-al1:/sys/class/backlight$ 


but like i said i can at least change the brightness.

i forgot to say, that the ACPI: Failed to switch the brightness always come, even after successfully changing brightness level
Comment 28 Alain Tavan 2009-09-28 09:09:30 UTC
i don't know if this change anything, but i just apply the patch given on comment #26, nothing else....
maybe i needed some other patch to made it work 100%
Comment 29 nicky.7 2009-10-04 14:41:03 UTC
Any news? Any patch to try? I have the same laptop and this bug is very annoying.
Comment 30 Zhang Rui 2009-10-09 03:18:04 UTC
Created attachment 23314 [details]
patch: disable _BQC once it returns an invalid value

please try this patch.
and attach the dmesg output after you pressing the hotkey for several times.
Comment 31 Zhang Rui 2009-10-09 03:25:47 UTC
(In reply to comment #27)
> 
> cat /proc/acpi/video/*/*/brightness
> <not supported>
> <not supported>
> <not supported>
> <not supported>
> <not supported>
>
this is weird, the acpi video backlight interface should be working.

please apply the debug patch attached below on top of the patch in comment #30,
and attach the dmesg output.
Comment 32 Zhang Rui 2009-10-09 03:26:20 UTC
Created attachment 23315 [details]
debug patch
Comment 33 Zhang Rui 2009-10-26 08:40:16 UTC
ping...
Comment 34 Zhang Rui 2009-12-04 03:47:37 UTC
close this bug as there is no response from the bug reporter for more 2 months.
please reopen it if you can provide the info request in comment #31.
Comment 35 Alain Tavan 2009-12-04 08:02:46 UTC
sorry i was in hollidays on october and i didn't saw the mail received from bugzilla until now

on pre alpha (i know ... i'm silly to use unstable version ^^) ubuntu lucid lynx (kernel 2.6.32) here are the outputs

cat /proc/acpi/video/*/*/brightness
<not supported>
<not supported>
levels:  10 20 30 40 50 60 70 80 90 100
current: 100
<not supported>
<not supported>

root@portable-al1:/sys/class/backlight# ls
acpi_video0

and video brightness is working well (it does so on karmic final too)

once again sorry for not answering you faster
Comment 36 Zhang Rui 2009-12-07 06:26:11 UTC
so you mean the backlight works well even without the patch from comment #30 and any other patch?
Comment 37 Alain Tavan 2009-12-07 07:24:56 UTC
well actually i have official ubuntu kernel without needing to patch it...
maybe they apply the given patch...
Comment 38 Len Brown 2009-12-16 00:47:23 UTC
If there is a problem with the upstream kernel.org kernel,
please re-open this bug.

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