[Sprint Samsung Galaxy Note II] ffolkes:
Some exciting stuff has been added to the newest version, or at least I think so. :D Also, if anyone wants to donate, it would be much appreciated now. The past few months have been difficult, and I have a Sprint payment arrangement coming up that currently I will not be able to meet. But enough depressing stuff, onto the new features!

:) DONATE :)

After seeing a commit by DerTeufel that brought some Slide2Wake to our devices, I was inspired to expound upon it. A few days later, I coded every Slide2Wake related feature I can think of, and it all seems to be working well. Together, you don't even need a power button anymore.

What is Slide2Wake?

For those that don't know, it's exactly what it says it is. I'm not sure who actually introduced the concept a few years ago, as it has been ported many times. It holds a persistent wakelock that keeps the digitizer active (but panel turned off). This means any swipe across the screen at any time will wake your device. Coupled with the options I added, and the additional features I added to the gesture engine a few months ago, it is possible to have an entirely power-buttonless GN2 experience.

What can I do with it?

You can disable your system lockscreen and power button, and then use Slide2Wake to exclusively unlock your phone in one step!

In STweaks, go to the Screen tab.

Enable Touchwake/Slide2Wake.

Enable persistent mode.

Enable wake from swipe only.

Tap "Apply".

Verify Slide2Wake is functioning: Press your power button. When the screen turns off, swipe from left to right (portrait only), being sure to start ALL the way to the left and stop ALL the way to the right. It should wake. Proceed.

Enable ignore touch keys will screen off.

Enable ignore power key while screen is off.

Tap "Apply".

Go to (Android) System Settings->Security and disable the system lockscreen.

Most ROMs have settings to change the function of the Home button. Disable it if you want Slide2Wake to be the only way to wake your device.

And to enable the power-off gesture (works regardless of Touchwake)

In STweaks, go to the Screen tab.

Enable touch gestures.

Set a touchkey modifier delay. Try 150, 175, or 200.

Tap "Apply".

Use your thumb to touch a touchkey, outstretch your index or middle finger, swipe down, and lift your fingers. Your goal is to cross an imaginary line 1/3 of the way down the display. You don't need to swipe far, just as long as that line is crossed at some point. When activated, the power key will be pressed and the device will enter suspend/screen-off. Works with or without Touchwake/Slide2Wake. It just works well with it, since it offers a touch-based way of turning off your device.

How much power does it use?

While active, your phone will be holding a wakelock and keeping the digitizer turned on at all times. This does affect battery. In my testing, I had an average hourly idle drain of 1.2% with it off, and 1.5% with it on. When frequently using your phone, the ease in unlocking may be worth it, so you can use the gesture to easily toggle it. In the future I should be able to get it to go into deep sleep and still work, as the processing happens at the driver level with the touchscreen interrupt. At the moment, I've laid the framework, but I can't figure out how to actually wake it - power key input events have no effect on waking when it's in deep sleep. There must be something else I'm not aware of to trigger a "real" wake. When I have more time I will look into this.

How can I save more power?

While active, your phone will be at the mercy of the governor. PegasusQ has screen-off functionality that comes in very handy. If you are using that governor, follow these steps:

In STweaks, go to the PegasusQ Scaling tab.

Set "Screen-off frequency for responsiveness" to the same thing you set the max frequency to in the step-after-next

Scroll down to PegasusQ Screen-Off Policies

Set CPU screen-off max frequency to 300 MHz.

If you encounter problems with skipping music, etc, try setting it higher than 300 MHz.

If you encounter stability problems, try enabling "Keep sleep max frequency fixed" and setting the dropdown below it to 200 Mhz.

How can I avoid accidental wakes? How come my swipes aren't triggering?

There are three settings, "Swipe Y-axis tolerance", "Swipe maximum pressure", and "Swipe angle tolerance" that can help. It is probably best to set them all very high, then focus on one, gradually lowering it and testing before moving on to the next setting. That way you will only be dealing with one variable at a time. Although if you max them all out and don't have any accidental wakes, then that's awesome for you, as it will be easier to unlock the screen. But if you find the phone has turned on while in a pocket or something, you'll have to play with these settings.

Set "Swipe Y-axis tolerance" to a higher value to require a less-straight line. Set it lower if you have accidental wakes.

Set "Swipe maximum pressure" to a higher value to allow "wider" (aka more pressure) input to trigger it. If you go too high, resting body parts might trigger it. So, set it lower if you have accidental wakes. Set it higher if you have a forceful touch or large fingers and your normal swipe motion is being ignored.

Set "Swipe angle tolerance" to a higher value to accept more swipes. If you're having trouble with your swipes not consistently being recognized, this parameter is probably why - so try increasing it. Since a finger touch is usually oval, the digitizer calculates an angle based on that. The lower this is, the more perfectly parallel to the screen (in terms of rotation) you'll have to swipe. Set it lower if you find light, errant touches are triggering a wake.

In STweaks, go to the PegasusQ Scaling tab.

Scroll down to PegasusQ Screen-Off Policies.

Set CPU screen-off max frequency to 300 MHz.

If you encounter problems with skipping music, etc, try setting it higher than 300 MHz.

If you encounter stability problems, try enabling "Keep sleep max frequency fixed" and setting the dropdown below it to 200 Mhz.

