yashsingh1/xdaforums huggingface dataset:
[Moto G 4G Android Development] Fagulhas11:
I'm pretty sure now the battery drain problem is indeed related to the sensors on our device. Replaced the open source hal with the stock hal and seen a huge improvement on battery life.

You can clearly see on the image the moment i've rebooted the phone and inserted the stock lib, usage was pretty much the same as i do everyday, a couple of received calls and mobile network active for a few facebook chats and browse the news feed. Device never got hot, always went to deep sleep. Will post more results during the week.
[Moto G 4G Android Development] Pupet_Master:
Good job M8, maybe iti s a good idea to make a zip to flash the hal
[Moto G 4G Android Development] beeeto:
Interesting...

I can bring back those older libs in our build, I will check it this week.

Edit: It seems this HAL not only bring us Doze, but also Ambient Display (Or whatever is called that Motorola's thing). I don't use it so I'll compile without it and see if I get better results.

Kernel is implied on this too.

https://github.com/CyanogenMod/andr...mmit/2b42226e672bb7e3cb4afc43dfd90fae16cf561f.
[Moto G 4G Android Development] johan111:
Just wanted to report the outstanding battery life (6h50min SOT!) and to say big thanks to [MENTION=5270463]beeeto[/MENTION]

So it seems that not all devices have the battery drain problem irrespective of HAL version.
[Moto G 4G Android Development] beeeto:
That was exactly my point, but I think it is worth to take a look, maybe we can get 7 hours SOT? :p
[Moto G 4G Android Development] vlt96:
I had <3 h SOT on stock. I just flashed the first ROM in 2 years (I was addicted before). I got 1h30m SOT, but LTE always on for 16 hours, I did no economy on the battery whatsoever. (it's >30% right now)

It may sound like it's not much, but on stock I get to college with ~70% when listening to music over mobile data. I had 95% today. Amazing. Also, I always left the phone still when away from it (about 10 hours), so the Doze bug mentioned earlier might have triggered.
[Moto G 4G Android Development] Fagulhas11:
All LTE variants share the same sensors right? If so, its really odd some have the bug and some dont. I keep having great battery with the stock lib, 16H uptime, battery at 88%, so about 0.8% per hour. Phone was awake about 1 hour with a few calls/texts and a few wifi connections. Its a huge improvement since with the oss hal right now i would be already charging the phone.
[Moto G 4G Android Development] wurstel:
Please provide us with a flashable zip of this black magic already :D
[Moto G 4G Android Development] Pupet_Master:
I think not all LTE share the same sensors, i remember some had different screen drivers, others different cameras.

That may be the trouble that some have good battery sleep and other's (like my self) don't.

I have nothing that wakelock or keep the phone on. On my phone it is the doze that don't trigger some times.
[Moto G 4G Android Development] _ViBe_:
Not all LTE have the same sensors. Also one more thing I saw, there was a kernel which removes Battery Mode and Per App Profiles. I was new to MM and that was a kernel which realy made a huge difference for me. For example, with other roms and kernels i was around half day of use and then need charge, with this I was full day of use with 25% left for next day. Now this happens again with beeeto's builds I also disabled per app profiles and gave me 1 more SOT.... What will happen if he removes permanently those options from battery menu? :D
[Moto G 4G Android Development] Pupet_Master:
YEa i disabled profiles as well. Was it the obsolete1 kernel that you had before?
[Moto G 4G Android Development] _ViBe_:
Yes this one!!!
[Moto G 4G Android Development] _ViBe_:
[MENTION=5270463]beeeto[/MENTION] So shall we expect old libs and removed battery optimization+profiles on next build??
[Moto G 4G Android Development] panagiotis15:
I did a dirty flash upon the cm13 build that i had.Till now i see that the battery drain is much better than the official build.Lets wait and see what happens.
[Moto G 4G Android Development] Fagulhas11:
Update: It's now 2 Days and 10 hours of UPTIME on my device after being back with the stock sensors lib, phone is still going strong with 49% left on my battery. Phone usage has been pretty much the same as before, with the exception of the last 12 hours, was pretty much idle. Still quite a difference considering i had to charge the phone everyday.

Its not the perfect solution, cause IF we could make the oss lib work without the drain, we would get the benefit of doze in the system. Below are the screenshots of the current state.
[Moto G 4G Android Development] bernida:
Did a clean install yesterday on XT1039

installed my 64GB sd card and formatted it as internal storage.

moved old backups via adb push. however I cannot take pictures or download whatsapp media

downloads dont work aswell

accessing old (copied from backup) media (in whatsapp or in camera gallery) works though

seems like it cannot write to the internal storage on the sdcard
[Moto G 4G Android Development] wurstel:
Check if the app has storage permission in settings
[Moto G 4G Android Development] bernida:
yes all permissions were okay.

I managed to fix this btw. Had to reformat the card a couple of times back and forth from internal to removable, because the internal format process used to time out with a java error. randomly it managed to complete.

also this time I pushed the backup to /storage/emulated/0 instead to /sdcard

idk what the issue itself was

oh and one thing on every reboot I get the app warning "system is not responding"

also on one reboot wifi didnt work
[Moto G 4G Android Development] beeeto:
I have reverted the commits we talked about but I didn't notice any difference battery wise.

Could you tell me what lib you changed and maybe upload it here?

So I can reproduce the stuff you changed.
[Moto G 4G Android Development] Danielnc43:
What is the best CPU hotplug and what is the diferents between interactive and intelliactive governor ?

Enviado desde mi XT1040 mediante Tapatalk
[Moto G 4G Android Development] Fagulhas11:
I just reverted this https://github.com/TheMuppets/propr...66397b5#diff-2156b1115f78aec4d0f84dde3d0abccb

The file i used is sensors.msm8226.so that got removed on this commit.
[Moto G 4G Android Development] _ViBe_:
So if just copy this file from factory image and replace it with same permissions I get stockHAL?
[Moto G 4G Android Development] beeeto:
You'd better wait my build that is being uploaded :P

It has the changes suggested by [MENTION=5919354]Fagulhas11[/MENTION] plus removed the OSS HAL off the common device branch. This mean the build won't have either Doze, Ambient Display and all the gimmicks that make them work fine.

Link: Test Build

P.S: Remember this a test build and not Build 3. If you use it, you should be looking for deep sleep stats and battery consumption.
[Moto G 4G Android Development] _ViBe_:
Aaaaaaaawesoooome!!!

Any luck with app profiles and battery modes?

Or...... flashlight? :P hahaha
[Moto G 4G Android Development] beeeto:
Well, as far as I know the power profiles are managed by the PowerHAL, we are using QCOM HAL hence we have only 3 profiles instead of 4 like Stock CM.

I could remove the option to change them moding the framework, but at that point I think it might be better (and easier) for the user just not to use the profiles if they don't want to.

And regarding the kernel you told me, I just checked Obsolote's sources and didn't find anything related profiles, also I don't see how kernel would affect the profiles we are discussing here.

I might be wrong too. :)

As always, if you guys want me to merge something, it would be a good idea to bring me the commits here becouse I don't have much time to dig on githubs looking for that one feature you guys want, haha.

Kind regards as always!
[Moto G 4G Android Development] _ViBe_:
There is really no problem my friend! I really like your hard work! Can't wait to download and test the new build!! :D
[Moto G 4G Android Development] Wyneg:
Don't have doze? Then deep sleep is gone or what?

Thanks!

Update: this build is for comprobate difference of build with doze vs without? I don't understand the point of kill doze... give me a short explanation, please! ;)
[Moto G 4G Android Development] beeeto:
In order to use Doze , our cyanogenmod mantainers had to implement an open source sensor HAL, deprecating Motorola libs. Currently, some users think that this new HAL doesn't allow the phone to enter deep sleep properly causing several wakelocks. The point of this build is to test if this sensor HAL is causing trobule.

Don't use it if you had good battery life with older builds.
[Moto G 4G Android Development] Wyneg:
I have a good battery life with build 2.1, expecting for 3 ;)

