yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] adstraylight:
This could be just the new system doing its background optimisation. One thing I've noticed though is that if, after flashing, I do a final clearance of cache & dalvik, this issue is much more pronounced, and since I stopped doing this, and simply wipe those areas before installation, I've had the problem far less.

My fix for when this occurs is to shut the tablet down, and charge it switched off for a few hours. I'm not certain why, but it seems to work, as can restarting a few times.
[Nexus 7 Android Development] black_bottom:
Hmmm.. I have no root after dirty flash (with final wipe cash+dalvik) the latest version from the version from November 2017.

Even if the N7 is in flight mode I have no deep sleep..
[Nexus 7 Android Development] AndDiSa:
[MENTION=1681823]black_bottom[/MENTION] hmm ... I suppose you are/were on a different ROM. The latest version of this one is from 9th of April 2018 and if you would like to have root I suggest to install Magisk.
[Nexus 7 Android Development] adstraylight:
Well like I was saying I think the key is a cold restart, my working theory is that the wakelock is a memory resident condition, due to some optimization process getting caught in a loop and never terminating, or maybe terminating, but not releasing the wakelock. As I said, this is not ROM specific, so a possible AOSP thing.

As for root, I have to re-root every time I flash a new system, as this also overwrites the kernel, but I use supersu, and have no experience with magisk.

Perhaps a clean flash is in order, as there looks to have been a lot of changes between November's edition and the latest, particularly in the kernel.

It certainly feels a lot more developed and mature, to the point that I've now disabled my task killer and am relying on the built in memory management! Yay!?*

*With a few tweaks from the collection...?
[Nexus 7 Android Development] black_bottom:
Thanx - ist running well again.

I flashed magisk - so got root again, but no deepsleep.

So I flashed the newest gapps - after this the device is running well again.

I think it's nessessary to flash magisk and gapps again after every update (dirty flash).
[Nexus 7 Android Development] psiphi:
Yep, you must root and reflash gapps after any new rom.

Using Open Gapps, you may even have to uninstall and reinstall the google apps not part of the package. (I think permissions get messed up with new rom and Open Gapps.) Music app is still broken even after reinstall, but I always use a 3rd party app for music anyway, so no big deal.
[Nexus 7 Android Development] Eliastik:
Any solution for the random reboot issue other than factory reset ?
[Nexus 7 Android Development] adstraylight:
You could try installing Kernel Auditor and setting the CPU Quiet governor to 'runnable' instead of 'balanced', also use the clear all button in recents more often.

Let everyone know how it goes, as the governor change works for me to prevent system ui lockups, which I'm guessing is what you are referring to. Remember it is just the CPU Quiet governor, not the main kernel governor.
[Nexus 7 Android Development] Sam Nakamura:
I had several sudden reboots after a very good start with the ROM but found out that it most likely was related to my aggressive entropy settings in KA, reverted this and it's fine now but the next day I read about your suggestion and applied it, just like getting "system UI" and "intend filter verification service" out of battery optimization, no negative side effects at all, system is total stable again, exept [MENTION=2188693]AndDiSa[/MENTION] a I got nova launcher crashing when I opt to show weather in the Google search box, took a log but I'm not sure if ROM or app related....

https://drive.google.com/file/d/126Bc7Y86qU3pldSWQHDbbPJlVvFONZNA/view?usp=drivesdk

other than this I'm super happy with this ROM, thank you so much!
[Nexus 7 Android Development] adstraylight:
I just reproduced the nova crash, and if I'm reading my own logcat correctly, it looks like it is because nova tries to use quicksearchbox as its weather viewer when the weather widget is tapped. I don't think this package is included in the ROM, hence the crash. This may be why the Nova Devs have kept it as an experimental feature.
[Nexus 7 Android Development] Sam Nakamura:
Do you use Google Go instead of the standard Google App? I do and this might be the reason for the "compatability issue"...

Anyways, not a ROM issue from what I understand
[Nexus 7 Android Development] adstraylight:
Yes I do, so you're probably right. The google app has been too resource heavy for the grouper for some time now. I wish they'd put the Go Search app on the PlayStore...
[Nexus 7 Android Development] section_94:
I also confirm the reported issues with the April ROM on Tilapia. It took several attempts to get the OS to boot using exactly the instructions in the OP. So, flashed ROM,reboot-flash pico gaaps, reboot-flashed Magisk and finally flashed the startup wizard fix. All were clean installs with everything wiped-even internal storage. Also the fix for the initial setup app was needed this time unlike the February ROM (the app kept crashing when you selected either option at the beginning).

