Bug 14753

Summary: ACPI Errors: Index beyond end of object, parse/execution failed, _BCM failed - Asus Notebook X5DIJ-SX101L
Product: ACPI Reporter: Alexander Haeussler (Alex.Haeussler)
Component: Power-VideoAssignee: Zhang Rui (rui.zhang)
Status: CLOSED CODE_FIX    
Severity: normal CC: lenb, ming.m.lin, rui.zhang, slashbin
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.32 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg 2.6.32
acpidump
dmesg # acpi_osi="!Windows 2009"
dmesg acpi_osi=
dmidecode
patch: disable _OSI(Windows 2009) for Asus K50IJ
dmesg patched kernel

Description Alexander Haeussler 2009-12-06 18:32:11 UTC
Created attachment 24058 [details]
dmesg 2.6.32

Most recent kernel where this bug did not occur: 2.6.31.6 stock from Arch Linux
Distribution: Arch Linux
Hardware Environment: Asus Notebook X5DIJ-SX101L
Software Environment: n/a

Problem Description: 
Since installing the new kernel there a many ACPI Errors in dmesg:
 
ACPI Exception: AE_AML_BUFFER_LIMIT, Index (000000064) is beyond end of object (20090903/exoparg2-445)
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC0_.STBR] (Node ffff88007d81d120), AE_AML_BUFFER_LIMIT
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.VGA_.LCDD._BCM] (Node ffff88007d8373a0), AE_AML_BUFFER_LIMIT
ACPI Error: Evaluating _BCM failed (20090903/video-528)

I didn't notice any problems yet, maybe graphics in X are a bit slower but the biggest problem for me is the spam in dmesg. I found a bugreport (#9558) with ACPI errors that looks similar to mine except the part in square brackets. I have read about using a custom DSDT but the final solution in the other bugreport was a patch for Sizeof operator.

Thanks for your support.

Steps to reproduce: Install Arch Linux and kernel 2.6.32, type dmesg in a terminal.
Comment 1 Zhang Rui 2009-12-07 06:34:32 UTC
please attach the acpidump output.
Comment 2 Alexander Haeussler 2009-12-07 14:09:07 UTC
Created attachment 24076 [details]
acpidump
Comment 3 Zhang Rui 2009-12-08 08:11:41 UTC
please try boot option acpi_osi="!Windows 2009" and see if it helps.
Comment 4 Alexander Haeussler 2009-12-08 15:31:35 UTC
there is a bug with whitespaces in boot parameter variables and for this reason i get an error "bad variable name" while booting with the given parameter. i tried it with a "#" in front of the parameter like described in the bug report

http://bugs.archlinux.org/task/13900

but i don't know if the parameter is accepted or ignored and i get the same ACPI Errors in dmesg. i also tried it with an empty "acpi_osi=" to disable all strings and herewith the ACPI errors are gone.

is it good practice to disable all strings? if so, i'm lucky. :)
Comment 5 Alexander Haeussler 2009-12-08 15:33:15 UTC
Created attachment 24091 [details]
dmesg # acpi_osi="!Windows 2009"
Comment 6 Alexander Haeussler 2009-12-08 15:34:34 UTC
Created attachment 24092 [details]
dmesg acpi_osi=
Comment 7 Zhang Rui 2009-12-09 01:25:37 UTC