Thanks for response!
[Moto G 4G Android Development] _ViBe_:
Just installed... Will come back after a few charges for feedback!
[Moto G 4G Android Development] Edraens:
Hey :) I'm a new user of this version of CM ^^

Could you tell us if there are some battery improvements after the installation of this test build ?

I really love the battery life, but I have to put my device on conservative governor which seems laggy, like in Google Maps or other heavy apps.

I really hope that the testing build will help the battery life without having to choose the conservative governor :)

Keep it up guys, this ROM's amazing, really ! ;)
[Moto G 4G Android Development] _ViBe_:
I'm not playing around with governors. I used to do this on my previous device but found that changes were little.

Since now battery seems better. From 53% to 24% with 2 hours SOT. Not bad. Performance excellent! More info tommorow!

[MENTION=5270463]beeeto[/MENTION] nice move with Color Control and Adway! ;) I really start thinkng that cm hal was the reason for drains.... We will see..

Flashlight commit at your inbox! :)
[Moto G 4G Android Development] pio80:
Look at the latest firmware from thea, battery behaves like enchanted .. There's something in the air .. :)
[Moto G 4G Android Development] knnrdvrmrn:
Hi, earlier I was running build 1. Everything was good except that after a few hours my device would become very slow and laggy.

Few days ago I clean flashed build 2.1 but I'm having the same problem. After a few hours my device becomes very slow. I haven't done any real testing to what might be causing it.

