yashsingh1/xdaforums huggingface dataset:
[LG Optimus 4X HD] csk1jw:
The source of lag for this generation of device is data sync. Yes, I would be very interested to look into device lag issues as in the past I have been focusing on kernel page cache management improvements. Kernel-3.4 has some major improvement in this area as well as the block layer.

The bulk of GApps really has nothing to do with device lagging. With my GApps config template and with only 1 Google account registered, the data sync time is always less than 1s, which implies we may get 1s of lag and this is really not to bad.

However, my typical config is 1 Google account, 1 Yahoo! mail using IMAP and 2 push-email exchange accounts. These accounts are handled by Gmail. Another push-email exchange account handled by stock Email & Exchange to bypass the need for device encryption. So, total of 5 accounts. With all of those, then the data sync time, in worst case which I have seen, can be up to 45 mins.

Much to anyone surprise, Doze Mode, the grand power saving feature that touted so loudly since Android M, maybe a major cause of device lag and contribute to the worst case data sync time I just mentioned. I am still collecting data on this aspect if I should disable Doze Mode for my future ROM releases. When the device enters Doze Mode for a certain period, WiFi will be disabled. When this happened, the queue for data sync will start piling up. On next device wake with connectivity, the data sync will storm the I/O and device will start to lag. Ideally, data sync storm should be minimized as GCM should still be waking up the device periodically to regulate the data sync. However, this does not happen if you do not have a cell data plan or GCM had failed somehow for reasons that only Google knows.

To help my data collection, and if you are experiencing device lagging, then please also provide the data of how your device is being setup with regard to the number of accounts. AFAIK, the lag cannot be forever as once the data sync storm is over the device will be fine. In addition, if the device is plugged in all the time, AC or USB, to keep it charging/charged, then Doze Mode will never kick in and hence unlikely that data sync storm will happen.
[LG Optimus 4X HD] b886b:
For me the latest two builds are amazing, not only the switching between different tasks are silky smooth, the launcher redraw problem seems to have improved as well. Even am still on ext4 the speed improvement is very noticeable when compared to the previous builds, and last time i have my phone on for 200 hours it does not need to be restarted to stay fast. But do note that I have disabled all the sync service for email and Google play. So I do agree that the lag is most likely caused by sync .
[LG Optimus 4X HD] asgz:
Solution : Don't install any gapps package. Find and install apk's of your apps from web sites like apk mirror.

I install Rom, SuperSu and after reboot install my app's directly. If you do like that you will be surprise that how fast is your phone and how good battery performance. I am using alternative lightest app's like facebook lite or apus browser.

Of course before wipe take a backup like contacts.
[LG Optimus 4X HD] b886b:
If you go Google less would you be able to use navigation apps???and would your instant messaging app delay in receiving message?? Last time I tried to go Google less my WhatsApp has trouble receiving message, it is coming through but in a delayed fashion. For navigation, I didn't try that and so ia eager to know.
[LG Optimus 4X HD] asgz:
I didn't install navigaton apps to this phone so I don't know. For instant messaging I am using Whatsapp and works normal for me. My main phone is Z5 so most of apps installed Z5. I am using p880 for job. I will try to record a video.
[LG Optimus 4X HD] sourly64:
Found solution! Download zip again and it works with open gapps pico:good:

Rom is really fast and smooth ,in the moment no problem with lagging and sync

Thanks for developing and sequel follows

Regards
[LG Optimus 4X HD] Pacos1:
Thanks [MENTION=5799877]csk1jw[/MENTION], [MENTION=5596265]asgz[/MENTION], [MENTION=4453006]b886b[/MENTION] for your answers!

[MENTION=5799877]csk1jw[/MENTION]: I use k9-mail as mailclient. In my first attempt I used for all my mails the pop3 protocol. After an manually restart the lagging began with the issue of the notification-bar slide down. The lagging get worse for 24h without a unique betterment, even after restarts. Then I decide to reinstall the rom from the scratch.

Other suspect apss installed where WhatsAps, google maps (configuered without spy activities), adaway and google play.

In the second attempt a gmail acount where configured in k9-mail with imap. The rest of accounts as pop3.

After restore a backup from CWM 6.0.4.5 the boot got stuck in the LG-logo. This happens with 2 different backups with this rom, without error messages from CWM. Really annoying as i intended verify the data sync issue and test [MENTION=4453006]b886b[/MENTION] 's workaround.