So here we go:

Random reboots (which happened on the previous build as well).

System locking up when watching movies with VLC.

Booting gets stuck on the Google logo for too long (not just in the initial startup but every freaking time!)

Setting the CPU Quiet governor to runnable did not change anything for me. I disabled it completely for now.

The first one I installed was the February ROM and I flashed the latest one hoping it would help with the random reboots but it actually made it worse overall since I didn't have video crashes on that one.

I hope these issues get fixed in the next ROM.
[Nexus 7 Android Development] AndDiSa:
[MENTION=9127008]section_94[/MENTION] until now all issues which were reported and where I got a logcat were initiated by either applications blocking too long the UI and then were killed by the watchdog or initiated by using e.g. the ROM from 04/06 instead of 04/09 where the video issue was resolved.

The 'long' startup is partly due to the fact that the kernel is quite big now, which means uncompressing, initialising, etc. takes some additional time.
[Nexus 7 Android Development] section_94:
Thanks for the answer! How can I create and post a logcat? And is there anything else I can try aside from reverting to an old version?
[Nexus 7 Android Development] AndDiSa:
[MENTION=9127008]section_94[/MENTION] to create a logcat you can e.g. connect your device with a PC via USB and then open a console. Here you can get a logcat using

adb logcat >log.txt

If you would like to see the log in parallel you can type

adb logcat | tee log.txt

You can even see the log while booting the device so you probably can see issues during the boot phase more easily.

The above commands are working on Linux having adb set up correctly. For Windows it's working in a similar way, but I do not know the correct commands by heart
[Nexus 7 Android Development] adstraylight:
In support of rhe above, here's a good ol' post that's worth bookmarking: https://xdaforums.com/showthread.php?t=1520508 .

There are also numerous apps on the playstore that can make it easy for you, one of my favourites is Logcat extreme. Also check out the log saving options in the settings menu of Kernel Auditor.
[Nexus 7 Android Development] adstraylight:
I must say that this ROM is fantastic, no issues whatsoever with my personal configuration and I've reduced the tweaks that I use on grouper also. Many thanks to AndDiSa?

For anyone interested, all I'm doing now in addition to the base ROM:

In build.prop: enable sdcardfs by removing the # from this line: #ro.sys.sdcardfs=true

In KA

1. Set CPU Quiet governor to Runnanble.

2. In virtual memory tab, set Dirty Ratio to 26, and Dirty Background Ratio to 9.

In Init.d Scripts Support app (you will need to install busybox to get this to work, I use Stericson's), I run the attached two scripts. The noatime script will throw a couple of errors, as it recursively remounts the file system partitions for simplicity, and two of them can't be remounted, so nothing to worry about. More info form the page where I found it: https://xdaforums.com/showthread.php?t=1205259

Please note I only use the noatime portion of the full script, an the rest is well covered in the ROM itself.

The startup script is just a collection of tweaks that I've found make things better with my config (thanks to parrotgeek for pretty much all of it), YMMV.

As I say, this is just what works for me, so make of it what you will☺

Thanks again to AndDiSa for a great ROM to play with!
[Nexus 7 Android Development] Sam Nakamura:
Thanks for sharing this :) I'll definitely check it out...

Did you already try the "Google Go patcher" on grouper with this ROM, I read in previous posts of [MENTION=2188693]AndDiSa[/MENTION] that he already applied some of the android go patches, so what's your thoughts on this?
[Nexus 7 Android Development] adstraylight:
Never heard of it, I shall have to look it up. One of the UA devs did say though that all the Go config does is trade ram for CPU use, and what would be very cool would be a Go gapps package applied to a standard ROM.
[Nexus 7 Android Development] Sam Nakamura:
All right, you may want to have a look here....

https://www.xda-developers.com/android-oreo-android-go-low-ram-patcher/

Sorry for the OT :) I'll stop it now!

