View Single Post
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#495
Originally Posted by tso View Post
i think this should hold a log of the event in question.
[2] [8.476104] [DBUS] power button pressed (blank=0)
[2] [10.190857] event 4 (screen press)
[2] [10.367950] event 5 (screen release)
[2] [11.911529] event 4
[2] [12.115478] event 5 (another screen tap)
[2] [13.247558] event 4
[2] [13.326446] event 5 (and a third time to unmap ASUI)
[2] [13.326446] window_unmap()
[2] [30.369629] [DBUS] power button pressed (blank=0)
[2] [30.376190] window_map() - can't get keyboard, unmap
[2] [31.483551] [DBUS] signal: com.nokia.mce.signal.tklock_mode_ind (lock)
[2] [34.750763] displayed turns off briefly, until power button is pressed
[2] [36.074096] [DBUS] power button pressed (blank=0)
[2] [36.265930] [DBUS] signal: com.nokia.mce.signal.tklock_mode_ind (unlock)

You pressed power button three times, a menu or something prevented it from mapping ASUI on the second press but it did lock the screen&keys and the third press unlocked the screen&keys. It didn't receive any key events so you should've only seen the "press dpad" notification when pressing power button, was it also appearing when pressing the keys? Or was it continuously reappearing when not pressing keys?

When power button is pressed the screen and keys are unlocked but MCE remains in a locked state so there would be no sounds. ASUI must then tell MCE to unlock if no secondary key or manually disables the screen and makes sure keys are not disabled so you can press the secondary key. It could be that my functions to control keypad and screen aren't working correctly on n800.

Can you confirm via SSH with device unlocked and working correctly that the following locks and then unlocks the hardware keys (n800)?
Code:
echo 1 > /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_kp
echo 0 > /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_kp
Does /sys/devices/platform/i2c_omap.2/i2c-0/0-0045/disable_kp (n810) exist and does it lock/unlock keys when writing 1 and 0 to it?

Does writing 1 and 0 to /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_ts lock (n800 and n810) and unlock the screen?

I have been rewriting all of the power button handler code in an attempt to only have it activate on short presses. It failed to work since MCE doesn't send the short press signal when device is locked, screen is locked or when alarm is active. It did however result in much cleaner handling code and eliminated several issues but I need to test it more before breaking anyones tablets and I doubt it would resolve your current problem.


Originally Posted by maacruz View Post
There are some funny race conditions around hardware keys and touchscreen locking
- once the cursor keys were inverted (left to right, up to down), I had to rotate the screen up to down and then back to normal to get them working right
The dpad arrows should only change orientation when the screen is rotated and never when locking the screen. I'll look at the rotate code and make sure it always adjusts the arrows.


Originally Posted by maacruz View Post
- sometimes it says I have to press the key to unlock but the touchscreen is not locked
- sometimes the touchscreen is locked but not the keys
Let me know if this is still a problem after I release the new code, and if it is try to let me know what conditions cause it.

Originally Posted by maacruz View Post
Unrelated, may be already not relevant, on monday I've seen abnormally high battery comsumption with 0.5.2, about 0.8%/hour, with the device completely idle. It hasn't repeated again with 0.5.3, so may be you fixed the cause, or it is another race condition.
Kroll mentioned some abnormal battery drain a couple releases back and I optimized a few of the hardware polls but none of the changes shouldv'e made any noticable changes in battery life. The loop goes to sleep when screen is off or ASUI is unmapped and only dbus signals will wake it briefly. You can test this by installing the debug binary and watching its log while the screen is off or ASUI is unmapped.

For a couple months now I've had a 0.4%/minute drain, with no load and screen off, after turning off wifi or entering flight mode. Even happened after I reformated and hadn't yet installed ASUI. I had to reboot every time I used wifi. Recently found out that if I stop ssh and all wifi services the problem goes away. So your 0.8%/hour is nothing!