New Options in STweaks

[Enable Touchwake/Slide2Wake] - This is the same as the old "Enable Touchwake" and does exactly what it says.

[Enable persistent Touchwake mode] - This is basically Slide2Wake. But with no other options selected, this will function more like Tap2Wake. This is the persistent wake-lock. There is a special gesture dedicated to toggling this.

[Wake from swipe only] - Normally a tap anywhere will trigger Touchwake, enabling this makes it so only a swipe from left to right will. You can swipe at any height on the screen. This affects normal Touchwake behavior, as well as obviously being the "slide" part of Slide2Wake.

[Swipe Y-axis tolerance] - As your finger swipes, your vertical movement will have to stay within this threshold or else the swipe will be ignored until you lift your finger. This can be thought of as how straight your swipe will have to be to trigger.

[Swipe maximum pressure] - Pocket wakes were a big issue in my own personal experience. Fortunately they are fairly easy to weed out, since the touch area of your leg is dramatically larger than a finger. Tests showed a pressure "size" of 200+ for a pocket press, and <20 for an average finger. This is set to 25 by default. If you have very large fingers, you might need to increase this. If you have accidental wakes, you might need to decrease this.

[Swipe angle tolerance] - Since fingerprints are ovals, this is the angle that oval is on. If you extend your finger and wag it, you are changing its angle. The closer you are to 0 degrees (perfectly parallel to the screen), the lower your angle is. If you have accidental wakes, you might need to decrease this.

[Trigger swipe before finger up] - By default your swipe has to end (lift) within the last 10% of the right side of the screen, which makes the trigger more secure, but takes time. Enabling this option will trigger the moment your finger enters that final 10% of the screen, even if your finger is still down.

[Force tap wake after screen timeout] - To put it simply, this is Slide2Wake+Touchwake. When the screen times out, regardless of your settings, you will always have the period defined below to simply tap to wake.

[Ignore touchkeys while screen is off] - Prevents the touchkeys from triggering Touchwake. Still works for gestures that require a touchkey modifier, if gestures themselves are enabled.

[Ignore power key while screen is off] - This is interesting. When Touchwake is active and the screen is off, the power key will be ignored. When you wake the device, the power key will function normally, then return to being ignored when the screen is back off. This allows you to disable the lockscreen and use Slide2Wake instead, without fear that the power button will turn on your lockscreenless phone in your pocket.

[Ignore kernel gestures while screen is off] - Normally, the gesture engine remains on while a persistent lock (aka Slide2Wake) is being held. Seeing as the digitizer is still on, you might accidentally trigger gestures. Enable this option to disable the gesture engine while the screen is off and Touchwake is active.

[Grace period after screen times out] - How long you have to trigger Touchwake after the screen times out. In Slide2Wake mode, this is the length of time after a screen out during which a simple tap will wake the screen.

[Grace period after any power off event] - If you have a tendency to turn your phone off and immediately remember you had to do something else, this gives you a grace period to do so, during which a tap will wake it. Ideally, this shouldn't be set to more than a few seconds at most. Basically, Touchwake works only on screen timeout, this extends it to work ANY time the device is sent into suspend.

New Gesture Stuff

Previously you needed to install the gesture pack to use any gesture. Now, the power-off gesture (#1) and the Touchwake persistence toggle (#2) are enabled by default, even without the gesture pack installed. Their trigger areas hardcoded, but can be overwritten by installing the gesture pack and then customized to whatever you like.

Gesture #1 - Power off

Newly redesigned. Use your thumb to touch a touchkey, while swiping a finger (index or middle work best) down from the top of the screen towards the bottom. The actual gesture triggering "line" is 1/3 from the top of the screen. So just imagine a line going across, and you need to cross it with a swipe while pressing a touchkey in order to trigger it.

Gesture #2 - Toggle Touchwake persistence

Since persistent Touchwake holds a wakelock indefinitely, this means your device will never enter deep sleep. Depending on your usage habits, this might waste more battery than you'd like. However, waking up out of deep sleep (and waiting for the infamous Samsung delay) to reply to a flurry of texts or IMs can be very annoying. With this gesture, you can easily turn Slide2Wake on, and get rid of the delay, then turn it off when your conversation is over. The gesture requires you to swipe from left to right while holding down a touchkey. This gesture can even be performed while the screen is off (assuming the persistent lock is active), but once the gesture turns it off, the wakelock will clear and the digitizer will turn off, so you'll have to turn the device on manually to toggle it back on with the gesture.

Plasma kernel 2.0b7 / New gesture pack

- Linux 3.0.99

- Voodoo/sound-control support. It is usually best to enable only one in STweaks, then reboot.

- Slide2Wake

- Expanded Slide2Wake functionality (as described above)

- Enhanced processing for the power off gesture (gesture #1) for easier use

- Kernel-level processing of the power-off gesture event (it's just about instant now!)

- Native support for the power and "Touchwake persistence" gestures, regardless of whether or not you have the Gesture Pack installed. You just need to have the gesture engine enabled in STweaks.

- Hours of debugging Slide2Wake

- Dramatically increased swipe detection, accuracy and reliability for Slide2Wake

- Options to customize swipe sensitivity (as described above)

- Came back and added even more swipe detection accuracy