屏幕黑下去后,再按POWER键只有背光没有图像

按POWER键进入idle模式时,logcat输出:
request_suspend_state: sleep (0->3) at 26963560170 (2010-01-01 12:00:26.982533335 UTC)
IT7260_ts_i2c call suspend
I/power   (   72): *** set_screen_state 0
D/SurfaceFlinger(   72): About to give-up screen, flinger = 0x20b430
E/SurfaceFlinger(   72): ioctl(27, VT_RELDISP, 1) failed 22 (Invalid argument)
stop_drawing_early_suspend: timeout waiting for userspace to stop drawing

出错了。 开始搜索SurfaceFlinger中的VT_RELDISP,然后结合kernel中对此参数的
处理,没有发现什么有价值的东西,然后追踪最后一句:
stop_drawing_early_suspend: timeout waiting for userspace to stop drawing
jeff@microlink-desktop:kernel$ grep "timeout waiting for userspace to stop drawing" . -r
Binary file ./.tmp_vmlinux1 matches
Binary file ./vmlinux matches
Binary file ./.tmp_vmlinux2 matches
Binary file ./vmlinux.o matches
Binary file ./arch/arm/boot/Image matches
Binary file ./kernel/built-in.o matches
Binary file ./kernel/power/built-in.o matches
Binary file ./kernel/power/fbearlysuspend.o matches
jeff@microlink-desktop:kernel$ 
目标文件中包含字符,可源代码中没有搜索到,于是缩短些搜索:
jeff@microlink-desktop:kernel$ grep "to stop drawing" . -r                                      
Binary file ./.tmp_vmlinux1 matches
Binary file ./vmlinux matches
Binary file ./.tmp_vmlinux2 matches
Binary file ./vmlinux.o matches
Binary file ./arch/arm/boot/Image matches
Binary file ./kernel/built-in.o matches
Binary file ./kernel/power/built-in.o matches
./kernel/power/fbearlysuspend.c:/* tell userspace to stop drawing, wait for it to stop */
./kernel/power/fbearlysuspend.c:                           "userspace to stop drawing\n");
Binary file ./kernel/power/fbearlysuspend.o matches
jeff@microlink-desktop:kernel$ 
这下终于有带.c的文件了,查看 kernel/power/Makefile
obj-$(CONFIG_FB_EARLYSUSPEND)   += fbearlysuspend.o
查看kernel根目录下的.config
jeff@microlink-desktop:kernel$ cat .config | grep "CONFIG_FB_EARLYSUSPEND"
CONFIG_FB_EARLYSUSPEND=y
然后再查看之前android2.2内核2.6.32.9中的这项
jeff@microlink-desktop:kernel$ cat .config | grep "CONFIG_FB_EARLYSUSPEND"
# CONFIG_FB_EARLYSUSPEND is not set
于是
Power management options  --->
   User-space screen access (Sysfs interface)  --->
         ( ) None                                           
         (X) Console switch on early-suspend
         ( ) Sysfs interface     
编译烧写,OK!


BTW:
Device Drivers ->Graphics support  --->Console display driver support  ---> 
此选项需要先选中
Device Drivers ->Character devices  --->[*] Virtual terminal 

你可能感兴趣的:(android,File,Access,interface,Terminal,2010)