yashsingh1/xdaforums huggingface dataset:
[Nexus S Android Development] brenix:
Using franco.Kernel... I compiled it from source the other night since it had a few changes since his last release... I believe he will be releasing a new one shortly though..

CPU: 1000mhz min/1200mhz max (Using Lazy Governor)
[Nexus S Android Development] intheb0x:
Can anyone help me figure out why my storage doesnt work and is unknown after flashing the newer versions of morfics kernel?
[Nexus S Android Development] intheb0x:
Can you post a link for me?

I need my storage to work, can anyone help
[Nexus S Android Development] morfic:
Which rom does this happen on?
[Nexus S Android Development] intheb0x:
Well earlier in the thread I mentioned i tried a bfs kernel and the same thing happened, now the first implementation of this mod I had no issue but the laggyness we both felt,

Ever since the new bug fixes I have not been able to use any of your kernels.

I don't know what has changed.

I'm running 2.3.7 gwk74 rooted stock.

Thanks
[Nexus S Android Development] morfic:
always happens to stock rom users? (You are #2)

http://goo.gl/bxbp8 try this and let me know what happens.

and what other kernels have you been flashing recently?

since i use koush' anykernel i wouldn't touch the ramdisk and with that shouldn't break mounting
[Nexus S Android Development] intheb0x:
Just yours,

No others.

I'm on TEUV-NS-28092011stable.zip,and it's great.

The ones I have tried that breaks my storage are these two.

TEUV-MCP.zip and TEUV-MCPb.zip
[Nexus S Android Development] intheb0x:
That kernel works fine, storage is working like normal.

I wonder why the others aren't?

Doesn't this kernel beat the purpose though and because it's the most overclocked one it will drain me down quicker?

Thanks for the reply and help.
[Nexus S Android Development] morfic:
New builds up on www.derkernel.com

They should all work for you.

I linked the T144 since it was the only I had that works with your theory.

Seems you were right.

All 17102011 builds should work.
[Nexus S Android Development] intheb0x:
It's working great,

Thanks!

What ended up being the issue?
[Nexus S Android Development] morfic:
You already know.

seems BFS is fine for all builds, except for stock roms.

The builds are cfs right now. Makes no sense, but at least i now what to do if i want to release a "stock rom kernel" ;)
[Nexus S Android Development] intheb0x:
That's great :-)

Yea I remember I tried the matrix kernel bfs and had that issue, cfs was fine.

Glad i could help.

Battery is a flat line when the screen is off now, pretty awesome.

Can't wait to test tomorrow at work.

Will post the results.

Keep up the great work everyone!

Thanks
[Nexus S Android Development] FloHimself:
Ezekeel, is it possible to port a HAVS implementation to crespo? In those days it gave me good results on bravo...
[Nexus S Android Development] Ezekeel:
I googled for HAVS and if I get it correctly this tweak adjusts the voltage according to the CPU temperature. It works under the assumption that for a higher temperature one needs a higher voltage to stabilize a certain frequency compared to a lower temperature.

Sounds reasonable to me, however I wonder if that temperature value really is responsive enough to rely on it for such an important task. For example, let us say you carry around your device in the pocket and the CPU is cold. Then you start playing some 3D game which needs alot of CPU power and starts heating up the CPU circuits. How long does it take for the heat to travel to the temperature sensor? My point is that for a certain latency period the CPU will be running at full power with its circuits already heated up to a certain point while this is not reflected in the temperature value, so HAVS will still be supplying only the voltage for the previous lower temperature which might be not enough. Heat conducting is a rather slow physical process, however on the other hand even a seemingly a small latency of 1ms is a long time on the time scale of CPU operations.
[Nexus S Android Development] FloHimself:
iirc then havs is the hybrid approach to automatic voltage scaling (avs) and static voltage scaling (svs) and it doesn't solely depends on the temprature:

http://xdaforums.com/showthread.php?t=1035075

https://github.com/dzo/kernel/commit/b47ce6a528eb9674e2ab46b3c51781cf386282ba

as mentioned, it gave good results back in the bravo days...
[Nexus S Android Development] mixtapes08:
uhm can we use screen off profile in setcpu when this mod is enable in our phone?