But after all still a very promising ROM and very recomended to take a look in, due his awesome snappiness whith this device.
[LG Optimus 4X HD] b886b:
I have noticed a bug while using this great rom. Every time I reboot the device , the clock would be changed to a different time then the alarm will sound and I have to dismiss the alarm manually. Can anyone confirm the same behavior???
[LG Optimus 4X HD] Pacos1:
[MENTION=4453006]b886b[/MENTION]: I also observed this issue. I have activated "obtain the time from the network" so it tooks a view seconds after get the network access to get the right time after reboot.

It seems that the device don't memorize the time with this Rom. In CWM the backup get an ancient time stamp.

I consider this an insignificant bug due his easy workaround.
[LG Optimus 4X HD] kostarum:
Testing July security update already? Or?

What kind of optimizations are still possible?

Gesendet von meinem GT-I9295 mit Tapatalk
[LG Optimus 4X HD] asgz:
If you like to optimize Rom, don't install gapps package.
[LG Optimus 4X HD] csk1jw:
New build 20170708

New build is up.
[LG Optimus 4X HD] derders:
[MENTION=5799877]csk1jw[/MENTION]

thank you very much for your work

could you fix the alarm clock perhaps? It looks like it works if a network connection is on but without alarm doesn´t work (only after unlocking screen)

deep sleep problem? tried another clock app but same problem...
[LG Optimus 4X HD] raodone:
How do I change this?

- ZRAM set max_comp_streams = 2

- Set vm.swappiness = 60

- Removed SMD sensor faking in framework. Use config_autoPowerModeAnyMotionSensor

To select real motion sensor.
[LG Optimus 4X HD] b886b:
That is the change log of the rom，just download the rom and install that and the changes will be applied automatically.
[LG Optimus 4X HD] sourly64:
deleted
[LG Optimus 4X HD] raodone:
One question will be that our device could work with the new version of Android O?, And another question still can not be used the xposed? PS: I'm using the last update yesterday and it works 10/10: D
[LG Optimus 4X HD] b886b:
Xpose is still not available on nougat yet.
[LG Optimus 4X HD] csk1jw:
I found that Android system time and RTC are not in-sync. You can do the following to sync them.

$ adb root
$ adb shell hwclock -w

You should not have to do it every time on reboot and power off/on. I verified that Android can source the initial clock from RTC but RTC time was taken as UTC time, so the system time will be set accordingly with time zone offset.

That also means that the kernel RTC interface is working. I don't know how and when this issue sneaked in. The kernel alarm-dev ioctl has ANDROID_ALARM_SET_RTC_TIME but this needs to be called by user space, which is Android framework to sync system time and RTC time.
[LG Optimus 4X HD] csk1jw:
New build 20170714

New build is up.

I am pleased to include another bleeding edge kernel update - SDCardFS - and enable it. This should help heavy apps that use internal SD as cache or storage, such as Maps and Youtube. It works for both internal SD and external SD. To check SDCardFS in action from adb

$ adb shell df -h -t sdcardfs

SDCardFS is highly experimental. *** Please backup properly *** Use at your own risk.

For more details on SDCardFS

https://www.xda-developers.com/divi...les-fuse-replacement-will-reduce-io-overhead/

Why does FUSE on Android suck?

http://fixbugfix.blogspot.com/2015/11/why-does-fuse-on-android-suck.html

To go back for FUSE for debuggging, remove the following line from build.prop

ro.sys.sdcardfs=true

This version also includes Exchange Security Bypass on the stock AOSP Email & Exchange2. Thanks to [MENTION=4254900]Rawi666[/MENTION]. Unfortunately, OpenGApps installation may remove stock AOSP Email & Exchange2 if GMail is part of the installation. At this moment, OpenGApps config file can only provide the keyword to retain Email but not Exchange2. I had filed the issue on OpenGApps.

https://github.com/opengapps/opengapps/issues/515

Advanced users should be able to modify OpenGApps installer script to retain AOSP Email & Exchange2 with ease. I will leave the details out here.
[LG Optimus 4X HD] niceplay:
[MENTION=5799877]csk1jw[/MENTION]

The clock-alarm isn't working with screen shutoff and alarmtime > +10 minutes. I've set hwclock -w, changed timezones, set systemclock=hwclock.

I've disabled doze-mode by 'dumpsys deviceidle disable' and whitelisted the clock under doze-settings.

Curiously the alarm is working when charging by usb-powersupply. The same test has been made by derders.
[LG Optimus 4X HD] csk1jw:
New build 20170715

New build is up.