Anyone else having the same problem? Maybe I can have to change some kernel settings to fix this?

Reboot seems to solve it temporary for now.
[Moto G 4G Android Development] beeeto:
I'm aware of it, I am actually playing with entropy and schedulers to try to fight it.

And no, don't play with the kernel, Interactive it is almost always the best governor you'll ever need, it doesn't matter how many others you find in other kernels.
[Moto G 4G Android Development] wurstel:
[MENTION=5270463]beeeto[/MENTION] clock seems to force close on the test build, when an alarm goes off. But that seems to be a problem with latest nightlies. Fix for now: disable clock in titanium backup, and install google clock from play store.
[Moto G 4G Android Development] pio80:
Hi , since yesterday it looks like that

View attachment 3687379

It seems that there is improvement when the screen is on (wifi , cellular data on) for sure...

P.s. what the ..(pii) Is going with skype? It was in the background..but drains a lot .. Have I done something wrong?

Wysłane z mojego XT1039 przy użyciu Tapatalka
[Moto G 4G Android Development] beeeto:
Greenify it.

Some news, it seems that our loyal users were right, I've detected even better standby time with original sensor libs.

It is kind of funny if you think that these new open source libs were implemented to make use of Doze.

The problem here is I don't see many people willing to trade Doze and Ambient Display for less wakelocks, but yeah, they have official nightlys for that I guess.

[MENTION=3412132]wurstel[/MENTION] Same here, I suspect of nightlys too. I'll test it again on this weekend build.
[Moto G 4G Android Development] wurstel:
The idle drain seems to be gone in the test build. When I don't use the phone, I almost have a flat line in battery stats, which is great. I don't use ambient display so I don't mind.

deep spleep vs doze, in the end it doesn't matter, both aim to improve battery life, and if one does the job better we should definitely use that. Its just different names for achieving the same thing. New is not always better (yet), in that case :D
[Moto G 4G Android Development] _ViBe_:
Flat line while screen off. Hope to make it permanent on each bulid. Will come back with max SOT later! ;) Still seeing 1day and 7hours left! :P we will see!
[Moto G 4G Android Development] pio80:
The same here [emoji1] hope to make debloat on each build the most as possible[emoji4]
[Moto G 4G Android Development] Fagulhas11:
This was my last full charge cycle. I could probably extend it for 12/18 more hours, since i charged it during the night, cause i use this as a work phone. So yeah stock lib works great.
[Moto G 4G Android Development] _ViBe_:
Anyone else noticed lag on heavy apps like Facebook or even fcs like ram full, without message?
[Moto G 4G Android Development] Edraens:
I'm having some UI restarts (like status & navigation bar disappearing, and screens goes black then shows lockscreen) sometimes, while using heavy apps too (GMaps, Chrome, Skype). But since I'm using the test build, I don't have those UI restarts anymore.

I'm gonna test it for a few days, and give here a feedback :)

For now, battery life seems better while the screen's off ^^
[Moto G 4G Android Development] pio80:
Next one shot .. Night and flat ... game and fall .. Screen off and flat .. I like that..[emoji1]

View attachment 3688634
[Moto G 4G Android Development] youngsta2010:
Hello, I've just flashed this ROM but I have no root and no options in developer settings, how do I enable root? Thanks

Edit: nvm, flashed SuperSU
[Moto G 4G Android Development] beeeto:
Sorry for the late build, had a lot of work and almost don't have time :(

