DoubleTap2Wake... - Nexus 4 General

Hi,
I open this thread to talk about DoubleTap2Wake function on Nexus 4.
I feel the need of this function because my little button power is almost dead
So, to remedy I have enabled the function DoubleTap2Wake through the manager kernel Hellscore Kernel (with Chroma ROM).
I flashed all (rom, gapps and kernel) yesterday, so I can't comment regarding performance and battery with this pair.
And you, used this functions? Yes, with which ROMs and Kernels? The results are good?
bellaPeTutti++;

Yeah.. Me to but with saosp + quanta kernel, because with hellscore sometime I've freeze screen

I use it all time cause i just want to move my finger to the power button all time...i'm lazy ? i use Quanta V6 with any rom

I use Hellscore Kernel and use its manager to enable this function.
I have a problem where the function doesn't always work. As in, I double tap the centre of the screen and it doesn't turn on sometimes. The DT2W works just after the screen turns off but not after a while of not using it.
Any suggestions as to why this is?
Any solution?

i use volume buttons to wake up lol

bluesteve3 said:
I use Hellscore Kernel and use its manager to enable this function.
I have a problem where the function doesn't always work. As in, I double tap the centre of the screen and it doesn't turn on sometimes. The DT2W works just after the screen turns off but not after a while of not using it.
Any suggestions as to why this is?
Any solution?
Click to expand...
Click to collapse
I have same problem when display is in front pocket and display is facing my leg. If you understand what i mean. When is turned it is working.

I have noticed that it only works when its on the charger. When its not charging it wont wake. Also the middle of the screen was tripping out when I would use the phone. If I touched the middle of the screen it would click on things or not work.. it was getting very hard to use the phone. Thought my digitizer was dying... then I thought wait.. this started happening after I installed that custom kernel and activated double tap to wake. Also sometimes when I turn the screen on via the power button, my digitizer would not respond anywhere.. i would have to slap the screen a couple times to get it to start responding. So today I disabled double tap and rebooted the phone and now my digitizer works just fine. The middle of the screen is responsive again when I use it. So for some reason I guess having the center of the screen active at all times was messing with it somehow.

Another very good option to wake the device is use Gravity Screen. No need to touch the screen or any button, just face up or down your phone.
Try it: https://play.google.com/store/apps/details?id=com.plexnor.gravityscreenofffree&hl=es

i use normally hells doctor. i will try quanta kernel

Related

[MOD][KERNEL] Touch Wake