ex. 200/100 screen of profile? does this setting will improve much more improve our battery life?
[Nexus S Android Development] :
Don't try 100/200. 100/400 or 200/400.
[Nexus S Android Development] Ezekeel:
I checked the code and you are right. The voltage does not solely depend on the temperature, but also some direct CPU value are measured. However that is really deep CPU hardware stuff entirely written in assembler (https://github.com/dzo/kernel/blob/2.6.35-bravo/arch/arm/mach-msm/avs_hw.S) and one would have rewrite it completely for the Nexus CPU. That probably is not worth the effort aka it would take me a long and painful time of work and I rather do something else.

Do not use screen off profiles. That only hinders race-to-idle which will diminish the benefit from DEEP IDLE.
[Nexus S Android Development] mixtapes08:
what will happen?
[Nexus S Android Development] :
black screen, crush etc.
[Nexus S Android Development] mixtapes08:
tnx.. so deep idle is much better rather than using screen off profiles?

---------- Post added at 06:13 PM ---------- Previous post was at 06:10 PM ----------

ahhh... sir eze what do you recommend default cpu frequency when having your deep idle enabled?
[Nexus S Android Development] igor.tonky:
music playing over BT shuts off, when screen turns off. bt icon stays, so phone thinks it's still connected.

here's my logcat, where i:

- connect bt headset with screen on

- start music

- turn screen off(music stops)

- wait a bit, watching "cpu pegged?" in logcat

- turn on screen

- wait

- turn off bt on phone

kernel is matix 9.0 cfs

anything else i can do to help you debug it?
[Nexus S Android Development] Maximilian Mary:
How about those pesky init.d scripts?
[Nexus S Android Development] intheb0x:
How do I honestly know if it's going into deep idle when the screen is off?
[Nexus S Android Development] onigiri1692:
Great work with deepidle my battery use has pretty much flatlined when the screen is off, its pretty awesome. I've noticed one issue, after running for an hour or two with the screen off my radio defaults to 1x and can't connect to anything else aside from wifi (not 3g or 4g) no matter what I try and I live in an area where 3g and 4g coverage is good. It is definitely an issue with deepidle as the moment I entered the command 'echo 0 > /sys/class/misc/deepidle/enabled' into terminal emulator to turn it off 3g and 4g began working again. To make sure it wasn't just an issue with the icons changing I did a speed test to ensure that the phone was in 1x and the results were 0.6kb/s down and 2.4kb/s up...so definitely running on the 1x network. Anyways I just wanted to make sure you were aware of this issue, aside from that issue everything is working great, no reboots, lockups, or bsods.

I'm using a Nexus S 4G with baseband D720SPRKE1 with matr1x 9.0 and Pete's GPA18.

edit: It happened again and this time I used Roam Control to toggle to roam and then back to Sprints network and 3g and 4g started working again without doing anything else. I'm not sure what exactly happened, maybe it turned the radio off and on? but thought I would post an update on my experience with this mod.
[Nexus S Android Development] Hacre:
****ing nice job Ezekeel.
[Nexus S Android Development] slind:
Unfortunately it's too late now and I am not a dev or somthin' so I don't totally understand the entire approach. But it looks very promising to me. If it actually is I hope it get's implemented in other kernels if you allow :)
[Nexus S Android Development] afzalarsalan:
Wake up on calls

With deep idle on will I still be able to recieve phone calls?
[Nexus S Android Development] steve.garon:
Its implemented on my kernel, mofic's, mathkid's, francesco's and probably more...
[Nexus S Android Development] onigiri1692:
Yes, calls and texts still come through.
[Nexus S Android Development] nicregi:
Wow.. I am impressed. Thank you for sharing bro!
[Nexus S Android Development] M86:
God Bless you man. I've been streaming from my Google cloud and as been amazing. I can't wait to test a day away from home.
[Nexus S Android Development] Ezekeel:
Ok, that is probably the reason why in the original implementation I found, when BT is on DEEP IDLE is not used.

Can anyone confirm this problem?

So the screen was on and you switched off DEEP IDLE in terminal and then 3G turned back on? Did you switch off the screen and turned it back for that or was the screen on the entire time?

Can someone confirm this?
[Nexus S Android Development] intheb0x:
Is the deep idle auto enabled in Morfics kernel?

If so what's the command i use to enable and disable?

