Bug 10042 - Unreal actual_brightness and other strange behavior of video module on FSC Amilo Pi 2515
Summary: Unreal actual_brightness and other strange behavior of video module on FSC Am...
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-19 09:14 UTC by Erik Boritsch
Modified: 2008-06-13 22:11 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.24
Tree: Mainline
Regression: ---


Attachments
oputput of lspci -vv (20.91 KB, text/plain)
2008-02-19 09:15 UTC, Erik Boritsch
Details
acpidump (125.33 KB, text/plain)
2008-02-19 09:15 UTC, Erik Boritsch
Details
try the custom DSDT (210.17 KB, patch)
2008-02-25 17:26 UTC, ykzhao
Details | Diff
proposed patch (981 bytes, patch)
2008-02-27 23:43 UTC, Lin Ming
Details | Diff

Description Erik Boritsch 2008-02-19 09:14:39 UTC
Distribution:Gentoo
Hardware Environment:Fujitsu-Siemens Amilo Pi 2515

Problem Description:When video module is loaded, /sys/class/backlight/acpi_video0/ entries are created. Dmesg output is ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no) 
The values, however, are strange. actual_brightness is always a big integer like e.g. 2102324320 (changes every time module is loaded, remains unchanged afterwards regardless of brightness level).
Initial value of acpi_video0/brightness is 0 (although the display is at maximum brightness). max_brightness is set to 100. 
I am able to change the brightness if I echo 25,50 or 75. Any other value makes my display return to maximum brightness. 
Actually, the display is supposed to have brightness levels from 1 to 7, AFAIK.
If I load with ACPI_DEBUG, initial value of brightness is also a great number such as 2099887552.

Steps to reproduce:always
Comment 1 Erik Boritsch 2008-02-19 09:15:20 UTC
Created attachment 14901 [details]
oputput of lspci -vv
Comment 2 Erik Boritsch 2008-02-19 09:15:52 UTC
Created attachment 14902 [details]
acpidump
Comment 3 Erik Boritsch 2008-02-19 09:22:43 UTC
If I enable ACPI_DEBUG, I get upon loading the module:

dsobject-0456 [00] ds_build_internal_pack: Package List length larger than
NumElements count (1), truncated
dsobject-0456 [00] ds_build_internal_pack: Package List length larger than
NumElements count (A), truncated
ACPI Error (utobject-0502): Unsupported Reference opcode=88 in object
ffff81007e5819e0 [20070126]
input: Video Bus as /class/input/input8
ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
Comment 4 ykzhao 2008-02-25 17:23:54 UTC
Hi, Erik
    The error log in comment #3 is caused by the broken BIOS. 
>    Method (_BQC, 0, NotSerialized)
>       {
>            Return (Index (BTBL, \_SB.PCI0.LPCB.EC0.BKLG)) 
>       }
    
    Will you please try the custom DSDT and see whether the problem can be fixed?
Comment 5 ykzhao 2008-02-25 17:26:09 UTC
Created attachment 14993 [details]
try the custom DSDT

Will you please try the custom DSDT ?
How to use the custom DSDT can be found   http://www.lesswatts.org/projects/acpi/faq.php.
Thanks.
Comment 6 Erik Boritsch 2008-02-27 22:58:00 UTC
With custom DSDT actual_brightness is actual brightness. Entry "brightness" shows correct value at startup, too. 
Valid entrites for brightness are the same - 25,50,75 and 100. Any other value sets actual_brightness to 100.
dmesg upon module loading shows only

input: Video Bus as /class/input/input8
ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

This isn't, however, the only issue with video module on my system. I believe, I can couple this bug with the following one: http://bugzilla.kernel.org/show_bug.cgi?id=9902 
Comment 7 Zhang Rui 2008-02-27 23:27:28 UTC
The problem described in this bug report is clear now, it's a BIOS problem.
Let's investigate further to see if we can fix it in Linux.
For the incoherent brightness value problem, we can discuss it in bug #9902.
Yakui will propose a new DSDT that you can give a try.
Comment 8 Lin Ming 2008-02-27 23:43:24 UTC
Created attachment 15049 [details]
proposed patch

Seems that it's a bug of acpi_evaluate_object with an Index Reference

Pls try this patch.
Comment 9 Erik Boritsch 2008-03-07 09:56:42 UTC
I confirm the patch working. actual_brightness shows correct value now.
Valid entrites for brightness are 25,50,75 and 100. Any other value
sets actual_brightness to 100. I guess it is not a bug.
Comment 10 Zhang Rui 2008-03-09 18:25:52 UTC
So the unreal actual_brightness problem is fixed.
(In reply to comment #9)
> Valid entrites for brightness are 25,50,75 and 100. Any other value
> sets actual_brightness to 100. I guess it is not a bug.
Please try the latest kernel release, say 2.6.25-rcX.
Comment 11 Erik Boritsch 2008-03-10 12:21:26 UTC
Confirm brigtness sys I/F working as intended with kernel 2.6.25-rc4. Brightness levels are now from 0 to 7 as it ought to be. I'll take the liberty and mark this bug as resolved. You may close it if you have no further questions. 
Thank you!
Comment 12 Len Brown 2008-06-13 22:11:00 UTC
thanks for testing.
the patch in comment #8 is not present upstream,
so this must have been fixed by another patch.

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