Bug 9902

Summary: Video module creates input device, but no events happen.
Product: ACPI Reporter: Erik Boritsch (borych)
Component: Power-VideoAssignee: Zhang Rui (rui.zhang)
Status: REJECTED WILL_NOT_FIX    
Severity: normal CC: acpi-bugzilla
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on: 10221    
Bug Blocks:    
Attachments: output of acpidump
try the custom DSDT
debug patch
dmesg output on pressing brightness keys twice.
dmesg output on changing brightness via sys I/F (twice increase and twice decrease)
custom DSDT
key press
output of dmesg upon brightness change

Description Erik Boritsch 2008-02-06 11:30:40 UTC
Latest working kernel version:-
Earliest failing kernel version:2.6.23.14
Distribution:gentoo
Hardware Environment:Fujitsu-Siemens Amilo Pi 2515 Notebook
Software Environment:x86_64
Problem Description:after loading video module "Video Bus" input device is created in /dev/input/, but no events happen if I press brightness buttons.
If I boot the system with acpi=off brightness keys (Fn-F7, Fn-F8) work alright.
dmesg output upon module loading:
ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

Steps to reproduce:load video module on Amilo Pi 2515 and try to change brightness via Fn-F7, Fn-F8
Comment 1 Erik Boritsch 2008-02-06 11:50:06 UTC
Created attachment 14726 [details]
output of acpidump
Comment 2 Zhang Rui 2008-02-18 18:39:59 UTC
hmm, can the backlight sys I/F, i.e. /sys/class/backlight/acpi_video0/..., work for you?
please set CONFIG_ACPI_DEBUG, and do the following test:
1. dmesg -c;
2. echo 0x40 > /sys/module/acpi/parameters/debug_layer
3. echo 0x8800001f > /sys/module/acpi/parameters/debug_level
4. press the fn-f7 and fn-f8 for one time.
5. attach the dmesg output.
Comment 3 Erik Boritsch 2008-02-19 09:20:58 UTC
Backlight interface works strange, as described in http://bugzilla.kernel.org/show_bug.cgi?id=10042
It actually works, has only 4 brightness levels and is a bit buggy atm.
I've done through all the steps, dmesg is empty.
However, if I reload module now, I get:
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 Erik Boritsch 2008-02-27 23:02:21 UTC
I tried using cusom DSDT as advised here: http://bugzilla.kernel.org/show_bug.cgi?id=10042
Still, no events are generated, neither acpi, nor input.
Comment 5 ykzhao 2008-02-27 23:18:52 UTC
Created attachment 15047 [details]
try the custom DSDT

Will you please try the custom DSDT?
Thanks.
Comment 6 ykzhao 2008-02-27 23:30:02 UTC
Hi, Erik
   Will you please try the debug patch in comment #28 of bug9642 and do the following test? (of course the custom DSDT is required).
  a. echo 0x08000004 > /sys/module/acpi/parameters/debug_layer &&
     echo 0x00001f > /sys/module/acpi/parameters/debug_level
  b. kill the process who is using the /proc/acpi/event (The process id can be got by the command of "lsof /proc/acpi/event")
  c. cat /proc/acpi/event > event_log( Not press C before the step d is finished)
  d. Press Fn-F7, Fn-F8 twice.

  Please attach the output of dmesg and event_log after finishing the test.
  Thanks.
   
Comment 7 Erik Boritsch 2008-03-05 20:57:26 UTC
I've done the test, nothing happened. event_log is empty, no new messages show up in dmesg. 
Comment 8 ykzhao 2008-03-05 23:16:38 UTC
It seems that hotkey can't change the brightness level.
Will you please verify whether the backlight sys I/F can change the brightness? 
Please  do the following commands" echo 0x08010044 > /sys/module/acpi/parameters/debug_layer &&
     echo 0x0800001f > /sys/module/acpi/parameters/debug_level" before using the backlight sys I/F. 

Thanks.
Comment 9 Erik Boritsch 2008-03-07 10:06:34 UTC
I am able to change brightness via sys I/F. Valid values for brightness are 0,25,50,75 or 100. Any other value sets monitor brightness to maximum (and actual_brightness to 100). dmesg output after I changed brightness from 0 to 25 (echo 25 > /sys/class/backlight/acpi_video0/brightness):
evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00


