Bug 11936 (lightkeyboardkill) - FN+light keys kill the keyboard - Samsung Q70
Summary: FN+light keys kill the keyboard - Samsung Q70
Status: REJECTED INSUFFICIENT_DATA
Alias: lightkeyboardkill
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-01 13:51 UTC by Felix Kaminsky
Modified: 2009-08-18 07:41 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.27-7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
acpidump (153.81 KB, application/octet-stream)
2008-11-01 13:58 UTC, Felix Kaminsky
Details
Dmesg (45.35 KB, application/octet-stream)
2008-11-01 14:00 UTC, Felix Kaminsky
Details
try the debug patch which prints the evaluated _Qxx object (597 bytes, patch)
2008-11-02 19:23 UTC, ykzhao
Details | Diff
Output of lspci -vxxx (12.74 KB, text/plain)
2009-06-09 20:56 UTC, Alex Masidlover
Details
dmesg from git kernel (45.75 KB, text/plain)
2009-06-24 07:10 UTC, Alex Masidlover
Details
patch: more debug info (748 bytes, patch)
2009-06-24 07:43 UTC, Zhang Rui
Details | Diff
dmesg from git kernel with Patch applied (46.71 KB, text/x-log)
2009-08-17 20:45 UTC, Alex Masidlover
Details

Description Felix Kaminsky 2008-11-01 13:51:02 UTC
Latest working kernel version: never worked
Earliest failing kernel version: 2.6.27-7
Distribution: Ubuntu 8.10
Hardware Environment: Samsung Q70
Software Environment:
Problem Description:
I installed the latest Ubuntu 8.10.
Since the new kernel version the FN key for the background light started working sadly not properly.
When used the button either kills the light completely or powers it up fully.
It also disables the keyboard completely.
Depending on the bug http://bugzilla.kernel.org/show_bug.cgi?id=10448 I run with video.ko disabled.

Steps to reproduce:FN + Up/Down (FN keys for controlling the background light)
Comment 1 Felix Kaminsky 2008-11-01 13:58:36 UTC
Created attachment 18585 [details]
acpidump
Comment 2 Felix Kaminsky 2008-11-01 14:00:13 UTC
Created attachment 18586 [details]
Dmesg
Comment 3 ykzhao 2008-11-02 19:23:02 UTC
Created attachment 18603 [details]
try the debug patch which prints the evaluated _Qxx object 

Will you please try the debug patch and do the following test after the system is booted?
    a. echo 0x010004 > /sys/module/acpi/parameters/debug_layer && echo 0x001f >
 /sys/module/acpi/parameters/debug_level
    b. press Fn + F4/F5(twice) to change the brightness.
    c. then attach the output of dmesg.

It will be great if you can attach the output of lspci -vxxx.
   Thanks.
Comment 4 Zhang Rui 2008-11-02 19:24:01 UTC
the problem disappears if video.ko is disabled?

in the old & working kernel, please run "grep . /sys/firmware/acpi/interrupts/*" both before and after pressing the fn+light keys and attach the test result.
Comment 5 Zhang Rui 2008-11-02 19:24:43 UTC
Please try to revert this patch and see if it helps.

commit c2c789057f075022658b38b498755c29c1ba8055
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Jul 17 10:46:05 2008 +0800

    ACPI: Ignore _BQC object when registering backlight device

    According to acpi spec , the objectes of  _BCL and _BCM are required if
    integrated LCD is present and supports brightness level and the _BQC is
    the optional object. So the _BQC object will be ignored when the backlight
    device is registered.
    At the same time when there is no _BQC object, the current brightness will be
    set to the maximum.

    http://bugzilla.kernel.org/show_bug.cgi?id=10206

    Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
    Signed-off-by: Zhang Rui  <rui.zhang@intel.com>
    Signed-off-by: Andi Kleen <ak@linux.intel.com>

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 64c8893..e32b6c1 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -741,7 +741,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)

        max_level = acpi_video_init_brightness(device);