Thanks
[Nexus S Android Development] onigiri1692:
The data icon was 1x prior to opening terminal. In terminal I entered the echo command to turn off Deep Idle, I then proceeded to exit out of terminal and I had a 3g data icon (I didn't even see the 1x icon). I turned 4G back on and it worked again, where before the radio would try to connect a few times then it would just give up. The screen was on throughout the entire process.
[Nexus S Android Development] Ezekeel:
While the screen is on the DEEP IDLE state should not be used at all, so disabling DEEP IDLE while the screen is on should have no effect. Can you reproduce that behavior? It might just have been a coincidence.
[Nexus S Android Development] roshga:
I can, had the same problem that he described. and even more then that: after turning off the BT in an attempt to fix it, turning it on did not work.
[Nexus S Android Development] from1989:
how can i know if the deep idle is working?
[Nexus S Android Development] Ezekeel:
Fixed the BT problem and made sure the DEEP IDLE state is not used when the device is going to/waking from suspend (SLEEP).

Bugfix: http://www.pastie.org/2723702
[Nexus S Android Development] chickelnoodensoup:
To check if deep idle is enabled, type this in a terminal emulator:

cat /sys/class/misc/deepidle/enabled

If it returns a 1, deepidle is enabled, if it returns a 0, deepidle is disabled.

To enable deep idle if it is disabled, type this in a terminal emulator:

echo 1 > /sys/class/misc/deepidle/enabled

This doesn't stick between reboots. You need to make an init.d script if you want it to be enabled at startup.
[Nexus S Android Development] mike216:
Thanks ezekiel! I love deepidle! Getting insane battery life without loosing any performance,your amazing and I really appreciate all of your hard work and everything you have given this community

Sent from my INTERACTIVE NSCOLLAB
[Nexus S Android Development] mike216:
After reading your front page I have an even deeper appreciation for this as it was no easy mod to put together! I remember reading your back and forth about this over on MK op and you got this mod put together fast considering the task that was at hand

You also say there should be no reason to not overclock besides running the cpu to hot

Does deepidle put less wear on the cpu while overclocking? Or where you just saying that overclocking will not decrease battery because when deepidle kicks in it doesn't matter what frequency your at

Thanks once again I'm one of very many who appreciate your geniusness

Sent from my INTERACTIVE NSCOLLAB
[Nexus S Android Development] FloHimself:
agree and looking at check_power_clock_gating(), it seems like there is something similar going on already (power gating, clock gating).

do you have plans to reintegrate the "TOP ON" state?
[Nexus S Android Development] Black Coffee:
Could someone please tell me how to check whether the "Deep Idle" is enabled in a kernel or not ? If it is disabled by default, Please guide me with the method & app to be used to enable it.. Thanks in advance.. !
[Nexus S Android Development] yaronyud:
use cat command from the terminal like this->

cat /sys/class/misc/deepidle/enabled

if shows 0 than its off , if shows 1 its on

if you want to turn it on/(off) do this command

//*****************************************

// this how to turn this ON

echo 1 > /sys/class/misc/deepidle/enabled

//*****************************************

//this is how to turn it OFF

echo 0 > /sys/class/misc/deepidle/enabled

dont you all worry i will write a script to help all you guys who dont know linux/unix commands...

today it will be out i will post a thread...
[Nexus S Android Development] mike216:
Ezekeel,how can I set my min at 110? I use set cpu and can only take 100 200 steps and so on

I've been running at 100 1000 and haven't gotten any sleep of deaths but I would like to know if 100 is to low for maximum battery life

I also have a very strict point system at work so I'm definitely trying to avoid the sleep issue if 100 is to low,THANKS

I got the answer,live overclock. Can I still get good battery life setting my min at 200 or will I be better off at 400 any help would be appreciated

This is the correct settings that you and Franco where talking about?

Sent from my Nexus S
[Nexus S Android Development] Ezekeel:
I made some changes. These are kinda experimental and not 100% tested, but I think they make sense and might lead to an improvement for those people who are still having problems.

1. Mimicking the procedure for the SLEEP state, when entering/returning

from the DEEP IDLE state, a notification is send to kernel modules

using 'pm_notifier_call_chain'. This will cause CPUfreq to statically

set the frequency to SLEEP_FREQ and prevent further frequency changes

until the system returns from DEEP IDLE.

2. The APLL lock is not modified.

Bugfix: http://www.pastie.org/2744527
[Nexus S Android Development] idelgado782:
Should we copy and paste the whole thing and type it into terminal??
[Nexus S Android Development] 93ae8074:
Nope! Somebody has to compile a new kernel with that patch applied. :)

Cheers.
[Nexus S Android Development] franciscofranco:
Uh? That's for devs to change their source code...

@Ezekeel

Lets see if I got that straight with this scenario:

