[AOSP/CM][LOLLIPOP][ANYKERNEL][29/05/15] Phantom Kernel r4

lethalchronus

Senior Member
Apr 27, 2015
115
63
0
You must have undervolted way too much or messed up with some settings.

It's not there in AOSP kernel, it was having conflicts. It might come in future though.
I see, I think that decision is wise as long as it keeps this kernel stable.
oryt, here's what I think about this Kernel.

I'm on AOSP Ivan's ROM w/ this kernel. (With Shivam Recommended Settings)
everything is fine, all settings are sticking after boot so no problem
after playing Modern Combat 5 on Optimal Graphics Settings for 1+ Hour "Interactive, Normal Mode"
Everything went smooth even I didn't set the Power Mode into Performance (I also tested it with elementalx but this would cause extra heat so I'm sticking to Interactive for now since it's smooth compared when I'm not using this kernel)

Overall it's great, deep sleep is working as expected.
again, as long as it's stable we won't be needing some extra function like Fast Charging etc etc. if it would just cause problems :good:
 
Last edited:

karthikb89

Senior Member
Jun 10, 2013
108
16
18
Alrighty! Here's my initial impression on r3:

Firstly, I just flashed ivan's latest AOSP yesterday and its been awhile since I used his ROM. My primary ROM is sir @audahadi 's XenonHD. So I flashed and tried the AOSP version on ivan's ROM, changed to my preferred settings and to my liking then let it sat for 5 mins to get things stable. After that, I did some game testing and it was, as always, veeerrry smooth. :) Although the fun shattered when suddenly, the phone heats up and then it freezed; dead lock. My only choice was to force restart it. I did not do any undervolts and stuff. All I did was changed the governor and I/O together with the read ahead. So, I panicked and restored my XenonHD backup. This made me confused though. I flashed the AOSP version on my XenonHD back up because I know that XenonHD is AOSP based aaaannnd it didn't boot. So I tried flashing the CM version and it worked. I haven't tried repeating my issue yet. Hopefully it doesn't freeze. By the way, thanks for the r3 update! Amazing as always dev @shivam kucchal. :)
Check the OP bro.. AOSP version is only for Ivan's AOSP ROM. use CM version for all other ROMs (including XenonHD)
 

Jhayzt

Senior Member
Nov 1, 2011
856
284
0
Urdaneta
Check the OP bro.. AOSP version is only for Ivan's AOSP ROM. use CM version for all other ROMs (including XenonHD)
Dude I know my ROM's alright. The reason why I said I got confused when I flashed the AOSP version on XenonHD(didn't boot) is because I know its made on AOSP. Even on the OP of XenonHD states AOSP. I'm thinking maybe XenonHD is built from CAF rather than the original AOSP distribute that's why the CM version worked..

So far no major bugs found here(at least on my side) The only minor bug I got is when I'm watching Youtube video's. The screen glitches.
 

Shivam Kuchhal

Senior Member
Dec 1, 2012
942
1,704
0
New Delhi
There is no volatage control in Kernel Auditor on Ivan's ROM...
I think I mentioned that in release post itself.
Dude I know my ROM's alright. The reason why I said I got confused when I flashed the AOSP version on XenonHD(didn't boot) is because I know its made on AOSP. Even on the OP of XenonHD states AOSP. I'm thinking maybe XenonHD is built from CAF rather than the original AOSP distribute that's why the CM version worked..

So far no major bugs found here(at least on my side) The only minor bug I got is when I'm watching Youtube video's. The screen glitches.
Can't reproduce it. :/
 
  • Like
Reactions: don1199

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,995
0
Would love oneplus one like dt2w (without battery drain). I'm on mi4 with snapdragon 801 so maybe it supports off screen gestures too.
well; depends. the OPO kernel has synaptics ts firmware that have on chip gesture support; so, it'll be a firmware port, if the same synaptics ts panel is used. but then again, firmware port. no idea if it will work, most probably won't work, but then again, who knows(?).