-       if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
+       if (device->cap._BCL && device->cap._BCM && max_level > 0) {
                int result;
                static int count = 0;
                char *name;
@@ -753,7 +753,17 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
                device->backlight = backlight_device_register(name,
                        NULL, device, &acpi_backlight_ops);
                device->backlight->props.max_brightness = device->brightness->count-3;
-               device->backlight->props.brightness = acpi_video_get_brightness(device->backlight);
+               /*
+                * If there exists the _BQC object, the _BQC object will be
+                * called to get the current backlight brightness. Otherwise
+                * the brightness will be set to the maximum.
+                */
+               if (device->cap._BQC)
+                       device->backlight->props.brightness =
+                               acpi_video_get_brightness(device->backlight);
+               else
+                       device->backlight->props.brightness =
+                               device->backlight->props.max_brightness;
                backlight_update_status(device->backlight);
                kfree(name);
Comment 6 Len Brown 2008-11-11 21:49:42 UTC
please re-open if this is still an issue in 2.6.28-rc4 or later
when running with the i915 driver loaded.
Comment 7 Alex Masidlover 2009-06-09 20:55:24 UTC
I'm using Ubuntu with kernel 2.6.28-11-generic and have this issue.

I've tried reverting the suggested patch above (comment #5) and adding the extra debug in comment #3 - I've enabled CONFIG_ACPI_DEBUG=y but still don't get anything ACPI related in the dmesg output. 

Will add the output of lspci as requested.
Comment 8 Alex Masidlover 2009-06-09 20:56:28 UTC
Created attachment 21834 [details]
Output of lspci -vxxx
Comment 9 Zhang Rui 2009-06-10 02:47:33 UTC
does the problem still exist if you boot with acpi_backlight=vendor?
Comment 10 Alex Masidlover 2009-06-10 07:02:44 UTC
The problem still occurs with acpi_backlight=vendor, but thanks for the suggestion.

Further to the original reporter's description the effect of pressing the backlight up/down buttons is that the key press appears to 'repeat' and no other keys on the keyboard then work apart from the backlight keys - so if the reduce backlight button is pressed then the brightness reduces to zero at approx. 2 or 3 steps per second, likewise the increase button causes the brightness to try and increase at the same rate.
Comment 11 Alex Masidlover 2009-06-19 17:14:18 UTC
Just a note to anyone else who's having this problem - I have a temporary work-around; if you suspend (or hibernate) the laptop and the wake it up twice then normal functionality is restored (after the first suspend/wake you get keyboard back but no mouse).

Its far from ideal, but given the proximity of Home and End to the 'brighter' key, its better than nothing...
Comment 12 Zhang Rui 2009-06-22 03:02:24 UTC
please try the latest git kernel and build with this configuration:
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_DEBUG=y
CONFIG_DRM=y
CONFIG_DRM_I915=y
CONFIG_DRM_I915_KMS=y
reboot and load the ACPI video driver,
please attach the output of "grep . /sys/class/backlight/*/*"
if it's not empty, can you change the backlight via this I/F?
Comment 13 Alex Masidlover 2009-06-22 18:49:50 UTC
Do you mean this git kernel:

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Or the ubuntu git kernel?

Also, not sure if its relevant, but the backlight can be controlled using the gnome-applet (only discovered that yesterday) - without disabling the keyboard.
Comment 14 Zhang Rui 2009-06-23 07:19:16 UTC
I mean git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

is your laptop also Samsung Q70? I just noticed that you're not the original bug reporter.
Comment 15 Alex Masidlover 2009-06-23 07:26:15 UTC
Yes, it is also a Samsung Q70.

I should get chance to build the new kernel later today.
Comment 16 Alex Masidlover 2009-06-24 07:09:39 UTC
Built the git kernel - The output of grep . /sys/class/backlight/*/* was 'no such file or directory' - couldn't therefore try adjusting the backlight using it...

I'm attaching the dmesg from the git kernel in case that helps. 

Also, I suspect its not relevant, but GDM/X don't come up properly with the new screen (no cursor, no response from mouse or keyboard, ctrl/alt/backspace does nothing) - so I had to boot with gdm disabled to do the tests.
Comment 17 Alex Masidlover 2009-06-24 07:10:23 UTC
Created attachment 22077 [details]
dmesg from git kernel
Comment 18 Zhang Rui 2009-06-24 07:43:45 UTC
Created attachment 22079 [details]
patch: more debug info

please try this debug patch and attach the dmesg output, so that we can see why the backlight control I/F is not registered.
Comment 19 Alex Masidlover 2009-08-17 20:45:45 UTC
Created attachment 22758 [details]
dmesg from git kernel with Patch applied
Comment 20 Zhang Rui 2009-08-18 07:41:22 UTC
please try the patch at http://patchwork.kernel.org/patch/38246/ and see if it
helps.

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