Bug 24253 - [945GMS DRM] screensleep interupts by unexpected keycode
Summary: [945GMS DRM] screensleep interupts by unexpected keycode
Status: CLOSED NOTOURBUG
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: zhang rui
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-01 05:12 UTC by Ivan Yurasov
Modified: 2017-07-24 23:09 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
git bisect log (2.74 KB, application/octet-stream)
2009-10-14 14:57 UTC, Ivan Yurasov
no flags Details
read the input event (1.36 KB, text/x-csrc)
2010-04-12 02:02 UTC, zhang rui
no flags Details
result of "grep . /sys/class/input/input*/*" (5.99 KB, text/plain)
2010-04-12 10:12 UTC, Ivan Yurasov
no flags Details
ACPI Dump MSI Wind U100 (Roverbook Neo U100L) (110.56 KB, text/plain)
2010-04-12 10:14 UTC, Ivan Yurasov
no flags Details

Description Ivan Yurasov 2009-10-01 05:12:40 UTC
Bug description:
when my screen want to turn off (dpms) - It can't
because as soon as screen turn off, someone generate a keycode 232,
and X server wakeup 

i try to put screen off by 
$ xset dpms force off
and still have the same situation!

but if make a
# vbetool dpms off
it turn off and being black until
# vbetool dpms on


it begins with 2.6.29 kernel

System environment: 
-- chipset: 945GMS 
-- system architecture: 32-bit
-- xf86-video-intel: git a92bbcc9490468e7709b3ddaad82bc04607af26
-- xserver: 1.6.3.901
-- mesa: git ae2daacbac7242938cffe0e2409071e030e00863
-- libdrm: git ac71f0849928f4b2fbb69c01304ac6f9df8916a1
-- kernel: 2.6.31.1
-- Linux distribution: ArchLinux
-- Machine or mobo model: MSI Wind U100
-- Display connector: LVDS
Comment 1 Jesse Barnes 2009-10-05 10:43:34 UTC
Sounds like it's not directly related to the DRM driver.  Can you bisect the kernel to find out exactly when this starts happening?
Comment 2 Ivan Yurasov 2009-10-05 23:40:00 UTC
ok,
could you specify me a way to find right commit?
or what source file need to look for changes?
Comment 3 Jesse Barnes 2009-10-06 08:11:04 UTC
If you can build your own kernels, you could use 'git bisect' to find the bad commit.  'git help bisect' describes the steps you need to take.
Comment 4 Ivan Yurasov 2009-10-08 02:25:40 UTC
Thanks for "git bisect"!

I'm still testing kernel commits (it needs 6 or more tests yet)
But now I have a interesting situation:
I have a normal screenslep at X
and interrupts in console (w/o X).
When I set
$ setterm -blank 1
$ cat

(so system wait for my input) and wait for 1 min.
Screen do a on-off cycle and i see 
^@^@
in console, cat still run. But haven't touch anything.
Comment 5 Ivan Yurasov 2009-10-14 14:57:57 UTC
Created attachment 30418 [details]
git bisect log
Comment 6 Ivan Yurasov 2009-10-14 15:06:21 UTC
so, after days of bisecting, git show me first buggy commit:
9be1df98bca44dbe3769cd22f4ab8122b76c5313 is the first bad commit
commit 9be1df98bca44dbe3769cd22f4ab8122b76c5313
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Thu Jan 8 14:11:30 2009 +0000

    bd->props.brightness doesn't reflect the actual backlight level.
    Always invoke backlight_update_status when users want to change
    the backlight.
    
    For setups where brightness change is an expensive operation,
    this could be done in the driver rather than the core.
    
    http://bugzilla.kernel.org/show_bug.cgi?id=12249
    
    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>

:040000 040000 2694cce1b17fc7459d947663fabec8209a2f58da 62e3058a2a44a029887123626dbaa45b03e23b40 M	drivers

if I make a
$ xrandr --output LVDS --set BACKLIGHT_CONTROL native

screensleep works well