(In reply to comment #4)
> there is a bug with whitespaces in boot parameter variables and for this
> reason
> i get an error "bad variable name" while booting with the given parameter. i
> tried it with a "#" in front of the parameter like described in the bug
> report
> 
> http://bugs.archlinux.org/task/13900
> 
> but i don't know if the parameter is accepted or ignored and i get the same
> ACPI Errors in dmesg.

I never saw this kind of problems before.
Please make sure you are using boot parameter acpi_osi="!Windows 2009"
don't forget the quotation marks.

> i also tried it with an empty "acpi_osi=" to disable all
> strings and herewith the ACPI errors are gone.
> 
> is it good practice to disable all strings? if so, i'm lucky. :)

yes, it does the similar thing that I want to test, but more aggressive.
so I think I have root caused this problem.

here is the AML code of the _BCM method:

Method (_BCM, 1, NotSerialized)
{
  If (LGreaterEqual (OSFG, OSVT))
  {
    If (LNotEqual (OSFG, OSW7))
    {
      Store (One, BCMD)
      Store (GCBL (Arg0), Local0)
      Subtract (0x0F, Local0, LBTN)
      ^^^SBRG.EC0.STBR ()
      ...
    }
    Else
    {
      DBGR (0x0B, Zero, Zero, Arg0)
      Store (Arg0, LBTN)
      ^^^SBRG.EC0.STBR ()
      ...
    }
  }
}

Note that Arg0 is a percentage value that reported by _BCL.
If the laptop is not running in Windows7, the AML code will convert this percentage value to an index value in GCBL, and store it to LBTN.
But if the laptop OSFG equals OSW7, LBTN is set to a percentage value as well, and the AML code uses this percentage value (0x64 in this case) as an index.
that's why the ACPICA error messages are printed out.
Comment 8 Zhang Rui 2009-12-09 01:27:28 UTC
please attach the dmidecode output and I'll generate a dmi patch to disable the win7 capability of Linux for you.
Comment 9 Alexander Haeussler 2009-12-09 14:30:36 UTC
i know that the quotes are missing in the kernelline at the beginning of the dmesg log, but i did not forget it and they are in my grub-config. i was testing it again and it's really a (maybe arch linux specific) bug.

i also tried the number sign workaround with "# acpi_osi=" and i don't get any acpi errors, which means that the number sign workaround should work and it should work with

linux [...] # acpi_osi="!Windows 2009"

but herewith i still get the ACPI errors.
Comment 10 Alexander Haeussler 2009-12-09 14:34:21 UTC
Created attachment 24119 [details]
dmidecode
Comment 11 Zhang Rui 2009-12-10 01:42:38 UTC
Created attachment 24126 [details]
patch: disable _OSI(Windows 2009) for Asus K50IJ

please apply this patch, and reboot w/0 any acpi_osi boot option.
does the problem still exist this time?
Comment 12 Alexander Haeussler 2009-12-10 09:58:22 UTC
Created attachment 24131 [details]
dmesg patched kernel

no acpi errors anymore with the patched kernel and X feels much smoother, but thats probably caused by the self compiled kernel.

thanks a lot! :)
Comment 13 Zhang Rui 2009-12-21 08:11:05 UTC
patch is sent to linux-acpi mail list.
Mark it as resolved, lenb will close it after the patch hit upstream kernel.
Comment 14 Zhang Rui 2009-12-22 07:35:04 UTC
here is the upstream version of the patch:
http://patchwork.kernel.org/patch/69091/
Comment 15 Len Brown 2009-12-22 07:36:31 UTC
Alexander,
Do you have a Windows7 partition on this box
where you can test the brightness functionality?
If Rui is right, then Windows7 will break on this box.
Comment 16 Len Brown 2009-12-22 07:40:00 UTC
commit 81074e90f5c150ca70ab8dfcc77860cbe76f364d
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Mon Dec 21 16:13:15 2009 +0800

    ACPI: disable _OSI(Windows 2009) on Asus K50IJ


applied to the acpi tree
Comment 17 Alexander Haeussler 2009-12-23 08:44:13 UTC
No, i don't have a Windows 7 partition and neither want to buy nor to install Windows on my well configured lovely notebook. There was a BIOS update to "Add Win 7 Support" (version 212), but mine is newer (213) and with Linux the Fn-Keys to adjust brightness are working great. I don't know if this information helps in any way.

I have updated the kernel to 2.32.1 and later 2.32.2 with the patch applied and didn't notice any problems yet.
Comment 18 Alexander Haeussler 2009-12-23 08:47:25 UTC
... 2.6.32.1 and  2.6.32.2. Sorry.
Comment 19 Len Brown 2009-12-26 04:34:43 UTC
patch referenced in comment #16 shipped in Linux-2.6.33-rc2

closed.
Comment 20 slashbin 2010-02-06 16:52:29 UTC
I have an Asus U50A laptop that's having the same problem. Just want to add
that booting with grub2, the acpi_osi="!Windows 2009" fix works but need to
be specified as

    acpi_osi='"!Windows 2009"'

in /boot/grub/grub.cfg, or

    GRUB_CMDLINE_LINUX="vga=0x305 acpi_osi='\"!Windows 2009\"'"

in /etc/default/grub for debian/update-grub.