[MENTION=4453006]b886b[/MENTION] [MENTION=4281444]derders[/MENTION] [MENTION=5373589]niceplay[/MENTION] I fixed the alarm and clock issues that were reported. Hopefully, it works for you folks now.
[LG Optimus 4X HD] derders:
tried it but still problem :(

I flashed latest ROM clean without GAPPS and SuperSU

could you make a test please like this:

no Wifi + no Mobildata + not connected via USB

Set alarm to min. +10min.

it is working for you?
[LG Optimus 4X HD] csk1jw:
Yes, it works for me. I tried an alarm 45min apart yesterday before I released the ROM. I just tried another alarm 20min apart before replying to this thread. However, I am using Google Desk Clock from OpenGApps which replaced AOSP clock.

Before trying out, can you also check the RTC clock using the adb?

$ adb shell cat /sys/class/rtc/rtc0/time

The RTC clock is UTC, so depend on your selected time zone, the RTC clock may not be the same as your Android clock. For eg. if your time zone is GMT-5 and the Android clock is 12:00PM, then RTC clock should be 17:00.
[LG Optimus 4X HD] csk1jw:
deleted

Adoptable storage does not use sdcard daemon so no FUSE or SDCardFS.
[LG Optimus 4X HD] b886b:
Just tried the latest build, the) apps send to load up faster and the device feels very snappy. Great job OP. And I can confirm that the alarm clock bug has been solved, restarting the device wouldn't trigger the alarm anymore. Regarding the bug that after screen off for 10 minutes then there alarm clock didn't sound, I have tried to replicate that but to no avail. What I did is turn in aeroplane mode then set an alarm for 15 min later, after 15 minutes the alarm sounds so I haven't experience such bug. Also as suggested by op the aosp click is broken, u should try installing gapps to replace that with Google clock and it should be fine.
[LG Optimus 4X HD] csk1jw:
New build 20170722

New build is up.

Google disabled HW crypto engine in AOSP kernel-tegra for grouper without providing any alternatives. ARMv7A NEON optimized version was not enabled perhaps due to kernel-3.1 lacking proper KERNEL_MODE_NEON implementation. I ported the code from AOSP kernel-msm and enabled most of the available NEON optimized implementation from upstream kernel.

I have always been retaining HW crypto engine in my P880 kernel. There were rumors that Tegra3 crypto HW did not perform quite to the standard and Google decided to disable it and used CPU instead. Anyway, based on the designated crypto driver priority, here's the likely theoretical performance from each implementation from low to high:

AES: generic < arm-asm < neonbs = HW crypto

SHA: generic < arm-asm < HW crypto < neon

NEON implementation always have the arm-asm optimized version because KERNEL_MODE_NEON does not support NEON instructions in non-process kernel context such as interrupt. In such cases, it will fall back to optimized arm-asm version.

Another limitation of CPU crypto is by nature synchronous implementation, ie. when SW used CPU for crypto ops, it has to wait for it to complete. HW crypto is typically asynchronous, ie. CPU can take other tasks while crypto ops are in-flight.
[LG Optimus 4X HD] Black Manta:
New build with newest Nano gapps without sim works really great. The laggs are minimal. ? ?

Better than the last builds in my opinion.
[LG Optimus 4X HD] b886b:
I second that the performance is really good, but I do notice one thing. After updating the rom, I go to the playstore and found that there is an update for both the mxplayer and its codec and I go on to update the codec first, however while the update is being downloaded the device reboot itself, don't know if there is any conflict between the most recent update in Neon optimization or not. For now I suggest not to update the codec of mxplayer. Even playing a video after updating the codec and the app seems to cause the device to reboot. So again don't update the codec or even the mxplayer itself for now.
[LG Optimus 4X HD] b886b:
An update on the restart problem, I am still facing constant reboot problem on this build, I tried dirty flashing the rom but to no avail. Now it happens with a dialogue saying your systemui crashed and then it goes strictly into the Android logo which seems to me more like a soft reboot. Do you guys experiencing the same issue, if you guys did not have this problem then remember to stay away from the update of mxplayer for now.
[LG Optimus 4X HD] csk1jw:
When the unexpected reboot happened, can you pull the last_kmsg out from the device while it was booting?
[LG Optimus 4X HD] b886b:
Will do. But it might just be a configuration error on my side, right now I have narrowed down to two application that I have updated and uninstalled them. So far my device is up for more than twenty hours and no problem. Again , thanks for your great rom.
[LG Optimus 4X HD] raodone:
How can I uninstall unnecessary system gapps ?, I already tried with root unistaller and link2sd and without success, restarting the apps are still there and I want to clarify that I have root access.
[LG Optimus 4X HD] Black Manta:
Use Total Commander. :)
[LG Optimus 4X HD] b886b:
Hope it helps
[LG Optimus 4X HD] csk1jw:
Which system gapps did you have in mind? Why is that even necessary? For OpenGapps, even if you are using the stock version, you can always configure how the gapps are to be installed. Please read the advanced features and options from the OpenGapps wiki https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options on how to strip unwanted GApps. You can always start with my OpenGApps config template in the OP and add your own customization. Try it out, it is easier that you thought rather than going into other ways of getting the same done.
[LG Optimus 4X HD] Baile:
Installing Mxplayer+Codec Neon+Reboot works for me.
[LG Optimus 4X HD] b886b:
Still facing random soft reboot here.... Didn't know what is wrong, and now it happens at least once each day,....
[LG Optimus 4X HD] Baile:
Have you sent log file?

