Distribution: Gentoo Hardware Environment: FSC Amilo Pi 2515 Software Environment: x86_64 Problem Description: After certain events, e.g. display off, switch desktop modes via xrand, resume from hibernate and on start monitor brightness drops to minimum (or sometimes raises to maximum). I get following dmesg output after such events (after this one the brightness minimizes): ACPI Error (utobject-0502): Unsupported Reference opcode=88 in object ffff81007ea75XX0 [20070126] and this happens before the brightness maximizes: ACPI Error (utobject-0502): Unsupported Reference opcode=88 in object ffff81007eb14XX0 [20070126] XX change each time. The kernel has opregion patch from http://bugzilla.kernel.org/show_bug.cgi?id=9995 applied and I boot with acpi_osi="!Windows 2006" as a workaround to make brightness keys work as described in http://bugzilla.kernel.org/show_bug.cgi?id=9902 This might be a BIOS bug, but I thought I'll report it nonetheless just in case it isn't :) Steps to reproduce:turn the display on/off or switch modes.
Reassigned to acpi_power-video@kernel-bugs.osdl.org
Please attach the acpidump and dmesg output.
Created attachment 16854 [details] acpidump output
Created attachment 16855 [details] dmesg output
First, please try a later kernel, say 2.6.26 which has a lot of ACPICA updates. As all the events you described may trigger drm driver actions, could you please try again without drm driver (i915) loaded?
I don't experience the bug without i915 driver. Both framebuffer and vesa driver in X behave correctly and restore the previous value e.g. after hibernate.
And I assumes that the problem can not be reproduced if you revert the opregion patch, is it true?
The headline was a bit misleading, my bad. The behavior it there even without opregion patch. As for kernel 2.6.26 - the initial bug was posted using this kernel, I reverted for previous version for testing.
can you reproduce the problem with X and drm but without acpi video driver? cc Zhenyu, who is an X expert. :)
Negative, this problem happens only with video module. In fact, brightness switches to minimum after I load the video module. Here is what I get in dmesg after modprobe video: ACPI Error (utobject-0502): Unsupported Reference opcode=88 in object ffff81007eb0e4a0 [20070126] ACPI: device:05 is registered as cooling_device2 input: Video Bus as /class/input/input12 ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
seems like a ACPICA/BIOS bug. cc Ming.
_BQC method at SSDT2.dsl should return an integer, but it returns an index reference now. Method (_BQC, 0, NotSerialized) { -Return (Index (BTBL, \_SB.PCI0.LPCB.EC0.BKLG)) +Return (DeRefOf(Index (BTBL, \_SB.PCI0.LPCB.EC0.BKLG))) }
Created attachment 16872 [details] debug patch Erik, Would you please have a try this debug patch? It should fix the issue.
This patch fixes the issue mostly. First of all /sys/class/backlight/acpi_video0/actual_brightness now does show actual brightness. /sys/class/backlight/acpi_video0/brightness shows only real and actual brightness, i.e. works as intended. The only issue remaining is that the brightness resets to maximum if initial brightness is 0 (minimum), after e.g. xset -display :0 dpms force off. Other values - from 1 to 7 - work as intended, the level is restored properly.
Just an observation - brightness level 0 not only indicates minimum brightness, cat /sys/class/backlight/acpi_video0/brightness returns 0 if the LVDS is completely turned off. This might be a bit confusing for the system (just a guess).
So there are two bugs here: 1. an index reference is returned instead of an integer when evaluating _BQC. This bug is fix by Lin Ming's patch in comment #13. 2. the brightness resets to maximum if initial brightness is 0 (minimum). It seems like a X bug. Please verify if this is a duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=16680 If not, please file a new bug report at https://bugs.freedesktop.org/ This entry is used to track issue 1, so mark it RESOVLED. Ming, please talk with Bob to decide if this patch should go to ACPICA first or ship in Linux directly, and then please update here. :)
Yes, you are right - issue 2 isn't reproducible without X running hence it must be the same X bug. Thanks for the info, good work!
The patch at comment #13 is not the final fix. I'll attach an upstream ACPICA patch when available.
Change to ACPICA was released in version 20080729
patch is in acpi test tree
shipped in linux-2.6.28-rc1 closed commit bbc241340681557a16982f4d1840f00963bc05b4 Author: Lin Ming <ming.m.lin@intel.com> Date: Mon Aug 4 13:22:10 2008 +0800 ACPICA: Add function to dereference returned reference objects Examines the return object from a call to acpi_evaluate_object. Any Index or RefOf references are automatically dereferenced in an attempt to return something useful (these reference types cannot be converted into an external ACPI_OBJECT.) Lin Ming, Bob Moore.