I didn't have time to test it too, but it should be fine (I just flashed it)

Changelog,

Link: Build 3

You guys sh￼￼ould expect a lot batter standby time with this build (Unless you have crazy apps like Facebook or Messenger installed, :P)

Regards!
[Moto G 4G Android Development] zeroxcub:
Hi guys, and thanks beeeto for the rom :)

I installed the test build two days ago and it's run smoothly with great battery life, can I update directly to ver 3 or should I clean install it ?

Thanks
[Moto G 4G Android Development] nantzen:
incoming calls redirected to voice mail [MENTION=5270463]beeeto[/MENTION] when people call me, they are deviated to voice mail, especially when the telephone is left inactive on the table.

this happens with 2.1 as well as with the test build. Everythings work fine with stock lollipop or CM-NIGHTLY. I think that when Doze is active the telephone wake-up slowly so that the incoming call is lost and deviated by the operator to the voice mail. What do you think? If I could solve this issue I will install for sure your nice ROM.
[Moto G 4G Android Development] lfuentes:
What happened with music player?
[Moto G 4G Android Development] dweller88:
First flash of this ROM and it has been great. Thanks.
[Moto G 4G Android Development] beeeto:
I use 240 too, that was going to be the default of the ROM but saw that some of my users are "Senior" so I didn't set it because of them.

Anyway, after a whole night of work the new kernel is ready, it is bare bones with minimal tweaks and features. We are going to use the new lollipop sources so say hi to screen flickering. (They go away by turning screen off). This is going to be my base before adding more things like governors, schedulers, hotplugs, it MUST work fine since it is stock with a very few things on top to enhance it.

Also I am compiling the kernel with Sabermod 5.0 GCC for a nice performance boost. Planning to start with graphite and strict-aliasing flags after I finish to debug this new toolchain. If you want to take a look please go to here.

[MENTION=6147790]Pupet_Master[/MENTION] Heard you like DT2W, I am not a fan of that feature becouse it drains battery too fast to my taste, but will bring just one build with it so be sure to save the kernel on TWRP when I it happens. And who knows, if it works good maybe we can keep it.

[MENTION=4768557]keenofhiphop[/MENTION] Point me the sources and I will take a look at them :)
[Moto G 4G Android Development] Pupet_Master:
Great, i just flash the rom on top of crDroid (without data wipe, for my surprise it keep all my apps and configs even to the system ones without bootloops) and it is very smooth and stable.

I only miss the feature to control the heads up notifications, to always when pull the notification tray to show the quick settings... exept on non persistent notifications. And the ability to hide the SU icon on the notification as well the wakelock blocker.

But aside from that i'm feeling like home with this ROM, very well optimized and with the right customizations options to choose.

Good job, can't wait for the next update.

I'm using Xposed and my OOM script, i must say that your ROM manage to be faster then crDroid was for me with the exact same configuration and apps.
[Moto G 4G Android Development] keenofhiphop:
I don't hzave the leasr clue on how, but wouldn't this be the repository:

https://github.com/Peregrine-AOSP

There isn't any AOSP thing, right?

What about AOD, which I used before and which offers better performance, compared to CM even to your infused CM it's better...

https://github.com/MotorolaMobilityLLC ain't right, too?

Sorry for annoying you.

Regards
[Moto G 4G Android Development] Radra:
I've been using Build 4 since yesterday and it's working so good and battery life seems better for now. Can't wait for Build 5
[Moto G 4G Android Development] Kayant:
As 5.1 wasn't merged fully it's best to use Alberto97's sources https://github.com/F-AOSP although I was planning on building 5.1 with these optimizations when I got around to doing an update for AOD. So beeeto if you want I can take care of that ;). Great to see you have found someone that combined JustArchi's V4 and Sambermod graphite, strict-aliasing etc. I was wondering how both could be combined and if they should good to see they can. Also looking at Synergy510's repo I was wondering if we could also bring some of the optimizations that has been done with the kernel for our device.

beeeto you might find this interesting ;)http://review.cyanogenmod.org/#/c/72024/
[Moto G 4G Android Development] beeeto:
Build 5 is finally here guys, now optimizations ARE REAL. I am really proud of what achieved here, now we have not only JustArchi V4 optimizations, but Graphite, Strict-Aliasing, O3 and many, many more, in theory this build should fly. Clean flash is MANDATORY, if you don't, you won't get the new optimizations.