Try full wipe installing rom+gapps without any other app.

If issue is gone, you can be sure random reboot was caused by an app.
[LG Optimus 4X HD] csk1jw:
New build 20170810

New build is up.

[MENTION=4453006]b886b[/MENTION] The new build has fixes for KERNEL_MODE_NEON states save/restore. Please check it out and report back. I also got occasional reboot while playing Youtube video in last build, but I wasn't able to reproduce it every time to get kernel last_kmsg log myself.
[LG Optimus 4X HD] masmoe:
Would someone build this ROM with signature spoofing feature?

I want to use microg project instead Gapps but I don't have capabilities to build ROM.
[LG Optimus 4X HD] Baile:
+1
[LG Optimus 4X HD] Phil_Smith:
Check nanomod.

Under stable downloads you'll find a patcher there taking over the preparation you aim at.

To make things easy, flash magisk as a root method.

After that nanomod-microG will use magisk to install in a handy way.
[LG Optimus 4X HD] masmoe:
Not working. I already try it. There is error message during installation and failed. ( not compatible with sdk 25 as I remember)
[LG Optimus 4X HD] Phil_Smith:
Hm.. strange.

So you clean installed the rom,

flashed magisk,

Flashed the patcher,

then flashed nanomod-microG?

At which step did you get the error message?
[LG Optimus 4X HD] asgz:
I can't finish the latest build installation, stucking in the middle and not proceeding further ..

Edit: Redownloaded and succesfully installed thank for your hard work m8
[LG Optimus 4X HD] masmoe:
Yes clean install >flash magisk>flash patcher (but failed)
[LG Optimus 4X HD] sourly64:
Test now ;)

Iam on TWRP 3.1.1. from https://www.androidfilehost.com/?fid=673368273298956102 :good:

Do all nessescary wipes .Formated everything you can to F2FS :good:

Flash rom ,open gapps pico and newest webview zip and SuperSu 2.82

First start everything is fine .Google Setupwizard works :good: Only i have no root ,so reboot to recocery and flash SuperSu again .Works:good:

Rom is really fast and smooth .For now best build :good:

Thanks csk1jw for this developing
[LG Optimus 4X HD] Phil_Smith:
Don't know.. will try to reproduce the error when I find the time.

P880 is not my main phone anymore though, and my days are already filled atm.

I only tried nanomod on the mi5 so far, and that worked perfectly.

Same Android version (7.1.2), same Magisk module, same patcher...

Only thing different is the architecture (arm for you, arm64 for me). Might be an approach.
[LG Optimus 4X HD] masmoe:
I will try redownload ROM and magisk + module. My P880 not my main also, but still love it :)
[LG Optimus 4X HD] andy_96:
It doesnt change back to ext4 after reboot?
[LG Optimus 4X HD] sourly64:
Thanks for this note :good: I checked it in recovery and it is in ext4:rolleyes: ,but for me no problem

Rom is good for daily use :good:
[LG Optimus 4X HD] b886b:
Testing now and will report later. I didn't know what triggers the reboot all the time but upon flashing the updated rom, the result seems promising. Great work. For f2fs I don't even bother that anymore, with sdcardfs and the optimization op implemented, it is one of the smoothest experience you can get out of this legacy device. Thanks [MENTION=5799877]csk1jw[/MENTION] for your dedication.
[LG Optimus 4X HD] Black Manta:
Installed the new build with a clean install:

- Rom

- Webview

- Gapps

- Magisk