but but with "^@^@" in pure term still here
Comment 7 Jesse Barnes 2009-10-14 15:23:48 UTC
Rui, any thoughts here?
Comment 8 Ivan Yurasov 2009-10-14 21:39:59 UTC
xev log:

KeyPress event, serial 32, synthetic NO, window 0x1800001,
    root 0x105, subw 0x0, time 23931912, (-52,31), root:(582,246),
    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1800001,
    root 0x105, subw 0x0, time 23931912, (-52,31), root:(582,246),
    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1800001,
    root 0x105, subw 0x0, time 23932781, (-52,31), root:(582,246),
    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1800001,
    root 0x105, subw 0x0, time 23932781, (-52,31), root:(582,246),
    state 0x0, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Comment 9 Ivan Yurasov 2009-11-02 00:13:15 UTC
more info about MSI's BIOS 

https://bugs.launchpad.net/ubuntu/+source/hal-info/+bug/415023/comments/80
Comment 10 Jesse Barnes 2009-11-20 12:59:06 UTC
Rui or Yakui, any ideas?
Comment 11 Ivan Yurasov 2009-12-08 04:43:16 UTC
xrandr  --output LVDS --set BACKLIGHT_CONTROL legacy

work well too
Comment 12 Gordon Jin 2010-04-12 00:39:14 UTC
(clear NEEDINFO)

Rui? Yakui?
Comment 13 zhang rui 2010-04-12 02:02:27 UTC
Created attachment 34909 [details]
read the input event

please first attach the output of "grep . /sys/class/input/input*/*".

and then do this test,

1. gcc read-input-event.c
2. sudo ./a.out /dev/input/eventX (X = {0, 1, ..., the maximum event index in
/dev/inpout/ })
3. switch off the display
4. watch if there is any output the screen comes back, if yes, please attach
the output so that we can know which input device generates this event.
Comment 14 zhang rui 2010-04-12 02:02:46 UTC
please attach the acpidump as well.
Comment 15 Ivan Yurasov 2010-04-12 10:12:27 UTC
Created attachment 34919 [details]
result of "grep . /sys/class/input/input*/*"
Comment 16 Ivan Yurasov 2010-04-12 10:14:00 UTC
Created attachment 34920 [details]
ACPI Dump MSI Wind U100 (Roverbook Neo U100L)
Comment 17 Ivan Yurasov 2010-04-12 10:15:12 UTC
there is no output of read-input-event.c
from any /dev/input/event[0123456789]
Comment 18 Ivan Yurasov 2010-04-12 10:41:13 UTC
oh sorry, I missed event1 ;)

$ sudo ./a.out /dev/input/event1
event[1] type 0004, code 0004, value 00000247
event[1] type 0001, code 0224, value 00000001
event[1] type 0000, code 0000, value 00000000
event[1] type 0004, code 0004, value 00000247
event[1] type 0001, code 0224, value 00000000
event[1] type 0000, code 0000, value 00000000
event[1] type 0004, code 0004, value 00000247
event[1] type 0001, code 0224, value 00000001
event[1] type 0000, code 0000, value 00000000
event[1] type 0004, code 0004, value 00000247
event[1] type 0001, code 0224, value 00000000
event[1] type 0000, code 0000, value 00000000
^c
$
Comment 19 zhang rui 2010-04-13 00:44:16 UTC
the event is sent from atkb driver...

I don't see why 9be1df98bca44dbe3769cd22f4ab8122b76c5313 introduces this problem.
would you please verify if the problem still exists after reverting this commit?
Comment 20 Ivan Yurasov 2010-04-13 01:39:55 UTC
the parent of 9be1df98bca44dbe3769cd22f4ab8122b76c5313 is 0ec561f4b648260a46ace87acbc558241808455f

so I will try this

If I'm wrong -- please correct me
Comment 21 Jesse Barnes 2011-06-16 11:21:54 UTC
Sounds like an input or ACPI problem, if you still have this issue please re-file at bugzilla.kernel.org against the input layer or send a note to lkml.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.