I found a strange thing: if I do not change the owner of /sys/android_power/ acquire_partial_wake_lock ,to radio system ,then the libhardware.so complain that permission denied,and the touch screen can respond at top bar.
but ,if the owner of acquire_partial_wake_lock are changed to radio system ,the complaints disappeared,however,the touch screen don't respond anymore. and if the permission is ok, in hardware/libhardware/power/power.c. 1.the acquire_wake_lock() function can return true 2.the acquire_partial_wake_lock can be opened and written a word "wake" in function set_screen_state() so I conducted a mix test by hack the /power/power.c to found who makes the ts don't respond. and found that: only the the condition that acquire_wake_lock() function can NOT return true and the acquire_partial_wake_lock can NOT be written ,the ts can respond. I am very confused of these things ,anyone tell me what happened and how to do? Thanks -Weber On 3月22日, 下午9时28分, Weber <[email protected]> wrote: > when i add some LOG in EventHub.cpp,I found that:when open > acquire_partial_wake_lock ,it return permission denied > I/power ( 679): *** set_screen_state 1 > I/power ( 679): go_to_sleep now=44106449000 g_error=Permission > denied > so I changed the mod in init.rc > chmod 0666 /sys/android_power/acquire_partial_wake_lock > this time it can be open but the ts has no response now ,it has top > bar slide before the mod being changed > > and my new logcat is attached,here are some of it > 604 I/SurfaceFlinger( 659): Client API: OpenGL ES > 605 I/EGLDisplaySurface( 659): using (fd=21) > 606 I/EGLDisplaySurface( 659): id = s3cfb > 607 I/EGLDisplaySurface( 659): xres = 240 px > 608 I/EGLDisplaySurface( 659): yres = 320 px > 609 I/EGLDisplaySurface( 659): xres_virtual = 240 px > 610 I/EGLDisplaySurface( 659): yres_virtual = 640 px > 611 I/EGLDisplaySurface( 659): bpp = 16 > 612 I/EGLDisplaySurface( 659): r = 11:5 > 613 I/EGLDisplaySurface( 659): g = 5:6 > 614 I/EGLDisplaySurface( 659): b = 0:5 > 615 I/EGLDisplaySurface( 659): width = 240 mm (25.400000 dpi) > 616 I/EGLDisplaySurface( 659): height = 320 mm (25.400000 dpi) > 617 I/EGLDisplaySurface( 659): refresh rate = 2.21 Hz > 878 I/power ( 659): acquire_wake_lock lock=1 id='KeyEvents' > 879 I/power ( 659): Weber@ partial_wake_lock,fd='39' > 880 E/EventHub( 659): could not get driver version for /dev/input/ > ts0, Invalid argument > 881 I/EventHub( 659): Weber@,could not get idstring for /dev/input/ > event1, No such file or directory > 882 I/EventHub( 659): add device 1: /dev/input/event1 > 883 I/EventHub( 659): bus: 0013 > 884 I/EventHub( 659): vendor dead > 885 I/EventHub( 659): product beef > 886 I/EventHub( 659): version 0101 > 887 I/EventHub( 659): name: "S3C-TouchScreen" > 888 I/EventHub( 659): location: "input(ts)" > 889 I/EventHub( 659): id: "" > 890 I/EventHub( 659): version: 1.0.0 > > 961 I/EventHub( 659): New device: path=/dev/input/event1 name=S3C- > TouchScreen id=0x10000 (of 0x1) index=1 fd= 47 classes=0x2 > 1044 I/EventHub( 659): New device: path=/dev/input/event0 name=s3c- > keypad id=0x10001 (of 0x2) index=2 fd=50 cl asses=0x1 > 1046 I/EventHub( 659): Reporting device opened: id=0x10001, name=/dev/ > input/event0 > 1047 I/KeyInputQueue( 659): Device added: id=0x0, name=s3c-keypad, > classes=1 > 1048 I/power ( 659): acquire_wake_lock lock=1 > id='PowerManagerService' > 1049 I/power ( 659): Weber@ partial_wake_lock,fd='39' > 1050 I/EventHub( 659): Reporting device opened: id=0x10000, name=/dev/ > input/event1 > 1051 I/KeyInputQueue( 659): Device added: id=0x10000, name=null, > classes=2 > 1052 I/KeyInputQueue( 659): X: min=0 max=240 flat=0 fuzz=0 > 1053 I/KeyInputQueue( 659): Y: min=0 max=320 flat=0 fuzz=0 > 1054 I/KeyInputQueue( 659): Pressure: min=0 max=1 flat=0 fuzz=0 > 1055 I/KeyInputQueue( 659): Size: unknown values > > 4465 I/ActivityManager( 659): Process android.process.acore (pid 744) > has died. > 4466 I/WindowManager( 659): WIN DEATH: Window{435785e0 > com.android.launcher/com.android.launcher.Launcher} > > thank you all > > --Weber > > On Mar 12, 11:32 am, Weber <[email protected]> wrote: > > > > > Hi,guys > > Following Achim's advice (Thank you ,Achim ),I added some LOGI in > > EventHub.cpp,and the output of logcat is as follows: > > E/EventHub( 679): could not get driver version for /dev/input/ts0, > > Invalid argument > > I/EventHub( 679): New device: path=/dev/input/event1 name=S3C > > TouchScreen id=0x10000 (of 0x1) index=1 fd=40 classes=0x4 > > E/EventHub( 679): could not get driver version for /dev/input/mouse0, > > Not a typewriter > > E/EventHub( 679): could not get driver version for /dev/input/mice, > > Not a typewriter > > I/EventHub( 679): New device: path=/dev/input/event0 name=s3c-keypad > > id=0x10001 (of 0x2) index=2 fd=43 classes=0x3 > > I/EventHub( 679): New keyboard: publicID=65537 device->id=65537 > > devname='s3c-keypad' propName='hw.keyboards.65537.devname' keylayout='/ > > system/usr/keylayout/qwerty.kl' > > I/KeyInputQueue( 679): Device added: id=0x0, name=s3c-keypad, > > classes=3 > > I/power ( 679): acquire_wake_lock lock=1 id='PowerManagerService' > > I/KeyInputQueue( 679): Device added: id=0x10000, name=null, classes=4 > > I/KeyInputQueue( 679): X: min=0 max=240 flat=0 fuzz=0 > > I/KeyInputQueue( 679): Y: min=0 max=320 flat=0 fuzz=0 > > I/KeyInputQueue( 679): Pressure: min=0 max=1 flat=0 fuzz=0 > > I/KeyInputQueue( 679): Size: unknown values > > I/power ( 679): release_wake_lock id='KeyEvents' > > I/power ( 679): *** set_screen_state 1 > > I/power ( 679): go_to_sleep now=44104839000 g_error=Permission > > denied > > I/power ( 679): *** set_screen_state 1 > > I/power ( 679): go_to_sleep now=44106449000 g_error=Permission > > denied > > I/power ( 679): release_wake_lock id='PowerManagerService' > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/EventHub( 679): qiu@ In EventHub, poll 3, returned 1 > > I/KeyInputQueue( 679): Device added: id=0x0, name=s3c-keypad, > > classes=3 > > I/power ( 679): acquire_wake_lock lock=1 id='PowerManagerService' > > I/KeyInputQueue( 679): Device added: id=0x10000, name=null, classes=4 > > I/KeyInputQueue( 679): X: min=0 max=240 flat=0 fuzz=0 > > I/KeyInputQueue( 679): Y: min=0 max=320 flat=0 fuzz=0 > > I/KeyInputQueue( 679): Pressure: min=0 max=1 flat=0 fuzz=0 > > I/KeyInputQueue( 679): Size: unknown values > > > so what could i do to solve it ? > > Thanks, > > --weber > > On Mar 3, 4:56 pm, Weber <[email protected]> wrote: > > > > Thank you,Achim > > > Could you be more specific? > > > I can get the info(such as posted above) with getevent tool,does this > > > means that poll can get the ts? > > > > On Mar 1, 10:18 pm, AchimNohl <[email protected]> wrote: > > > > > Hi, > > > > > have you tried to debug EventHub::getEvent in frameworks/bas/libs/ui/ > > > > EventHub.cpp? I once had problems with my touchscreen after waking up > > > > from suspend as the device was destroyed and got a new file > > > > descriptor. I finally ended up in debugging this method. It does a > > > > "poll" system call to wait for data on the touchscreen device. You may > > > > want to add some LOGS here to see if it get passed poll when you hit > > > > the ts and see the printk info from the kernel. > > > > > Regards, > > > > Achim- 隐藏被引用文字 - > > - 显示引用的文字 - -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting To unsubscribe, reply using "remove me" as the subject.