Works really good even with gapps. This rom is going to be better and better. :D
[LG Optimus 4X HD] b886b:
Does magisk hide works？and is there anything special that we need to do in order to use magisk？？
[LG Optimus 4X HD] Black Manta:
I haven't test it yet because I have SElinux permissive but I will try. :)

In general I prefer Magisk because it's the best rooting tool/app. :)

Update:

Works fine. :)
[LG Optimus 4X HD] b886b:
Just to report that the rom is super fast and the problem of self reboot has been solved. And I notice that now the device run much cooler even under heavy load, great job:svetius:
[LG Optimus 4X HD] Black Manta:
I noticed the cool back too. Great to see that a so old from LG offended device works with such a new android version! :D
[LG Optimus 4X HD] csk1jw:
New build 20170819

New build is up!

I finally nailed down the bug which limits the size of uncompressed kernel. This bug has been blocking my kernel modernization efforts for so long... Google AOSP kernel-3.1 for grouper never has this issue. Damned you, LG!

And I am pleased to present the 1st ever post-N kernel feature to bring into our ancient kernel-3.1 for LG-P880, Seccomp-BPF. This kernel feature provides hardening sandbox for Android N mediacodec, mediaextractor and Chrome process. You can check it out on Chrome with

chrome://sandbox

Why did I pick this feature to port? Well, it is likely that Android O will require it, if I ever wish to try my luck working on this. :)

https://www.xda-developers.com/google-is-making-android-o-more-secure-with-seccomp/

This also proves that ancient kernels can be incrementally updated to support specific feature needs. I have always believed that the only reason that some SOCs will never see the light of Android N, because it requires at least kernel-3.10, not because of Vulkan/OpenGL APIs bla...bla... Hey, OnePlus I am looking at you!
[LG Optimus 4X HD] Baile:
Lost.dir

Anyone knows how we get rid off the annoying Lost.dir?

---------- Post added at 07:08 AM ---------- Previous post was at 06:42 AM ----------

A lot of changes! I hope we don't lose the amazing smoothness of the recent rom.;)
[LG Optimus 4X HD] Baile:
freezing

Unfortunately system is freezing. Rollback to previous rom.
[LG Optimus 4X HD] ze7zez:
OnePlus? Can I ask for clarification?

***

I am happy with the clean system v2017.08.18. It works smoothly as previous versions.

Gapps kills systems with a small amount of RAM and shortens battery life, so I disable unused applications in settings.
[LG Optimus 4X HD] b886b:
Testing out the latest build, the experience is as good as the previous build. Hope that more advanced features can be brought to our device after op cracking the kernel size bug.
[LG Optimus 4X HD] asgz:
I tested latest build and really smooth thank you.

Android system, drain battery in a few hours almost completely. Thats why I rolled back to previous vers.
[LG Optimus 4X HD] sourly64:
Can confirm battery drain .This build is in performance the same build before,but for me its OK ,its smoothly and sometimes fast.

Also in every build before ,i get by testing performance with a game like Real Racing 3,after a few minutes breaks the sound

and it begins to lag :confused: With new build its much better ,but mentioned the battery drain

Thanks for developening to csk1jw :good::good::good:
[LG Optimus 4X HD] Baile:
I don't want a clean install/full wipe for the moment. Only flashing system some apps ( firefox, mixplorer) don't start- white background.

Perhaps that is caused by individual configuration (nogapps-only webview,microg apps).
[LG Optimus 4X HD] Baile:
Lost.dir

Am I the only one who has the lost.dir folder?

Am I the only one who doesn't want permanently writing on my SDcard?

Do any simple trigger exists that I missed?

Who will light me the path from my ignorance?
[LG Optimus 4X HD] b886b:
Cannot confirm the battery drain, my battery life is almost identical as the last build or even slightly better. But do note that I have experienced some battery drain after activating ui tuner once disabling that and the battery life is normal again.
[LG Optimus 4X HD] raodone:
One question, does anyone know if our beloved smartphone will receive the new version of Android O?, I understand that it is official release and then it will also take time to get it for our device to be affirmative the answer. : D
[LG Optimus 4X HD] asgz:
I install clean latest rom second time today. Charged battery till %100. In 27 min Android system drained battery to %91. No gapps installed, other apps same with previous vers.
[LG Optimus 4X HD] b886b:
That is kinda strange, I have been using the latest build for several days already and there is no Android System drain problem. I just dirty flashed on the previous build and everything seems fine. Have u tried installing the gapps on the device to try if the problem persist????