Scenario 1:

1. Running with 1200/1200 mhz

2. Entering idle state - change to 800

3. During idle state back to the 1200 minimum frequency chosen by the user

Scenario 2:

1. idle state with 200mhz

2. Returning from idle state - change to 800mhz

3. System back to the normal state - back to 400mhz minimum chosen by the user

If I understood correctly it's just a protection measure to ensure the device is at a reasonable frequency when entering and returning idle state to prevent BSOD and that **** right?
[Nexus S Android Development] Ezekeel:
Yeah exactly. Also, since CPUfreq is disabled during that period, this will prevent any frequency changes until the DEEP IDLE cycle is completed. It is probably not a good idea to request a frequency change while the CPU is about to power down or while it is not yet completely restored after wakeup.
[Nexus S Android Development] integrasaurus:
I modified my build.prop so I could enable deepidle, but when trying the cat command in terminal emulator I get this message:

"cat /sys/class/misc/deepidle/enabled: No such file or directory"

Checked /misc/ and sure enough, found no deepidle directory.

CPUspy doesn't state deepidle either, but rather deepsleep which, from what I understand, is different.

Running brainmaster MIUI 1.10.14 with TEUV. Any advice? TIA.
[Nexus S Android Development] Stuart.upton666:
Damn dude, I wish someone would implement this into Nexus One kernels. It would put many "Battery Saving" apps out of business! Anyway that's enough dreaming for now, This grandaddy of a device won't see the grace that is this modification. Always nice to dream though, Right?
[Nexus S Android Development] mike216:
Deepidle has been insane! I sit here at watch my 78% for 3 hours

What's the best cpu frequency to have 200 1000 or 400 1000

And if you could be so kind to tell me your op on the best governor for battery life

Sent from my Nexus S
[Nexus S Android Development] matmat07:
If the voltage are too low, will the phone freeze or will a bsod appear like on computer? Because it seems I can't go more than 1,2Ghz without it freezing
[Nexus S Android Development] mike216:
I would then start raising voltages,I'm no dev just my op

Sent from my Nexus S
[Nexus S Android Development] ZombieUsr:
Is there such a kernel already out for the G2?
[Nexus S Android Development] qzfive:
Try asking in the G2 forums...
[Nexus S Android Development] Ezekeel:
Wrong thread.
[Nexus S Android Development] yaronyud:
update to leatest TEUV i have it also and it does has deepidle mod...

after updating the kernel you would see the folder...
[Nexus S Android Development] lukappaseidue:
Hello to all.

I have a Nexus S 9020T with the latest version of ROM STOCK 2.3.6 unlocked but not yet rooted.

I want to know, excuse the stupid question, if I can implement the changes of Ezekeel (deepidle or BLX) to optimize and extend the life of my battery on the STOCK ROM

Excuse me for my stupid question.

Prefer not to use alternatives to the STOCK ROM. But if I were, what do you recommend?

Thanks to all
[Nexus S Android Development] Imoseyon:
Ezekeel, great job on deepidle enhancements. I've added your mods to the existing deepidle code already in the i500 kernels.

Forgive me if this was answered somewhere in the thread - I noticed that with the introduction of sysfs, it appears that deepidle is disabled by default (ie. "enabled" is zero). Was that intentional?
[Nexus S Android Development] jeffkhlam:
my track not working with deep idle, gps fail to lock after screen off. i disabled it but deep idle back on after reboot phone. also, is there any way to have a fix so that deep idle wouldnt go into deep sleep while using gps with screen off?
[Nexus S Android Development] Ezekeel:
You need a custom kernel including these mods; go check the different kernels in this forum. You probably also want a ramdisk with init.d support.

Glad to here that it also works on other devices besides the Nexus S. And yeah, that was intentional.
[Nexus S Android Development] Imoseyon:
Cool I went ahead and enabled it in initramfs - any specific reasons why it's disabled by default? Are some folks having issues with it?
[Nexus S Android Development] lukappaseidue:
could you give me so tricks? (step by step) if you can

thank you anyway
[Nexus S Android Development] waterface:
Hello all. I will introduce myself with the typical noob question. Since there is no way (to my knowledge) of testing if deep idle actually kicks in, I suppose battery drain records are a good marker. Now would -40 mA mean deep idle is "working" or not? What would you say is the value below which you'd state with certainty that the phone went in DI?