Last week I have released the Screen Dimmer kernel modification. While the feedback was very positive, it became clear that this mod had the limitation that the FLAG_KEEP_SCREEN_ON (set in apps, which prevents the screen lock from activating) was not preventing Screen Dimmer from blanking the screen. So if you wanted to watch a movie and did not want the screen to be dimmed all the time, you had to manually deactivate the Screen Dimmer for this period and re-enable it afterwards. Also the battery drain while the screen was dimmed was much higher compared to a proper screen lock, since only the display and the access to the framebuffer was disabled - the other hardware was still enabled and most importantly the Android OS and the apps were still running.
I thought that I could do better than that and tried to find a way to achieve the same what Screen Dimmer was doing without running into its limitations. Since the Android OS power manager handles the FLAG_KEEP_SCREEN_ON and also suspends the OS and running apps on a screen lock, I thought why not letting the power manager do its jobs and just prevent the touch controls (screen and keys) from suspending. Then one could wake the device from screen lock by emulating a power button press on touch. After a user defined delay after screen off the touch controls also get suspended. The only complication was to monitor the power button, so one can differentiate between screen timeouts, for which the touch controls should be kept enabled for a certain time, and a screen lock manually triggered by the user by pressing the power button, for which the touch controls should be disabled right away.
So with Touch Wake, one can wake the device from suspend (for a certain user-defined time after screen off) by touching the touchscreen or the touchkeys. Combined with a OS level tweak which disables the lock screen on timeout for a certain time or altogether (for example in CM 7.03, but also available as standalone apps from the Market), one can achieve the same functionality as Screen Dimmer. Compared to Screen Dimmer, Touch Wake has the advantage that the screen will not be blanked as long as the FLAG_KEEP_SCREEN_ON is set and also the battery drain while the screen is off will be significantly less because only the touch controls are kept enabled and the Android OS and running apps are properly put to sleep. For the record, with Touch Wake, while the touch controls are still enabled, the kernel is kept in a wake lock, so the battery drain will still be a little higher than for the normal stock screen lock, however it is a significant improvement over Screen Dimmer.
To enable (disable) wake on touch pass 1 (0) to 'enabled' in /sys/class/misc/touchwake. Pass the delay (until the touch controls will be disabled after screen off) in ms (this is milliseconds; 1000ms = 1s) to 'delay'; a value of 0 for the delay means the touch controls will be kept enabled indefinitely. The default state is disabled and a delay of 45000 = 45s.
Changes to the source (based on kernel with BLD 3 and Screen Dimmer 1):
http://www.pastie.org/2445282
BUGFIX:
Fixed BLN not working properly anymore.
Bug fix: http://www.pastie.org/2446398
BUGFIX #2:
Fixed the problem with the proximity sensor not reactivating the screen when making calls. Also, since I was in the neighborhood I also fixed the problem with BLD on the i9023.
Bug Fix: http://www.pastie.org/2457092
BUGFIX #3:
I cleaned up the code a bit for all three mods BLD, Screen Dimmer and Touch Wake.
Bug fix: www.pastie.org/2488785
BUGFIX #4:
Fixed the BLD problem for the i9023 of the touchkey backlights not being re-enabled on touchkey press.
Bug fix: http://www.pastie.org/2499956
BUGFIX #5:
Fixed the problem of the touch controls misbehaving after the proximity sensor has blanked the screen during a call.
Bug fix: http://www.pastie.org/2528577
BUGFIX #6:
Fixed the problem with BLD on the i9023 of the touchkey backlights getting activated when the bottom of the touchscreen was touched.
Bug fix: http://www.pastie.org/2544546
BUGFIX #7:
For Touch Wake, call the suspend function a bit earlier to prevent a rare hiccup happening when the touch controls are pressed in exactly the same moment the screen is disabled.
Bugfix: http://www.pastie.org/2641540
BUGFIX #8:
For BLD, Screen Dimmer and Touchwake, use mutex_trylock instead of mutex_is_locked/mutex_lock combo to avoid race conditions.
Bugfix: http://www.pastie.org/2710096
No further patches will be published here. I have set up a git repo for all my tweaks. Each mod has its own branch to keep the tweaks cleanly separated and one can simply pull the latest patches from the corresponding branch.
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/touchwake
Get Jonathon Grigg's 'Spark Mod Manager' GUI for controlling Touch Wake: http://forum.xda-developers.com/showthread.php?p=17291034
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
Does this depend on screen dimmer code? Cause I'd like to maybe remove screen dimmer and just have this mod.
Also, thanks for putting all this time on these mods. Love your work.
Sent from my Nexus S using xda premium
The patch file I have provided is for a kernel already including BLD 3 and Screen Dimmer 1 (+ all bugfixes), but the code of Touch Wake does not depend on either Screen Dimmer or BLD - so you can enable BLD, Screen Dimmer and Touch Wake independently from each other in the kernel config and also could remove one tweak entirely from the kernel source if you want.
Can you stop copy pasting this "couldn't reach morfic"
That would be awesome.
Sent from my Nexus S using Tapatalk
Fixed BLN not working properly anymore.
Bug fix: http://www.pastie.org/2446398
This sounds amazing.
Probably the biggest "mod" to our phones since BLN.
If the battery drain isn't terrible with this mod, I think you have a winner on your hands.
Goodjob.
EDIT: Think you should make an app that allows users to easily change the values. I could see this catching on as much as BLN has.
Bump sounds ballin
Sent from my Nexus S 4G using xda premium
works great!
pinned a shortcut to the on/off script onto my homescreen using gscripts. one press turns it on, second press turns it off..
expr "(" $(cat /sys/class/misc/touchwake/enabled) - 1 ")" \* -1 > /sys/class/misc/touchwake/enabled
Click to expand...
Click to collapse
morfic said:
Can you stop copy pasting this "couldn't reach morfic"
That would be awesome.
Sent from my Nexus S using Tapatalk
Click to expand...
Click to collapse
I think those are deleted already. lol.
cool stuff.
so... I presume, when the screen dimmed. the crt animation will appear as well ?
and to mr simms and mr reddv1 , can i have ur test kernel included this TouchWake MOD for any ROM since i used MIUI ROM
Sounds like an awesome mod
Sent from my Nexus S using XDA App
what is this kernel??? the file touchwake there isn't in my rom.
please help me.
tonno16 said:
what is this kernel??? the file touchwake there isn't in my rom.
please help me.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=17104132
Fixed the problem with the proximity sensor not reactivating the screen when making calls. Also, since I was in the neighborhood I also fixed the problem with BLD on the i9023.
Bug Fix: http://www.pastie.org/2457092
Ezekeel said:
Fixed the problem with the proximity sensor not reactivating the screen when making calls. Also, since I was in the neighborhood I also fixed the problem with BLD on the i9023.
Bug Fix: http://www.pastie.org/2457092
Click to expand...
Click to collapse
Thanks for the quick fix. Is this a combined bugfix for proximity sensor and i9023 bld?
Sent from my Nexus S using xda premium
Yeah, they both needed modifying of include/linux/input.h and instead of having two patch files in two different threads which would need to be applied in a certain order I decided to simply make one patch for both problems and put it in this thread. It does not make a difference for you guys and if later people want to include this in their kernel they probably simply pull the up-to-date files from my git instead of applying these gazzilion patches one after each other.
Hope this really fixes the problem with the i9023. I had to guess what the problem was and if this does not solve it, I am all out of ideas. Unfortunately, I do not know anyone with a i9023 I could borrow. The next best thing would be to get someone on gtalk or similar with a i9023 who is willing to go through a painful process of flashing a test kernel with debug statement and passing the logs on to me, then wait until I have compiled the next test kernel... rinse and repeat - lets say about ten times. Not really looking forward to this.
If it will be nessecary I can help on Google Talk. But I'm not capable to compile kernel. If we go for this, you have to send me flashable zip
Using Touch Wake right now with the Lucid kernel and it works perfectly.
Not sure if this is possible, but here's my idea:
Is it possible to somehow wake the phone through touching the touch keys when BLN is active (as in touch keys are on)?
I thought of this as you said that the touch keys (and screen) are not suspended when Touch Wake is active. So now I'm going further to assume that maybe the touch keys are also not suspended when BLN is active so that maybe it can be coded to allow touching the keys to wake the phone?
I know nothing about programming so I may be talking out of my ass here but just an idea.
Thanks!
I think I found a bug with Touch Wake. I'm on 9020, with latest touch wake bugfixes.
After the screen goes off and the touch wake timer has passed, if I touch the soft keys they light up and stay lit while the phone sleeps. I tried to grab a logcat with the phone plugged in to my PC, but the bug can't be replicated while the phone is plugged in.
Sent from my Nexus S
reddv1 said:
I think I found a bug with Touch Wake. I'm on 9020, with latest touch wake bugfixes.
After the screen goes off and the touch wake timer has passed, if I touch the soft keys they light up and stay lit while the phone sleeps. I tried to grab a logcat with the phone plugged in to my PC, but the bug can't be replicated while the phone is plugged in.
Sent from my Nexus S
Click to expand...
Click to collapse
It seems having bln installed (and disabled for me) solves this
Enhanced said:
Using Touch Wake right now with the Lucid kernel and it works perfectly.
Not sure if this is possible, but here's my idea:
Is it possible to somehow wake the phone through touching the touch keys when BLN is active (as in touch keys are on)?
I thought of this as you said that the touch keys (and screen) are not suspended when Touch Wake is active. So now I'm going further to assume that maybe the touch keys are also not suspended when BLN is active so that maybe it can be coded to allow touching the keys to wake the phone?
I know nothing about programming so I may be talking out of my ass here but just an idea.
Thanks!
Click to expand...
Click to collapse
I would be possible, however this could lead to the possible problem of accidentally unlocking the device when you carry it around in a pocket and get a notification. I do not think it is worth the trade-off
reddv1 said:
I think I found a bug with Touch Wake. I'm on 9020, with latest touch wake bugfixes.
After the screen goes off and the touch wake timer has passed, if I touch the soft keys they light up and stay lit while the phone sleeps. I tried to grab a logcat with the phone plugged in to my PC, but the bug can't be replicated while the phone is plugged in.
Sent from my Nexus S
Click to expand...
Click to collapse
I cannot reproduce the problem with my reference kernel. Does it happen every time you try it?