I have also compiled the new Lollipop kernel with very few enhancements to improve battery life. This is the start point to add fancy stuff (If everything goes well). Anyway, here's the changelog (It is short but has lot of work behind it)

Changelog:

Link: Build 5

And that is it. Hope you guys enjoy it, now I will start to play with this new toy, haha.

Regards!

[MENTION=4173406]Kayant[/MENTION] Is all yours mate, I have my hands full with CM12 atm :silly:. I am a bit curious about the performance of this minimal AOSP compared to CM12 so I will gladly check when you get it done. We are all going to be waiting for it!

Also, I wanted to ask you something. What do you think about the new LP kernel? I really can't tell the difference and it really bugs me out this screen tearing, it almost make me go back to compile with the old sources, rofl.
[Moto G 4G Android Development] beeeto:
Oh and almost forgot it.

Please go to here and smash the thanks button of this amazing sir [MENTION=4829924]Synergy510[/MENTION]. It is becouse of him we have a big part of these amazing optimizations at CM12.

Kudos mate, and keep doing your fine work :)
[Moto G 4G Android Development] Pupet_Master:
Flashing right now.

I didn't made a clean install though, but i did wipe the dalvik cache, cache and system partition. Didn't mess with the data and internal storage though.

Let's see if the new updates are install without the lost of data.
[Moto G 4G Android Development] keenofhiphop:
Like I usually do I installed the ROM and let it settle about an hour.

Wiped System, Data, Chaches (to what use is dalvik cache as we have ART now?).

Set up process was a joy and till now its pretty fast and smooth, not totally smooth but still awesome :)

Regards
[Moto G 4G Android Development] jkoetsier:
Update works like a charm, no problem so far, thanks for your great work beeeto!! Will defenitely stay my daily ROM for a while and hope you will continue working on this awesome ROM.

Only one question: where can I find the AudioService.smali in framework? I would like tot have more volume steps, but dunno what file to edit in lollipop... In kitkat it always had been AudioService, but it seems it doesnt exist now... Can you point me in the right direction?
[Moto G 4G Android Development] Sparubens:
Good work! Is the SU icon back?
[Moto G 4G Android Development] hotbld5:
It seems the memory leak has been fixed with an xposed module. Just an fyi. http://xdaforums.com/xposed/modules/xposed-fix-lollipop-memory-leak-t3065296

Edit: Grammer.
[Moto G 4G Android Development] beeeto:
You are pretty challenging to staisfy aren't you? I like it, keep giving me feedback and this rom will surely get better. :cool:

Oh, and there's a explanation for Dalvik Cache use on Art, but I don't have it on my mind right now. Regarding SuperSu icon it seems some of the optimizations tend to hide it. (No idea which), try to use stock root and wait until I merge commits to hide the annoying icon on statusbar.

Try this quick update to Build 5.1, think just found the culprit of laggy animations and bad battery. I am sure you will find it smooth. (And if not just tell me as always)

--Important--​

Guys, there's a quick update to Build 5.1, update ASAP, there's a huge battery drain on Build 5.

Link: Build 5.1

Regards!
[Moto G 4G Android Development] scattoit:
Phone app crashes when using headphones. Can anyone make a test please please?
[Moto G 4G Android Development] Silently:
This also fixes the camera bug- it was doing the usual thing where it refuses to save photos. Many thanks.
[Moto G 4G Android Development] Kayant:
I don't notice any difference then again I can't completely tell given am running Liquidsmooth with some Graphite, Strict-Aliasing, O3 optimizations ;). Screen tearing lasted for some minutes after the first boot and I haven't seen it again seen then luckily (5+ Days now)

I was going to ask what if you're using any flags in device.mk to enable the optimizations from looking at your build repo doesn't look like it but I just want to be sure :p

And you're using this tool chain right? - https://github.com/ArchiDroid/Toolc...-4.9-arm-linux-gnueabihf-cortex_a7_neon_vfpv4
[Moto G 4G Android Development] rodsayd:
Hey beeeto, as always the perfomace is excellent! Super smooth everything and of course is my daily driver.

But the camera is not working for me, I have that problem where I take the photo but then it freezes there and it doesn't save (it happens with all cameras, only with the back camera), is there a workaround for this bug? I have rebooted and it didn't solve.