Thanks for taking the time to answer.
[Nexus S Android Development] Ezekeel:
In the beginning some people were having problems with SoD, but I have not heard any complaints about that for some time, so I guess that is fixed now. But I also generally prefer to have my tweaks initialize in the disabled state to play it safe, because if problems arise disabling it at the end of the bootup sequence might be not soon enough.

Grab a kernel from this forum and flash it. There is more than one step-by-step guide out there explaining the whole process.
[Nexus S Android Development] lukappaseidue:
Thank You very much ;)
[Nexus S Android Development] mike216:
Ezekiel why does it take two charge cycles before i notice the great battery life with deepidle

Sent from my G1
[Nexus S Android Development] Towleeeie9613:
Can I use this on any other phones? I haven't searched the thread because it's down right now, so I'm not aware if it's already been addressed. I have an Evo running MIUI with the Tiamat 4.1.0 kernel and this seems like something, in conjunction with JD would be really helpful.
[Nexus S Android Development] mike216:
Sure you can but your going to have to fine a bright dev to build it into a kernel

Sent from my G1
[Nexus S Android Development] EViollet:
Does the CPU not need to manage the deep sleep mode?

On the Desire, the Qualcomm processor doesn't seem to support this mode. Or am I wrong?

Sent from a random mobile device using Tapatalk.
[Nexus S Android Development] Jonathon Grigg:
Just for the record, I still have issues with deep idle on my phone. I imagine many complainers have given up so you don't hear much of them ;) it works for me mostly, however without fail I can replicate a SoD even with the latest versions in camera and often in typical use (music, games or videos, then lock the screen).

Sent from my Nexus S
[Nexus S Android Development] steve.garon:
You can replicate SoD? Can you provide a step by step? I'd love to test on my kernel.
[Nexus S Android Development] rkuijpers:
+1 very curious about this as well
[Nexus S Android Development] Ezekeel:
I am pretty sure the SoC used in the Desire also supports low power modes besides sleep. It it just a matter of implementing it in the kernel. I would be seriously surprised if the DEEP IDLE code for the Nexus also works on a different CPU.

Yeah, a detailed description what you did would be nice. I just tried the stock camera app and everything seems to be working fine.
[Nexus S Android Development] franciscofranco:
Everything is fine for me too. Ezekeel, users of my kernel started to report a little higher battery drainage after the last deep idle update that locks the frequency to 800mhz when entering and returning from idle mode. Is this possible or it's just a coincidence?
[Nexus S Android Development] Ezekeel:
If you also have the latest LiveOC bugfix I cannot think of any reason for that.
[Nexus S Android Development] iceandfire:
Is LiveOC required in order to make Deep Idle work properly?
[Nexus S Android Development] Ezekeel:
No. A bug in LiveOC has caused problems in conjunction with Deep Idle.
[Nexus S Android Development] franciscofranco:
Yes I think that's fixed now, I haven't noticed anything odd since that bugfix. Will see for sure after the users test it.
[Nexus S Android Development] beetlo:
Is there any well to tell for certain that the phone is going into deep idle? CPU Spy doesn't report deep idle. My phone seems to be hanging out at 100mhz for a majority of the time. When I add up the times for all the states listed, they equal the uptime of the phone, so it doesn't seem like there is anything missing. Would deep idle report as 100 to CPU spy or something?
[Nexus S Android Development] al_madd:
which kernel do you use??

try raise min freq to 400mhz
[Nexus S Android Development] Ezekeel:
I just tested it and (with the latest bugfix #6 included) the time spend in DEEP IDLE counts for the SLEEP_FREQ, so 800MHz (or the equivalent if raised with LiveOC).
[Nexus S Android Development] beetlo:
That would explain things since I have my max frequency set to 800. Guess I could test a while with max at 1000. :)
[Nexus S Android Development] Jonathon Grigg:
I will flash your kernel and test out the issue, without changing any CPU relates settings like governor, min or max. It had these issues on your release on the 21st, not sure about the 24th.

Steve I will then report back on the steps.

Sent from my Nexus S

Edit: sorry, I will now use your 27th kernel, didn't realise you updated yesterday. Should take a look first next time ;)
[Nexus S Android Development] Jonathon Grigg:
Well, using the latest Franco kernel I was only able to replicate the reboot in the camera once, not repeatedly but it was still in the same fashion as before. Interesting...

I did experience a reboot when sending a text, first time I've ever seen that. Could be deep idle, could be the kernel, could be the radio, just thought I'd mention it.

Sent from my Nexus S