Can't turn off double tap to wake?

I've tried a couple of ROMs with double tap to wake. I honestly love the feature, but I've had too many issues with wake locks in my pocket, so I've decided it's not worth it and I'll turn it off. The problem is, it doesn't actually turn off. I'll hit that off switch, tap my screen a few times, and it's awake again. This is frustrating because then it wakes up in my pocket still. Is there any way to permanently remove it from the ROM? Maybe something I can flash or something I can change to completely disable this feature?
Grab /system/lib/hw/power.shamu.so from a pre-rooted (untouched) stock rom or a rom that hasn't enabled it
WyldOne91 said:
I've tried a couple of ROMs with double tap to wake. I honestly love the feature, but I've had too many issues with wake locks in my pocket, so I've decided it's not worth it and I'll turn it off. The problem is, it doesn't actually turn off. I'll hit that off switch, tap my screen a few times, and it's awake again. This is frustrating because then it wakes up in my pocket still. Is there any way to permanently remove it from the ROM? Maybe something I can flash or something I can change to completely disable this feature?
Click to expand...
Click to collapse
FWIW, Exodus and I'm sure some other ROMs, have a setting to prevent pocket wake ups by using the proximity sensor.
WyldOne91 said:
I've tried a couple of ROMs with double tap to wake. I honestly love the feature, but I've had too many issues with wake locks in my pocket, so I've decided it's not worth it and I'll turn it off. The problem is, it doesn't actually turn off. I'll hit that off switch, tap my screen a few times, and it's awake again. This is frustrating because then it wakes up in my pocket still. Is there any way to permanently remove it from the ROM? Maybe something I can flash or something I can change to completely disable this feature?
Click to expand...
Click to collapse
Are you sure it's not ambient display waking your phone?
Eh... "ambient display" doesn't wake your phone. Ambient display just shows WHEN your phone is awoken by... tap to wake, shake to wake, incoming notification.
OP: Some people confuse tap to wake and shake to wake. Nexus 6 implements shake to wake by default. Problem is that tapping on the screen can.... shake the phone.
This generally should NOT be going off in your pocket. Either, that is. Reason is that it is *supposed* to use the state of the proximity sensor as a CONDITION on whether or not it should start up ambient display. The proximity sensor will read as "near" when the phone is in your pocket, thus prevent tap or shake to wake from triggering ambient display.
So sounds like you probably tried a couple of different sysimages that both contain a bug that stops it from taking the proximity sensor into account. My guess would be something that is based on cyanogenmod (aka "the buggiest android ever conceived"). Try stock and see if the problem goes away.
Personally, I prefer to use a custom ROM with native LED control and disable ambient display.
danarama said:
Grab /system/lib/hw/power.shamu.so from a pre-rooted (untouched) stock rom or a rom that hasn't enabled it
Click to expand...
Click to collapse
what do you even mean?
slamsal said:
what do you even mean?
Click to expand...
Click to collapse
What part don't you understand?
If you haven't got a modified Nexus 6 with this problem, then this isn't relevant to you.