Edit: one side effect of this patch is that it makes android Go apps available via Playstore (Google Go, Maps Go, etc.), so it's possible to auto update them finally... - I actually only care about Google Go
[Nexus 7 Android Development] N4b0:
[MENTION=9127008]section_94[/MENTION]

I just tried the recent version(20180409) on my tilapia and had some troubles too.

First Problem was that when I reboot directly from twrp it hung up and produced random reboots on boot up. So whenever i used TWRP, I just shut down the tablet and it worked.

Second installation order: 1. Wipe system(ext4), cache, data(f2fs) 2. reboot 3. install rom 4. shutdown and normal startup 5.install gaaps.

Third Now when i tried installing Magisk on that point it randomly reboots and it hung on video playback.

So I had to completely reinstall and pass on magisk for now.

Furthermore the first cpu core seems to be always on 60 to 70 load all the time. Dont know if this is normal but I dont think so.

mfg N4b0

Edit: just now it randomly reboots after idling for 2 hours. I will try to logcat that.
[Nexus 7 Android Development] Swanee123:
Yes. I have recently gone back to the January version for my tilapia after a frustrating few days with the April version. Now working flawlessly with January version and Magisk
[Nexus 7 Android Development] siavoshkc:
I got the Tilapia version of TWRP and installed it smoothly. Everything went fine except wifi. It keeps disconnecting continuously when trying to connect to my home router. Authenticates, obtains address and connects but disconnects immediately. I restarted my router and it went connected for a while but again started to disconnect.
[Nexus 7 Android Development] adstraylight:
I find one core is constantly at at around 1khz when observing in realtime in KA, I have a theory that this is due to the polling by KA itself, as my overall battery usage does not reflect such a heavy CPU load. Also remember that for some time after installation, the system is optimising in the background, in addition to the tasks that you are requesting of it.

As for reboots, there's a couple of things I'd suggest, try setting the CPU quiet governor to runnable, as this uses a different metric for CPU load, also try turning on GPU rendering for 2D in the developer options to try to relieve some of the foreground load of the CPU.

Another thing, due to limited RAM, it may be worth clearing the recents screen before initiating anything intensive. I have also found this to have the effect of smoothing the UI, my theory for this is that the capacity in the cache for all the screenshots in the recents screen is constrained, so too many and it gets bogged down. This may also cause reboots, as this is the last resort of a system that has run out of RAM.

---------- Post added at 11:23 AM ---------- Previous post was at 10:50 AM ----------

I took a look at the Go patcher, and it seems to be just for Oreo ROMs, anyway like you I'm only interested in Go Search, and it's not too much effort to check apk mirror every so often☺
[Nexus 7 Android Development] Sam Nakamura:
Nope, read a little into the thread, even though the OP says so plenty reports confirm it to be working down to KitKat... Even the OP later confirms that it's not Oreo exclusive
[Nexus 7 Android Development] adstraylight:
Oh, I see now, apologies?

As it happens, the flag the script adds to the build.prop is in this ROM already, just commented out. I have actually played with this before, and it does help with RAM usage, but there's a cost, you loose some of the ui niceties, such as transparent notification bar and the transparent navbar in Nova. Also the transparent status bars in all apps go black.

I read somewhere that it's possible to restore these, but it requires modifications to the system ui apk to somehow disconnect the resource change from the low ram setting.
[Nexus 7 Android Development] Sam Nakamura:
Nah, that's not desirable for me too and the overall performance of this specific ROM is already quite good, sure it depends on the use case, installed apps, etc. but for me running xda labs and YouTube vanced, doing some browsing it's really satisfactory...

Thanks for your take on this! Have a nice weekend :highfive:
[Nexus 7 Android Development] pbasista:
Hi, I have tried the April build on Tilapia as well. The installation was very cumbersome, because the tablet kept stuck on the Google logo (which is the bootloader I presume) after some of the steps when it was supposed to be booting normally. For instance, this happened when I flashed the factory image using fastboot and then installed the firmware zip and open GApps using TWRP. I had to perform a lot of trial and error to finally succeed. I think I had to at first boot into firmware without GApps and only then install them, but now I am not sure. Then there was this issue with crashing setup dialog (which is really an epic failure). The zip package with the so-called "fix" to this issue somehow worked, although I have no idea what it did exactly. Anyway, after a long time, I have managed to make the device boot properly and now it kind-of works.