dmesg output after decreasing:
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [15]
     bus-0118 [00] bus_get_status        : Device [BAT0] status [0000000f]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [15]
     bus-0118 [00] bus_get_status        : Device [BAT0] status [0000000f]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [15]
     bus-0118 [00] bus_get_status        : Device [BAT0] status [0000000f]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [15]
     bus-0118 [00] bus_get_status        : Device [BAT0] status [0000000f]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
 evevent-0247 [00] ev_fixed_event_detect : Fixed Event Block: Enable 00000520 Status 00000011
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE0: Status=00, Enable=46
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE8: Status=80, Enable=08
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE10: Status=C2, Enable=02
   evgpe-0444 [00] ev_gpe_detect         : Read GPE Register at GPE18: Status=4C, Enable=00
   utils-0287 [00] evaluate_integer      : Return value [1]
Comment 10 ykzhao 2008-03-09 21:54:51 UTC
Created attachment 15194 [details]
debug patch

Will you please try the debug patch ? 
Of course the custom DSDT in comment #5 is also required.
Thanks.
Comment 11 ykzhao 2008-03-09 22:01:26 UTC
Hi, Erik
    Will you please try the latest kernel (2.6.25-rc4) and  boot the system with the option of "acpi.debug_layer=0x08010084 acpi.debug_level=0x1f"? (Of course the debug patch in comment #10 and custom DSDT are required).
    After the system is booted, please press "fn-f7, fn-f8" twice and then change the brightness by using ys I/F. 
    After the test is finished, please attach the output of dmesg.
    thanks.
    
Comment 12 Erik Boritsch 2008-03-10 12:28:43 UTC
Created attachment 15203 [details]
dmesg output on pressing brightness keys twice.
Comment 13 Erik Boritsch 2008-03-10 12:30:21 UTC
Created attachment 15204 [details]
dmesg output on changing brightness via sys I/F (twice increase and twice decrease)
Comment 14 Zhang Rui 2008-03-10 19:57:54 UTC
hi, Eric,
the problem left is that there are neither ACPI events nor actually brightness change when hotkey press, althought the backlight sys I/F can work, right?
Comment 15 ykzhao 2008-03-10 21:52:56 UTC
Created attachment 15207 [details]
custom DSDT

Will you please try the custom DSDT and see whether Fn+F7/Fn+F8 can change the brightness?
Thanks.
Comment 16 ykzhao 2008-03-10 21:59:43 UTC
What Rui said in comment #14 is right. It seems that backlight sys I/F can work. But when hotkey press, there is no acpi event although the EC sci interrupt is triggered. (_Q10/_Q11 method is executed).

Will you please try the custom DSDT in comment #15 and see whether the brightness can be changed by hotkey? (Of course the debug patch in comment #10 is required. And add the boot option of "acpi.debug_layer=0x08010004 acpi.debug_level=0x1f".

After the test is finished, please attach the output of dmesg.

Thanks.
Comment 17 Erik Boritsch 2008-03-10 23:56:36 UTC
Created attachment 15208 [details]
key press

Rui, that's right. No acpi event, no event via /dev/input/event* and no brightness change.
I am unable to change brightness via hotkeys with custom DSDT. Dmesg output is attached.
Comment 18 Erik Boritsch 2008-03-10 23:57:23 UTC
Created attachment 15209 [details]
output of dmesg upon brightness change
Comment 19 ykzhao 2008-03-11 00:13:44 UTC
Hi, Erik
    The log in comment #18/#17 is incomplete. Please attach the full dmesg.

Thanks.
Comment 20 Zhang Rui 2008-03-11 01:49:14 UTC
For this laptop, in order to get ACPI event for hotkey press,
we need the Intel IGD OpRegion support in Linux.
Comment 21 Erik Boritsch 2008-03-19 14:52:15 UTC
Do I still have to provide full dmesg output knowing that the problem is unimplemented IGD OpRegion support?
Comment 22 Zhang Rui 2008-03-19 20:05:26 UTC
No, but sorry that it will take some time to make the hotkey work on your laptops.
Let's track the progress of IGD OpRegion support in bug #10221.
Defer this bug and mark it as WILL_FIX_LATER.
Comment 23 Erik Boritsch 2008-07-03 04:22:55 UTC
I have applied the opregion patch, it works partially. Fn+F3 (switch video mode) generates ACPI and input events now. Fn+F8 (increase brightness) and Fn+F9 (decrease brightness generate no events. If I apply the debug patch from comment #10 and boot with acpi.debug_layer=0x08010084 acpi.debug_level=0x1f, I get "ACPI: EC: Evaluate _Q10" in dmesg when I press Fn+F8. Fn+F9 generates nothing.

I am unable to add custom DSDT for some reason. Kernel in question is 2.6.25.7. I get following erron on make:
  CC      drivers/acpi/osl.o
In file included from drivers/acpi/osl.c:60:
/usr/src/DSDT.dsl:18: error: expected declaration specifiers or '...' before string constant
/usr/src/DSDT.dsl:18: error: expected declaration specifiers or '...' before string constant
/usr/src/DSDT.dsl:18: error: expected declaration specifiers or '...' before numeric constant
/usr/src/DSDT.dsl:18: error: expected declaration specifiers or '...' before string constant
/usr/src/DSDT.dsl:18: error: expected declaration specifiers or '...' before string constant
/usr/src/DSDT.dsl:18: error: expected declaration specifiers or '...' before numeric constant
/usr/src/DSDT.dsl:19: warning: return type defaults to 'int'
/usr/src/DSDT.dsl:19: warning: function declaration isn't a prototype
/usr/src/DSDT.dsl: In function 'DefinitionBlock':
/usr/src/DSDT.dsl:20: error: implicit declaration of function 'External'
/usr/src/DSDT.dsl:20: error: 'PDC1' undeclared (first use in this function)
/usr/src/DSDT.dsl:20: error: (Each undeclared identifier is reported only once
/usr/src/DSDT.dsl:20: error: for each function it appears in.)
/usr/src/DSDT.dsl:21: error: expected ';' before 'External'
/usr/src/DSDT.dsl:23: error: stray '\' in program
many "stray '\' in program" errors follow
Comment 24 Zhang Rui 2008-07-03 19:47:21 UTC
Does the brightness actually changes if you press the hotkey?

please try to boot with acpi_osi="!Windows 2006" and press the hotkey,
in this time, the brightness should be changes without any ACPI events,
is it true for you?
Comment 25 Erik Boritsch 2008-07-04 02:40:32 UTC
Yes, it is true. Brightness didn't change unless I've booted with acpi_osi="!Windows 2006".
Now it does and no events are generated. Thanks for the info.
Comment 26 Zhang Rui 2008-07-06 20:07:38 UTC
According to the acpidump attached,
if acpi_osi="Windows 2006", the AML code tries to find out a LCD device (devide id equals 0x0400) to send the event to, unfortunately, it fails to find any and this is why no ACPI events when pressing hotkey.
if acpi_osi="!Windows 2006", the AML code uses the legacy way (poking LBB register in the graphics device's pci config space) to change the backlight directly.

Please attach the output of "grep . /proc/acpi/video/GFX0/*/*".
Comment 27 Erik Boritsch 2008-07-06 23:21:26 UTC
# grep . /proc/acpi/video/GFX0/*/*
/proc/acpi/video/GFX0/DD01/brightness:<not supported>
/proc/acpi/video/GFX0/DD01/EDID:<not supported>
/proc/acpi/video/GFX0/DD01/info:device_id:    0x0100
/proc/acpi/video/GFX0/DD01/info:type:         UNKNOWN
/proc/acpi/video/GFX0/DD01/info:known by bios: no
/proc/acpi/video/GFX0/DD01/state:state:     0x1d
/proc/acpi/video/GFX0/DD01/state:query:     0x00
/proc/acpi/video/GFX0/DD02/brightness:levels:  75 13 13 25 38 50 63 75 88 100
/proc/acpi/video/GFX0/DD02/brightness:current: 13
/proc/acpi/video/GFX0/DD02/EDID:<not supported>
/proc/acpi/video/GFX0/DD02/info:device_id:    0x0410
/proc/acpi/video/GFX0/DD02/info:type:         UNKNOWN
/proc/acpi/video/GFX0/DD02/info:known by bios: no
/proc/acpi/video/GFX0/DD02/state:state:     0x1d
/proc/acpi/video/GFX0/DD02/state:query:     0x00
/proc/acpi/video/GFX0/DD03/brightness:<not supported>
/proc/acpi/video/GFX0/DD03/EDID:<not supported>
/proc/acpi/video/GFX0/DD03/info:device_id:    0x0003
/proc/acpi/video/GFX0/DD03/info:type:         UNKNOWN
/proc/acpi/video/GFX0/DD03/info:known by bios: no
/proc/acpi/video/GFX0/DD03/state:state:     0x1d
/proc/acpi/video/GFX0/DD03/state:query:     0x00
/proc/acpi/video/GFX0/DD04/brightness:<not supported>
/proc/acpi/video/GFX0/DD04/EDID:<not supported>
/proc/acpi/video/GFX0/DD04/info:device_id:    0x0004
/proc/acpi/video/GFX0/DD04/info:type:         UNKNOWN
/proc/acpi/video/GFX0/DD04/info:known by bios: no
/proc/acpi/video/GFX0/DD04/state:state:     0x1d
/proc/acpi/video/GFX0/DD04/state:query:     0x00
/proc/acpi/video/GFX0/DD05/brightness:<not supported>
/proc/acpi/video/GFX0/DD05/EDID:<not supported>
/proc/acpi/video/GFX0/DD05/info:device_id:    0x0005
/proc/acpi/video/GFX0/DD05/info:type:         UNKNOWN
/proc/acpi/video/GFX0/DD05/info:known by bios: no
/proc/acpi/video/GFX0/DD05/state:state:     0x1d
/proc/acpi/video/GFX0/DD05/state:query:     0x00
Comment 28 Zhang Rui 2008-07-06 23:45:15 UTC
(In reply to comment #26)
> if acpi_osi="!Windows 2006", the AML code uses the legacy way (poking LBB
> register in the graphics device's pci config space) to change the backlight
> directly.
> 
this is wrong, sorry, I mixed it up with another bug.
the AML code pokes the EC address space to change the backlight in your laptop.


/proc/acpi/video/GFX0/DD02/brightness:levels:  75 13 13 25 38 50 63 75 88 100
/proc/acpi/video/GFX0/DD02/brightness:current: 13
/proc/acpi/video/GFX0/DD02/info:device_id:    0x0410

This is the LCD device and the AML code tries to send ACPI event to this device.
But the stupid AML code keeps on looking for a device with device equals 0x0400, and of course it fails all the time.
 If (LEqual (And (0xFFFF, DID1), 0x0400))
{
  Notify (^^^GFX0.DD01, 0x86)
 }
If (LEqual (And (0xFFFF, DID2), 0x0400))
{
 Notify (^^^GFX0.DD02, 0x86)
}
If (LEqual (And (0xFFFF, DID3), 0x0400))
{
   Notify (^^^GFX0.DD03, 0x86)
}
If (LEqual (And (0xFFFF, DID4), 0x0400))
{
 Notify (^^^GFX0.DD04, 0x86)
}
If (LEqual (And (0xFFFF, DID5), 0x0400))
{
  Notify (^^^GFX0.DD05, 0x86)
}

Given that the BIOS already knows DD02 is the LCD (it exports _BCM/_BCL method for DD02), it's really stupid to check the device id again to decide which device to send the ACPI event to.
So this is rather a BIOS bug than a Linux kernel problem to me.

Unfortunately, we can not use the customized DSDT for your laptop, as there are too many errors when compiling it.

Maximum error count (200) exceeded
ASL Input:  DSDT.dsl - 6378 lines, 214236 bytes, 2473 keywords
Compilation complete. 201 Errors, 0 Warnings, 1 Remarks, 4 Optimizations
Maximum error count (200) exceeded
Segmentation fault

IMO, you should look for some BIOS update to get this problem fixed.
I'll reject this bug as we WILL_NOT_FIX it in Linux kernel.
Please reopen it if you still have some problems.
Comment 29 Erik Boritsch 2008-07-13 08:40:31 UTC
I've noticed that if I boot with acpi_osi="!Windows 2006", the brightness is automatically set to minimum after switching to VT and back to X or after turning the display off. A bit annoying... Any way one can correct this behavior or is it also a BIOS bug?
Comment 30 Erik Boritsch 2008-07-13 14:48:09 UTC
Correction, this behavior it there even without acpi_osi="!Windows 2006". Another issue is that closing the lid sends exactly the same event  to /dev/input/event6 (Video Bus) as Fn-F4 (KEY_SWITCHVIDEOMODE). That's weird because the lid button has it's own entry in /dev/input/ which works fine.
I post it here because I don't know whether it is an intended behavior, BIOS bug or if I should file a new bug.
Comment 31 Zhang Rui 2008-07-13 18:12:22 UTC
re comment #29,
it's a BIOS problem IMO.

re comment #30,
please open another bug report. :)