• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [KERNEL] Quattrimus Kernel

I'm in the process of comparing wifi sleep behavior between AOKP 4.1 to AOKP 4.2.

First I'm instrumenting the kernel with a sleep log that records various events such as sleep, wake, wake reason, battery percent, wifi on/off, etc. I'll be running that on both. I expect to find that 4.1 turns wifi off when it goes to sleep but 4.2 does not. We'll see. Initial testing on 4.2 with wifi sleep policy set to "never" shows absolutely no calls into the driver to turn wifi off after about 5 minutes of intermittent sleep (each time awakened by wifi itself, naturally).

If that turns out to be correct (and even if it doesn't) any differences must be in the android code. There are absolutely no changes to the wifi driver, and I would be very surprised if any of the other 4.2 changes affected this at all. Any relevant differences will likely be under frameworks/base/wifi/java/android/net/wifi.
 
I'm seeing the exact same behavior on 4.1 and 4.2. Namely, when wifi sleep policy is set to "never" (that is, never stay on during sleep), the same thing happens. Wifi doesn't actually turn off and irq 301 keeps waking the device all the time.

So whatever the issue that drains the battery on 4.2 quicker than 4.1, it is probably a by-product of the failure to turn wifi off during sleep. But quite honestly I'm thinking that 4.1 never had a very great battery profile to start with.
 
Okay I think I figured out why the wifi policy is ineffective. It seems that the android code only implements the wifi policy for devices that have the wifi driver in a kernel module.

I'm slowly coming to the conclusion that this is just horribly broken. I'd really like to see if the stock ICS kernel wakes for irq 301 but that is probably not possible. I guess I could go back to the stock GB system and compile a kernel to test. But that would be kind of a pain.
 
Okay I think I figured out why the wifi policy is ineffective. It seems that the android code only implements the wifi policy for devices that have the wifi driver in a kernel module.

I'm slowly coming to the conclusion that this is just horribly broken. I'd really like to see if the stock ICS kernel wakes for irq 301 but that is probably not possible. I guess I could go back to the stock GB system and compile a kernel to test. But that would be kind of a pain.

Honestly I can deal with the wifi drain, I had to stop using it cause of the reboots, am I the only one having them?
 
Do you get the reboots on the standard cm kernel?

Nope. Flash this and I get at least three reboots a day. Dirty flash back to CM nightly and reboots stop. Thinking about trying it on Quattrimus beta4, would that possibly make a difference, or is it pretty much the same as what you used for that?
 
Nope. Flash this and I get at least three reboots a day. Dirty flash back to CM nightly and reboots stop. Thinking about trying it on Quattrimus beta4, would that possibly make a difference, or is it pretty much the same as what you used for that?

Not sure.... Are you over clocking at all?
 
Not sure.... Are you over clocking at all?

Not usually, mine's always done better at 1512 or a little less. Did try a variety though, the max (1674?), 1512, and even under clocked to 12 something, same results each time
 
  • Like
Reactions: tdm
Not usually, mine's always done better at 1512 or a little less. Did try a variety though, the max (1674?), 1512, and even under clocked to 12 something, same results each time

I had similar issues with Ortriggers kernel on cm10.1 nightlies. I noticed on that one it would randomly lose my cpu setting and put the max back to 18xx... I couldn't find a pattern tho. I finally just flashed the cm10.1 nightly from 3-21 and left the kernel stock because I needed some stability. On a side note I've noticed some greatly improved battery life on the 3-21 nightly... even better then previous cm10.1 or aokp42 roms with stock kernels.

I do hope these little snags are found and ironed out because I would love to change my kernel out again... aside from over/underclocking its a core part of having android - being able to modify and customize on such a great level... can't do that on the iphone or windows phone. And we have dev's like tdm, ortrigger, PG, D2A, etc to thank for such awesomeness... Thanks y'all - keep it up :)
 
Off the top of my head the only significant differences between my kernel and the cm kernel are over clocking and compiling with linaro. If over clocking isn't the source of instability, the likely source is linaro.

I can compile a pair of kernels with the same source and different compilers if anyone wants to test the theory.
 
Off the top of my head the only significant differences between my kernel and the cm kernel are over clocking and compiling with linaro. If over clocking isn't the source of instability, the likely source is linaro.

I can compile a pair of kernels with the same source and different compilers if anyone wants to test the theory.

I could test for you. Unfortunately, my own development efforts are suspended for a while until I can either get another computer to build with or figure out how to dual-boot Windows 8 and Ubuntu.
 
I could test for you. Unfortunately, my own development efforts are suspended for a while until I can either get another computer to build with or figure out how to dual-boot Windows 8 and Ubuntu.

Thanks but I need someone who experiences instability to do the testing.

Dual booting is a breeze. Shrink your Windows partition, install Ubuntu. Done.
 
Thanks but I need someone who experiences instability to do the testing.

Dual booting is a breeze. Shrink your Windows partition, install Ubuntu. Done.

You probably can still install ubuntu using wubi with windows 8. wubi leaves the windows partition alone and just runs ubuntu off of it... though that sometimes causes some oddities.
 
Off the top of my head the only significant differences between my kernel and the cm kernel are over clocking and compiling with linaro. If over clocking isn't the source of instability, the likely source is linaro.

I can compile a pair of kernels with the same source and different compilers if anyone wants to test the theory.

I'll test. Tried it with Quattrimus Beta 4 just for the sake of it, didn't get any reboots in the short time I ran it but was getting really bad screen flickering and choppy scrolling (which it never did with Quat kernel). Ended up flashing the new version of AOKP (very nice, might stick with that :p) but haven't tried the kernel with it yet.
 
Thanks but I need someone who experiences instability to do the testing.

Dual booting is a breeze. Shrink your Windows partition, install Ubuntu. Done.

You probably can still install ubuntu using wubi with windows 8. wubi leaves the windows partition alone and just runs ubuntu off of it... though that sometimes causes some oddities.

Dual booting on a normal laptop is easy. My laptop came with Windows 8 preinstalled. I'm an IT major and a pretty fair hand with a computer and I still haven't figured out how to get it to dual boot. Windows 8 isn't even recognized by Ubuntu. I also found that this is due to Win 8 and Ubuntu using different partitioning tables. Win 8 doesn't work with GPT partitioning and Ubuntu doesn't even recognize the msdos partioning that Win 8 is on. I may try and reenable UEFI on my MoBo and see if that makes a difference. As it is, I might end up building kernels from a virtual machine.
 
Dual booting on a normal laptop is easy. My laptop came with Windows 8 preinstalled. I'm an IT major and a pretty fair hand with a computer and I still haven't figured out how to get it to dual boot. Windows 8 isn't even recognized by Ubuntu. I also found that this is due to Win 8 and Ubuntu using different partitioning tables. Win 8 doesn't work with GPT partitioning and Ubuntu doesn't even recognize the msdos partioning that Win 8 is on. I may try and reenable UEFI on my MoBo and see if that makes a difference. As it is, I might end up building kernels from a virtual machine.

Tbh I had a tin of problems wiping win 8 of my daughter's laptop so that I could install win 7 ( I really hate win 8).

I ended up having to do a ton of jumping through hoops in order to get it installed
It kept failing out during the install as it couldn't find a disk. Are you sure that this isn't what's going on with yours? Ubuntu is pretty forgiving on the partitioning table... At least to see that there's a drive there. Also... I believe Ubuntu 64 bit will use mft or gpt/efi.

Did you try disabling ahci on the hard drive?
Disabling secure boot?


Sent from my VS920 4G using Tapatalk 2
 
I think I've got the wifi drain issue figured out. The root cause is the packet filter is disabled. So the wifi chip raises an irq for every packet coming across wifi, including control packets, arps, and everything. When I forcibly enable the packet filter, it stays in deep sleep much more reliably.

New kernel coming soon, after I have a discussion with rmcc.
 
Getting 70% to 80% deep sleep time on both my P930 and VS920. Light to moderate usage, relatively quiet network (at home).

The real test will be tomorrow at work, where the wifi is always busy with lots of arp packets.
 
tumblr_lzbskiz2gT1rpskw8o1_500.jpg
 
Awesome tdm. Running this on AOKP build 6. Haven't let it run long but it already looks like battery life is doing better.

Using the Google GCC copy. Not result sure what the benefit of linaro built is... I thought it just speed up build time.

Sent from my VS920 4G using Tapatalk 2
 
Back
Top Bottom