I am saying kind-of because there is one major inconvenience. *Every* boot takes a very long time because the tablet is stuck at the Google logo (again, I presume it is the bootloader) for several *minutes* before continuing. I am not sure why it is happening. I suppose that `logcat` or other logs within the running Andriod system would not have any information on what happens at the bootloader stage and why it takes so long.

Then again, I am not sure whether it is indeed the bootloader that is slowing the tablet's boot down. Did anyone perhaps experience something similar?
[Nexus 7 Android Development] adstraylight:
Insomnia thought.. [MENTION=2188693]AndDiSa[/MENTION], could the long boot times some are experiencing be because of the trim function? I remember from the parrotmod days that some emmc chips have an issue that causes them to take a long time to trim. I was wondering if the trim settings in build.prop cause the device to trim at startup?

I noticed that I occasionally have a long boot, and I know that I also have one of those cards.
[Nexus 7 Android Development] AndDiSa:
I am not sure ... there is also the chance that the file system(s) are not unmounted cleanly and a file system check takes place.

Trim time may be an issue, too, especially if you have less than 3-4GB free space left.
[Nexus 7 Android Development] Fatdogmendoza:
Did the April 2018 update yesterday. Same long boot process. Very similar story in terms of getting everything installed. Thereafter only installed the gapps-pico hence plenty of space still available. Would be great if there is a fix for the long boot process.
[Nexus 7 Android Development] apocalypsenzn:
I am experiencing a long boot time. My Nexus is booting in 5 minutes.
[Nexus 7 Android Development] NIK3SH:
Someone please help.

I am too facing long boot issue with my tilapia.

Earlier I was on 201711111.fs build which was working fine without such booting issue. But post upgrade to 20180409.ds build starting / booting up device is really pain.

My device remain on Google logo only for around 6 minutes. So total boot up time is around 7 to 8 minutes always.

Also charging and other performance functionality have been hampered
[Nexus 7 Android Development] adstraylight:
I've just realised that what tne tilapia users are talking about iss a different thing to what I occasionally get, in that mine sits playing the boot animation for a long time sometimes whereas theirs is at the google logo. Apologies ?

---------- Post added at 04:28 AM ---------- Previous post was at 04:19 AM ----------

Insomnia thought 2....could it be bootloader version? Is there anyone with a tilapia that is not getting these issues? If so what is your bootloader version & install procedure?
[Nexus 7 Android Development] NIK3SH:
I believe we need to concentrate on changelogs we introduce in newer build with context of ROM Booting.

Since I go thru on majority post of this thread with conclusion that issue started replicating gradually with newer build only where bootloader version remain intact since beginning.

All earlier build with timestamp of 2017*** seems to be not having this issue.

Is there any log or trace which can be collected and analyzed further to come to any concrete conclusion for this ?
[Nexus 7 Android Development] adstraylight:
Ok, maybe you're right, it was 4.30 AM ?

I just remembered a similar thing happened on m-kernel, and the differentiator was the bootloader. Whereas here it here it seems to be the model. Unless as I said there is a tilapia user that doesn't have the problem.
[Nexus 7 Android Development] AndDiSa:
[MENTION=4591465]NIK3SH[/MENTION] in the February build the major changes are: mount namespace support and seccomp support

Does the January build show the same issues or does is boot faster? Another thing which was changed with the February version for Tilapia that I changed from Millosr's tree to my own tree (nevertheless still based on Millosr's)
[Nexus 7 Android Development] hteles:
TBH, I stopped using my tilapia since last update.

A few months ago it wasnt taking ages to boot.

I use it mainly to read stuff, but lately doesn't pay off turning it on.

Nevertheless, I wish to thank and show my appreciation to AndiSa for his work on this ageing device.
[Nexus 7 Android Development] adstraylight:
On a more positive note, I think I've found a couple of 'new' ways to save RAM:

Chainfire's Recently app seems to keep things a bit more fluid in the UI department, I have it set with an age limit of one hour, and an entry limit of six. I this stops the thumbnail cache getting overloaded, and slowing down the gui.

Another thing I'm trying is having this line in build.prop: persist.sys.purgeable_assets=1