be wary though, since the OPO synaptics on chip d2w/gesture is said to be buggy atm, mainly causing battery drain; fixed with the latest firmware supposedly ( http://www.xda-developers.com/synaptics-touchscreen-fix-for-oneplus-one-drains-battery/ ). unintended bugs always creep in ruining the perfect things :\
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,995
0
@shivamKucchal can you release test version with dt2w?
OP has an exam today :p

thing is: i forogt about irq flags; specifically IRQF_NO_SUSPEND, which tells the kernel that the particular irq will be enabled even with deep sleep, so, whenever device tries to go to deep sleep, (if you enable an irq that doesn't have this flag), anomalies occur, and the device gets hung. this was the 'bug' that shivam was talking about.

you can merge in d2w commits from my git, if you're taht eager to test (android_kernel_xiaomi_armani/cancro-d2w).

note: ce40f58 should fix the bug of device hang, but needs testing. currently do not have the mi 3, so can't test.

also note: commits based off shivam's original mr2 branch @81d1eff
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,995
0
Looks good, I was thinking of porting stratosks dT2w since it only allows you to tap the middle of the screen and prevents unwanted screen wakelocks. But nonetheless nice port from showp's dt2w.
stratosk's implementation of dt2w is a native implementation on the lge_touch_core panel driver. Also, could you please explain how allowing a tap in the middle of screen prevents unwanted wakelocks? Again, just which part of showp1984's or straosk's implementation do you think holds wakelocks?

In the first place, as far as I know, there is no wakelock being held in either straosk's implementation, or showp1984's implementation.

stratosk's implementation however holds a wakelock once a touch is made for 700ms which is the same as the DTW_MAX_INTERVAL, 700ms. stratosk himself said in [email protected] that this is to prevent the kernel to suspend once a touch is made.

this might actually be a safety harness. why? because touch_power[_off|_on] functions check if d2w is enabled, all queued work is cancelled; ts_events released, and enable_irq_wake called on the i2c_client ( touch_power_off), or if touch_power_on, again if any wakelocks held, are released (the 700ms wakelock), disable_irq_wake called and all queued work cancelled, and ts_events released.

once a touch is made with the panel in supposed suspend, a wakelock for 700 ms is held.

what's to be looked at here, is that everytime touchscreen_suspend is called, stratosk chose to reset the touch variables. this is primary reason why he has a wakelock in place to actually hold the previous touch data for at least 700ms till the next touch.

this was the primal reason for the wakelock with stratosk's wakelock. however, showp1984's implementation of d2w does not need this wakelock since previous touch events are not erased with every ts suspend (main reason: maybe not intended, but: lesser memory writes).

thus, even if irq wakes kernel from suspend, a touch is detected, kernel can go back to sleep, safe and sound, and will be waken next time irq is recieved.

so, 'unwanted screen wakelocks' (in your very own words):
stratosk: 1
showp1984: 0
I think however that you got this the other way around.

Now, that's 'my' understanding of how the wakelocks work; i'd be glad if can 'enlighten' me how they work otherwise.

Also, about the 'tap the middle of the screen' to wake; I am not so sure about it. It is just four more cpu cycles, un-needed.
IMO, there should be just 3 checks in the d2w func; the abs(delta(x)), the abs(delta(y)), and time_interval; and that's all that's needed. Unfortunately, this is not the case in many many d2w implementations, except the one that I'm writing right now, in works.

-----------------------------

'nice port'? heck no!
the actual challenge with porting d2w to a device is figuring out the workflow of the touch panel, whether they use the System Sleep model or the runtime power management model (Devices that have early suspend/resume usually use the latter), and correctly hooking into the _suspend|_resume functions to keep the touch panel awake. I do not need to explain how or why d2w does not drain battery 'unnecessarily'; and I'm tired of having to explain how the entire thing works across the forum on every device that I've ported d2w to.
However, I'm tempted to give a quick gist, since everyone seems to be worried about 'wakelocks', and 'battery'. Wait. I just changed my mind.

The main reason for the deep sleep issues with d2w is every time a touch is made; the irq needs to be handled. This is because of native d2w or modular d2w; but with on-chip d2w, this is not the case where irqs are sent by the chip itself iff a d2w touch is made. native d2w has 'some' advantages over modular d2w; however I'm not going to explain all of it now, and don't find any reasons for doing it thou.

I saw your post on the other thread in the same forum;

Dude I wont risk instability and break sensors with dt2w, I had a look at that port and I tell you now, you'll have a lot of issues.

If dt2w were to be stable, it should've been in this kernel before. ;)
and would like to know which part of d2w do you perceive to be causing instability? Yes, it is currently instable. As I said, heck no! this is not a nice port. I do not have access to a hackable mi3, the reason why I'm not able to fix the issues with the atmel _suspend|_resume as quickly as I would've if I actually had access to logs, a lot of them, to figure out the workflow of the runtime power management in atmel.

Also, could you please explain how is d2w going to break sensors? Which part of 'any' d2w implementation has broken sensors, even unintentionally? While you're doing that, also list out the issues that we're going to face.

Finally, since you said that if dt2w were stable, it'd have been in your kernel. So, I'm guessing you've already tried to port d2w, in which case, could you be kind enough to help us with the current _suspend|_resume issues we're facing with atmel?

Thanks and regards,
thewisenerd.
 

Pedjabgd1

Member
May 24, 2015
7
0
0
I flased kernel on Mokee 5.1.1. nightly and set everything like in a 1st post and reboot my device and now wont startup?? :( i cant enter in cmw, what can i do?? pls help anybody
 

solazz

Senior Member
Feb 7, 2011
118
42
48
I flased kernel on Mokee 5.1.1. nightly and set everything like in a 1st post and reboot my device and now wont startup?? :( i cant enter in cmw, what can i do?? pls help anybody

Have you tried power off the phone, then press volume up button and power button simultaneously? You should be able to go into recovery mode this way.