Subject : [BISECTED] [REGRESSION] "ACPI video: support _BQC/_BCL/_BCM methods that use index values" breaks ACPI video Submitter : Maxim Levitsky <maximlevitsky@gmail.com> Date : 2009-04-16 11:37 References : http://marc.info/?l=linux-kernel&m=123988189401913&w=4 This entry is being used for tracking a regression from 2.6.29. Please don't close it until the problem is fixed in the mainline. Caused by: commit 1a7c618a3f7bef1a20ae740df512eeba21397fa5 Author: Zhang Rui <rui.zhang@intel.com> Date: Wed Mar 18 16:27:16 2009 +0800 ACPI video: support _BQC/_BCL/_BCM methods that use index values Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Acked-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> First-Bad-Commit : 1a7c618a3f7bef1a20ae740df512eeba21397fa5
Hi, Maxim Will you please attach the output of acpidump, dmidecoe? Thanks.
could you please try the patch at http://patchwork.kernel.org/patch/17339/ and see if it helps?
cc Maxim.
I already tried http://patchwork.kernel.org/patch/17339/ Doesn't help.
Created attachment 21026 [details] acpidump output
Created attachment 21027 [details] dmidecode output
Created attachment 21028 [details] Disassmembled DSDT
Here is the relevant part of DSDT
Method (_BCL, 0, NotSerialized) { Return (Package (0x0C) { 0x46, 0x28, 0x0A, 0x14, 0x1E, 0x28, 0x32, 0x3C, 0x46, 0x50, 0x5A, 0x64 }) } Method (_BCM, 1, NotSerialized) { Divide (Arg0, 0x0A, Local0, Local1) Decrement (Local1) Store (Local1, \_SB.PCI0.LPC.EC0.BRTS) } Method (_BQC, 0, NotSerialized) { Multiply (\_SB.PCI0.LPC.EC0.BRTS, 0x0A, Local0) Add (Local0, 0x01, Local0) Sleep (0x64) Return (Local0) }
_SB.PCI0.LPC.EC0.BRTS is a EC register, and it stores values 0 to 9, and corresponds to current brightness
It is oblivious, why the driver is broken, this is due to bug in acpi table, that now got exposed, (It was present before, and resuled it brightness going three levels down, when I pressed brightness down key) Method (_BQC, 0, NotSerialized) { Multiply (\_SB.PCI0.LPC.EC0.BRTS, 0x0A, Local0) Add (Local0, 0x01, Local0) Sleep (0x64) Return (Local0) } It should look like that: Add (Local0, 0x01, Local0) Multiply (\_SB.PCI0.LPC.EC0.BRTS, 0x0A, Local0) Sleep (0x64) Return (Local0) And if I add 9 to _BQC result, everything work just fine. What to do next: - Add a dmi quirk, - catch similiar errors (if they return x*10+1, and model is acer, then add 9) - ignore that bug I have small question, does windows use the acpi video interface?
good job, Maxim.:) (In reply to comment #11) > It is oblivious, why the driver is broken, this is due to bug in acpi table, > that now got exposed, (It was present before, and resuled it brightness going > three levels down, when I pressed brightness down key) > And if I add 9 to _BQC result, everything work just fine. > right, this is an AML code problem to me. > I have small question, does windows use the acpi video interface? I have the same question. I've seen BIOSes with all kinds of buggy _BQC/_BCL/_BCM implemented, and I wonder how they works in Windows, sigh. Maybe windows prefer the platform specific methods to control the backlight by default and the ACPI video extension is a second choice. > What to do next: > > - Add a dmi quirk, > - catch similiar errors (if they return x*10+1, and model is acer, then add > 9) > > - ignore that bug > well, this is a only way to workaround this problem in Linux kernel. but I need to make sure if this is worth doing. Maybe we should upgrade the BIOS first in the hope of the problem being fixed in a new BIOS release.
I already use latest bios, and they already abadoned my notebook. Yet, acpi video driver did work, before this commit. which tries to fix thigs for broken bioses, but it did broke mine, which is well broken. I think we can add a workaround based on dmi information.
Created attachment 21079 [details] patch: dmi check for broken _BQC method please try this patch. :)
Doesn't work, but this is just because dmi tables don't have DMI_BOARD_NAME if I instead have DMI_PRODUCT_NAME, this workarond works perfectly. Just one thing, is this correct: "static int bqc_offset;" ? For systems that don't need the workaround, isn't bqc_offset be uninitialized? (Or we assume about compiler/loader to init everyting to 0) Best regards, Maxim Levitsky
I of course mean that if I replace DMI_BOARD_NAME with DMI_PRODUCT_NAME, this workaround works. Thanks, Maxim Levitsky
so, what you really need is patch http://patchwork.kernel.org/patch/19755/, right? close this bug as patch is available. please reopen this bug if the patch at http://patchwork.kernel.org/patch/19755/ doesn't fix the problem for you.
Created attachment 21103 [details] patch vs 2.6.30-rc3 as applied to acpi tree
Just tested it to be sure, works fine, Thanks again, Maxim Levitsky
Handled-By : Zhang Rui <rui.zhang@intel.com> Patch : http://patchwork.kernel.org/patch/19755/ Notify-Also : Len Brown <lenb@kernel.org>
I have a Acer Aspire 5710Z, changing product from Aspire 5720 to Aspire 5710Z, works also on my laptop.
Created attachment 21198 [details] dmidecode of Acer Aspire 5710Z Dmidecode of Acer Aspire 5710Z
Created attachment 21199 [details] Disassmbled DSDT of Acer Aspire 5710Z Disassmbled DSDT of Acer Aspire 5710Z
that's true, it's the same issue on Acer Aspire 5710Z. an incremental patch will be attached later.
Created attachment 21268 [details] incremental patch expanding workaround to Acer Aspire 5710Z Marco, thanks for the info. This incremental patch should handle it.
Patch : http://bugzilla.kernel.org/attachment.cgi?id=21268
Fixed by commit 5afc4abe7902b8453c248321daa9b13b12d9c838 .
Same problem with an Acer Aspire 5315, and the patch is working changing 5720 to 5315. I also found that 5315 and 5720 have the same BIOS. I am not sure, but the laptops using the same BIOS must have the same problem. I spent some time reading news on the Acer website, and according to Acer, here is the list of laptops sharing the same BIOSes: Same BIOS as Acer Aspire 5720: Aspire 5315, Aspire 5320, Aspire 5715, Aspire 5720, Aspire 7320, Aspire 7720, eMachines E510. Same BIOS as Acer Aspire 5710: Aspire 5310, Aspire 5710. These informations are taken from the readme in the BIOS update archives, available on acer.com. It is not clearly said in the readme, but G and/or Z at the end of the name seem to have no influence on the BIOS used. Of course, it can make a difference in the DMI_PRODUCT_NAME (I have no idea about that). Whatever, you can safely add a patch for the 5315.
please attach the 1. acpidump 2. dmidecode of your laptop.
Created attachment 21399 [details] acpidump for acer aspire 5315
Created attachment 21400 [details] dmidecode for acer aspire 5315
re-opened because it looks like we have additional DMI-foo to do for Acer...
Created attachment 21422 [details] patch: dmi workaround for Aspire 5315 this BIOS is quite like the one on Aspire 5720. Anyway, dmi patch attached, please give it a try.
The patch for 5315 works, thanks! As said in comment #28, the BIOS is the same for 5315 and 5720, the only difference here must be the version (1.43 for my 5315, 1.42 for Rafael's 5720). The last version of the BIOS is 1.45 but the update seems to be available just from Vista. A few months ago, updates were available from FreeDOS but the Acer website changed… BIOS updates used to solve lots of bugs for ACPI under Linux (suspend, thermal zones and fan support have been *highly* improved, see kernel bug #9754 for example). Version 1.45 may solve this backlight problem, who knows (no changelog available)… Can anybody with Windows Vista try to update the BIOS to 1.45?
patch in comment #33 applied to acpi tree
93bcece20ef87c29548ec7e66532f1018572cea0 ACPI: video: DMI workaround broken Acer 5315 BIOS enabling display brightness shipped upstream after 2.6.30-rc7-git4, so it should be present in -rc8 closeed.
Hello, I have Acer Aspire 5715Z, running 2.6.30-rc8 kernel and 1.45 bios. Brightness keys don't work, and the following appears in kernel log: ACPI Error (video-0537): Current brightness invalid [20090320] ACPI: Failed to switch the brightness ACPI: Failed to switch the brightness ...
Created attachment 21788 [details] acpidump output for acer aspire 5715z with Bios v1.45
Created attachment 21789 [details] dmidecode output for acer aspire 5715z with Bios v1.45
Created attachment 21794 [details] Disassembled DSDT of bios v1.45
Created attachment 21801 [details] patch: dmi workaround for Aspire 5715Z please check if this patch works for you.
(In reply to comment #41) > Created an attachment (id=21801) [details] > patch: dmi workaround for Aspire 5715Z > > please check if this patch works for you. Thanks, I was expecting some different patch since the bios is 1.45, but it worked. The only issue is, every keypress changes brightness like it's pressed twice. I also get the following in kernel log: ... ACPI Warning (nspredef-0331): \_SB_.PCI0._OSC: Parameter count mismatch - ASL declared 5, ACPI requires 4 [20090320] ... ACPI Warning (processor_throttling-0843): Invalid throttling state, reset [20090320] ...
(In reply to comment #41) > Created an attachment (id=21801) [details] > patch: dmi workaround for Aspire 5715Z > > please check if this patch works for you. Will this patch appear in 2.6.30 ?
(In reply to comment #43) > (In reply to comment #41) > > Created an attachment (id=21801) > > patch: dmi workaround for Aspire 5715Z > > > > please check if this patch works for you. > > Will this patch appear in 2.6.30 ? 2.6.30 is released without this patch.
I have a similar problem with Acer Aspire 7720. I'm already using the latest BIOS (used to fix bug #9167 "No TZ.temp update, no fan control (64-bit only)"). Will try modifying the patch. and will notify whether it work or not. Thanks.
Created attachment 21970 [details] ACPI dump of the Acer Aspire 7720.
please attach the dmidecode as well.
Created attachment 21995 [details] dmidecode of the Acer Aspire 7720. dmidecode of the Acer Aspire 7720.
Done. However, editing the patch http://bugzilla.kernel.org/attachment.cgi?id=21801 and putting the model Acer 7720 seems to work also.
Created attachment 22001 [details] patch: dmi workaround for Aspire 7720 this is the patch you want, right?
Yes, it is. Thanks!
patch in comment #50 applied to acpi tree
shipped in linux2.6.31-rc1 closed
(In reply to comment #52) > patch in comment #50 applied to acpi tree why the patch in comment #41 is skipped?
(In reply to comment #42) > (In reply to comment #41) > > Created an attachment (id=21801) [details] [details] > > patch: dmi workaround for Aspire 5715Z > > > > please check if this patch works for you. > > Thanks, I was expecting some different patch since the bios is 1.45, but it > worked. the brightness control works without this patch? I checked the DSDT and the problem still exists. (In reply to comment #54) > (In reply to comment #52) > > patch in comment #50 applied to acpi tree > > why the patch in comment #41 is skipped? so you don't think this patch is needed as it's fixed by the BIOS, right?
Hi, i don't know if it is the same bug, but i have a brightness issue too i'm currently using ubuntu karmic (yes i know, it's not a final version, but ... well i wish to help) i have an Acer aspire 5715Z an my brightness keys are not working i already opened a bug report at launchpad here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/401591 i saw that the patch given on this topic was not in kernel source so i tried to apply the patch (like said on launchpad) and it don't work can you guys help me ?
please attach the acpidump and dmidecode output
Created attachment 22549 [details] my acpidump for 5715Z
Created attachment 22550 [details] dmidecode for 5715Z here are the two requested files
Hello, Sorry for the late answer, please find my responses in-between lines below. (In reply to comment #55) > (In reply to comment #42) > > (In reply to comment #41) > > > Created an attachment (id=21801) [details] [details] [details] > > > patch: dmi workaround for Aspire 5715Z > > > > > > please check if this patch works for you. > > > > Thanks, I was expecting some different patch since the bios is 1.45, but it > > worked. > > the brightness control works without this patch? No, it does not. > I checked the DSDT and the problem still exists. > > > > (In reply to comment #54) > > (In reply to comment #52) > > > patch in comment #50 applied to acpi tree > > > > why the patch in comment #41 is skipped? > > so you don't think this patch is needed as it's fixed by the BIOS, right? I think there's been a misunderstanding, I should be laconic and not think aloud like that. Bottom line is: The patch works for me. Without it, brightness keys don't work (and kernel prints the error "ACPI: Failed to switch the brightness")
(In reply to comment #56) > Hi, > > i don't know if it is the same bug, but i have a brightness issue too > > i'm currently using ubuntu karmic (yes i know, it's not a final version, but > ... well i wish to help) > > i have an Acer aspire 5715Z an my brightness keys are not working > > i already opened a bug report at launchpad here > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/401591 > > i saw that the patch given on this topic was not in kernel source so i tried > to > apply the patch (like said on launchpad) and it don't work > I have the same notebook, the patch works for me. But you have to shutdown the system and pull the power plug, wait a few minutes and then restart to see the effect.
(In reply to comment #56) > Hi, > > i don't know if it is the same bug, but i have a brightness issue too > yes, it's the same bug. > i saw that the patch given on this topic was not in kernel source so i tried > to > apply the patch (like said on launchpad) and it don't work > please make sure you're playing with the patch in comment #41. > can you guys help me ?
(In reply to comment #62) > (In reply to comment #56) > > > i saw that the patch given on this topic was not in kernel source so i > tried to > > apply the patch (like said on launchpad) and it don't work > > > please make sure you're playing with the patch in comment #41. > after rebuilding the kernel, please run 1. cat /proc/acpi/video/*/*/brightness 2. echo 3 > /sys/backlight/acpi_video0/brightness 3. cat /proc/acpi/video/*/*/brightness and attach the output here. len, please apply the patch in comment #41.
i don't now if i did things right (i don't want to compile the complete kernel, so i simply modify the video.c file) i applied the patch on comment 41 also changed the name of the author (to see if the new driver is loaded) saved in the directory "/usr/src/linux-source-2.6.31/drivers/acpi/" i moved the Makefile to Makefile.old and created a new one with following content obj-m += video.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean then i did a make in the /usr/src/linux-source-2.6.31/drivers/acpi/ directory (to only build the video.ko driver) i copy video.ko in /lib/modules/2.6.31-4-generic/kernel/drivers/acpi/ (insmod is not working because driver is in use) i reboot and checked if the driver changed with modinfo video the author name changed (so i guess i'm with the modified driver) cat /proc/acpi/video/*/*/brightness <not supported> <not supported> <not supported> <not supported> <not supported> root@ubuntu:/home/alain# echo 3 > /sys/backlight/acpi_video0/brightness bash: /sys/backlight/acpi_video0/brightness: No such file or directory root@ubuntu:/home/alain# cat /proc/acpi/video/*/*/brightness <not supported> <not supported> <not supported> <not supported> <not supported>
you just need to 1. a normal boot 2. apply the patch to video.c 3. run "make modules M=drivers/acpi/" 4. modprobe -r video 5. insmod driver/acpi/video.ko 6. run the commands in comment #63.
step 4 is not working :( root@ubuntu:/home/alain# modprobe -r video FATAL: Module video is in use. root@ubuntu:/home/alain# rmmod video ERROR: Module video is in use by i915 root@ubuntu:/home/alain# rmmod i915 ERROR: Module i915 is in use
any ideas ?
Fixed by commit 152a4e630f7ffdd7ff64427c4ba488dc0bce76af .
(In reply to comment #61) > > I have the same notebook, the patch works for me. But you have to shutdown > the > system and pull the power plug, wait a few minutes and then restart to see > the > effect. i applied the patch everyday i shutdown the computer everyday i use the computer with power plugged in and everyday i can't change the brigthness power... (In reply to comment #68) > Fixed by commit 152a4e630f7ffdd7ff64427c4ba488dc0bce76af . well .... on my computer its not fixed, or i don't have the right patch...
Alain, please open a new bug, and attach the dmesg output after applying the patch in comment #41 and the debug patch at http://bugzilla.kernel.org/attachment.cgi?id=22623
(In reply to comment #63) > > len, > please apply the patch in comment #41. still missing from 2.6.31 :-/