I think I'm now getting more RAM freed when clearing all recents with this setting on a consistent basis.
[Nexus 7 Android Development] brewer75:
I have a Grouper and I can say that the January build was the last one that was "trouble free" for me. From the February build forward I have had problems with boot time as well as random reboots and instability. I have tried some of the fixes that have been listed in previous posts and have eliminated "memory hog" apps like Facebook and Messenger but I don't see any difference and the problems with my Grouper persist. For instance, I'm writing this on my laptop and recently booted my tablet only to have several reboots take place. Then, I get a dark screen that will not wake up by pressing the power button (it does eventually wake up on its own after a few minutes) although notification sounds do work while the screen is black. Once the tablet appeared to have smoothed out I tried to update apps through Google Play and the reboot occurred again. The reboot may only go back to the Android screen but sometimes, it goes completely back to the Google screen as though it is a complete reboot. Again, I can say the January build did not cause any of these problems and, despite sacrificing the fixes for the lock screen swipe, Magisk safetynet, and security updates, I may go back to that build for stability sake.
[Nexus 7 Android Development] AndDiSa:
This is exactly the behaviour when there is not enough memory available and both, swapping processes and freeing memory, occurs in parallel. Most of the times the resource provider will be killed and its memory will be freed. It takes some time (even minutes) and the tablet is almost not reacting. If you continue to use the tablet in this state after a few time a reboot might occur. If you let it settle down you will notice that the background is black now ...
[Nexus 7 Android Development] brewer75:
[MENTION=2188693]AndDiSa[/MENTION], thank you for your quick reply to my post and I really appreciate your dedication to this rom! Based on what you see as the probable source of my boot and reboot problems, is there anything I can do to eliminate the problem and get back a smoothly operating Grouper?
[Nexus 7 Android Development] NIK3SH:
Last build I used was 20171111.

But as you suggested, will surely give try to 201780112 once with opengapps pico and will share feedback accordingly.

Additionally,

JFYI, I am having more then 10 gig free in my device so i believe space won't be culprit in my case...?
[Nexus 7 Android Development] sepp.:
Thank you AndDiSa and all others involved for this great effort

So I use a tilapia. I have been on some old 2017 version of this great ROM for some time. I tried to upgrade to the 0409 lately and have had the same experience as others. I remember to have seen in this someone talk about 0112 version. I installed this and besides overall being happy with it, it does indeed not have this long boot time.

I use it mostly for streaming with Google chromecast and Internet
[Nexus 7 Android Development] AndDiSa:
Thanks for this information. Even if there were many changes between January and February versions it reduces at least a bit the possible reasons for the long boot times. Would be great to see a logcat / dmesg from the startup to reduce further possible reasons.
[Nexus 7 Android Development] sepp.:
k,

I'll try during the upcoming long weekend (sorry linux yes - android very very little experience)

If I am not successful, I would appreciate help
[Nexus 7 Android Development] AndDiSa:
adb logcat | tee log.txt

from the Linux shell while booting the device and afterwards

adb shell

dmesg > /sdcard/dmesg.txt

exit

adb pull /sdcard/dmesg.txt
[Nexus 7 Android Development] NIK3SH:
So finally today I tested out 20180112 build and it did the trick...

Issue got resolved with it.

Google logo - 9 Seconds

Boot Animation - 54 Seconds

Only issue/deviation I noticed is,

Between Google logo to Boot Animation switching, TWRP recovery icon get shown up for 0.5 second... ?

But it's ok... ?

Thank You So Much [MENTION=2188693]AndDiSa[/MENTION] for sharing exact change-logs of builds and pointing towards right build testing...

Hats off to you... ?

If possible please do the needful to get this resolved in latest build as well so tilapia users won't be stuck at 20180112 build....

Cheers.... ?
[Nexus 7 Android Development] sepp.:
Good morning

logcat's and dmesg's attached

tilapia-20180113.dmesg

tilapia-20180113.locat

tilapia-20180409-1stboot.dmseg

tilapia-20180409-1stboot.locat

tilapia-20180409.dmesg

tilapia-20180409.locat

It seems to me that with the 0409 the device is stuck at the Google boot logo before any logcat messages are captured

Thank you for all your help
[Nexus 7 Android Development] AndDiSa:
[MENTION=5055387]sepp.[/MENTION] that there is no hint in logcat I was already expecting, but dmesg hopefully will give a hint. I'll have a look later on it.