tap to wake ?

Is there something similar to tap to wake ?
I use gravity screen, works well enough.
True tap to wake requires hardware that supports it. The Fire does not seem to support it.
Note, gravity screen does not support any kind of tap to wake, nor the absent proximity sensor in the fire. It just uses the accelerometer to detect a change in orientation to wake the screen. I haven't really tested battery life before the app, so I can't really say how much it drains. Just that it works beautifully, I pick up the tab and the screen wakes, no need to hit the power button.
Now if there was only some way to disable the lock screen altogether...
my lock screen is disabled i am on cm12.
I will try gravity screen , thanks
Sent from my A0001 using Tapatalk
julianpaul said:
Note, gravity screen does not support any kind of tap to wake, nor the absent proximity sensor in the fire. It just uses the accelerometer to detect a change in orientation to wake the screen. I haven't really tested battery life before the app, so I can't really say how much it drains. Just that it works beautifully, I pick up the tab and the screen wakes, no need to hit the power button.
Now if there was only some way to disable the lock screen altogether...
Click to expand...
Click to collapse
Gravity Screen is a godsend. Battery drain in minimal with proximity sensors, might be more triggering off accelerometer. Actually improved battery performance on my mobile as it also blanks the screen when pocketing the phone. I rarely use the physical power button now except to reboot.

i have a broken Hardware that interrupt ( While Screen-off features )

Since I had a replacement for my bootlooped LG G4 H811. After recieving my refurb device I had this problem with double Tap to Wake and the view Glance feature. What really frustrate me is now it will or will not wake with double taping many times, view glance wont work but what is worst. Since probably the sensor is broken it will wake up randomly just laying on the table and any random touch or swipe on the screen would wake it. So battery usually drain while it will just turn on in my pocket.
I'm soooo sad and gave up after testing I can only just confirm it is a faulty Hardware.
My warranty is out. I really don't want to go through it again.( I might get a more faulty device ).
What i really need help with now is : How to disable all features that has any connection to waking the device or any other action that interacts with the screen while off?
I already have turned off the double tap feature using the quickshortcutmaker but still glance view feature is still on which is probably the reason for it to still wake up on the same conditions mentioned up.
I had tried CM ROMs while it only support double tap to wake disabling it from settings will save it from waking up.
But what I need is to fix the problem while on the stock software. For many reasons like having the LG stock Camera App. and a stable OS.
I have limited knowledge, but ithink i need to change settings in the firmware or maybe the kernel . Maybe using Xposed. but I really have no idea how to use any.
Please someone help me. I will really appreciate it.

Double tap to wake on Stock rom (s228) doesn't work well!

As title, i'm using stock s228. But the Double tap to wake doesn't work well. Sometime it's perfect, but sometime it doesn't work!
Why?
hgiang0808 said:
As title, i'm using stock s228. But the Double tap to wake doesn't work well. Sometime it's perfect, but sometime it doesn't work!
Why?
Click to expand...
Click to collapse
Because stock ROM and all other company roms we have use software method to control dt2w. There is a system app in vibe called blackscreengestures which controls dt2w.
But sometimes, when you leave your phone idle for some time, the phone goes into deep sleep and the screen input is shut down to save battery. That's why when you double tap again, it doesn't work.
When you use custom roms, the dt2w part is not in ROM, but it is present in the kernel. Kernel is linked to hardware so indirectly the bonding between screen input and dt2w is much better and remains always on. But since the screen input remains always on, it costs battery.
If you use custom kernel with dt2w on stock, dt2w will ALWAYS work.
tanish2k09 said:
Because stock ROM and all other company roms we have use software method to control dt2w. There is a system app in vibe called blackscreengestures which controls dt2w.
But sometimes, when you leave your phone idle for some time, the phone goes into deep sleep and the screen input is shut down to save battery. That's why when you double tap again, it doesn't work.
When you use custom roms, the dt2w part is not in ROM, but it is present in the kernel. Kernel is linked to hardware so indirectly the bonding between screen input and dt2w is much better and remains always on. But since the screen input remains always on, it costs battery.
If you use custom kernel with dt2w on stock, dt2w will ALWAYS work.
Click to expand...
Click to collapse
Thank you! I understood

Categories

Resources