yashsingh1/xdaforums huggingface dataset:
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Hello [MENTION=5741140]alkeshgamer[/MENTION],

I appreciate the detailed report!

I took a quick look at your logs and I´m a bit confused.

Regarding the first set of logs you provided.

The ramoops log file shows not my kernel but apparently the kernel from TWRP recovery

[ 0.000000] c0 0 Linux version 4.9.96 (dees_troy@XPS15) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #2 SMP PREEMPT Fri Oct 19 06:49:13 CDT 2018

The dmesg file doesn´t show a reboot or a kernel panic.

The second set of logs shows the same pattern.

Ramoops file shows the signature from twrp´s kernel

[ 0.000000] c0 0 Linux version 4.9.96 (dees_troy@XPS15) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #2 SMP PREEMPT Fri Oct 19 06:49:13 CDT 2018

and dmesg file doesn´t show a kernel panic or a reboot.

A few questions though:

When you returned to stock did you remove -w from flash-all or did you erase everything on the phone?

how did you obtain the dmesg and the ramoops?

If you get a random reboot, immediately after booting up go to sys/fs/pstore and save all content and provide it. (this will contain ramoops)

If you take a dmesg after booting up again when you have no issues, it won´t show the error as it only provides info about the current session that is running.

If you catch exactly the moment the phone freezes and are able to take a dmesg and a logcat via terminal on your pc it may be also helpful.

I never faced or heard about the issue you are experiencing.

I´m not sure about your options. From the logs I cannot tell what´s wrong for you. It´s strange you got a ramoops of twrp´s kernel though. There might be something messed up regarding the partitions or the internal layout.

If you have time this weekend you may try to use again the flash-all from the latest factory image, don´t remove -w. This will erase everything on your device including internal storage, where picutes videos are stored. Be sure to back them up! After new install is successful go through the install wizard without restoring any apps or data from a previous backup.

Flash magisk without any modules mods or similiar. Install my kernel and see if the issue persists. Be sure to report back if you still have issues.

If you used any mods like blackenend mod or scripts be sure to remove every trace of it for debugging purposes if you don´t erase your device completely.

I don´t have a regular pixel 3 but this definitely shouldn´t happen. If it occurs across different custom kernels you may have an underlying issue as I hinted above.

Sorry for not being more conclusive.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] alkeshgamer:
1. Previously I did flash the twrp installer zip to have the twrp all time rather than booting. But after the reboot issue I did go stock using flash-all without -w as I wanted the app data to be preserved.

2. Obtained dmesg using terminal and copied the ramoops file using file explorer, as mentioned in initial posts about bug-reporting guides.

3. The random reboot I got immediately after booting up previously was a one time thing right after I flashed the kernel with temporary TWRP. Tried rebooting few times after but the issue didn't reproduce.

4. Will try to record a logcat and dmesg when it happens, but maybe difficult to catch that moment.

5. I'll try out complete flash-all with -w later when I'm able to and report back.

Never tried the blackenedmod or such, so that wouldn't be a problem.

The reboot I talk about doesn't seem an actual reboot to me as it loads up device lockscreen after few seconds of blank screen rather than the warning, bootanimation and all.

But one thing I'm confused about is that flash-all without -w reflashes everything except data and storage, then how come there are traces of twrp kernel, as I was using it with `fastboot boot twrp.img` command after flash-all.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
I´m pretty sure somehow your internal partition layout got messed up. I´m not exactly sure why this happened but to me it looks like your A/B partition setup got messed and mixed up somehow. Means at some point your active slot switched and you use the inactive slot from a previous install.

You basically have 2 boot partitions, 2 system partitions except userdata which is shared between slot A and B. doing fastboot flash boot boot.img only flashes the boot.img to the active slot. Therefore my suspicion is your device switched the slots at some point.

I think flashing factory image without -w removed, which will wipe the complete device should solve all your issues. Make sure to completely wipe both boot slots and start fresh. Backup all important data on your device to a external storage beforehand!

For more information regarding A/B partitions have a read here:

https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/

Sorry to tell you this but it´s the most probable explanation for me.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] alkeshgamer:
Thanks for the help, looks like I'll have to do that to fix this. Meanwhile the issue occurred few mins ago, and was able to get a logcat and dmesg few seconds later of that, attaching it. Hope it may help in figuring out something.

Edit: The sys/fs/pstore is empty

Update: happened again, attaching logcat and dmesg for debugging. Both are quite big, but check after the time 17:55.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
I just came back home from work and saw 4.9.153 dropped.

I´m terribly sorry but you guys may have to flash a new build soon ;)

:highfive:
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] :
[MENTION=3428502]Freak07[/MENTION]

Thank you so much for this amazing kernel! The latest release is running wonderfully. I was curious about the stdout dialog when flashing the kernel. I noticed it listed the patched Magisk version being 17.4 even though I am using Magisk 18.1-b7f69238. Is this anything to be concerned about or is it simply older dialog info?

Here is the text I'm talking about:

"Magisk detected! Patching kernel so reflashing Magisk is not necessary...

MagiskBoot v17.4-018c0064(17303) (by topjohnwu) - Boot Image Modification Tool

Decompressing to [/tmp/anykernel/kernel/Image]

MagiskBoot v17.4-018c0064(17303) (by topjohnwu) - Boot Image Modification Tool

Patch @ 02A931CC [736B69705F696E697472616D667300]->[77616E745F696E697472616D667300]

MagiskBoot v17.4-018c0064(17303) (by topjohnwu) - Boot Image Modification Tool

Compressing to [/tmp/anykernel/kernel/Image.lz4]

Found user: android-build

Found host: wprg3.hot.corp.google.com"
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
MagiskBoot v17.4-018c0064(17303) (by topjohnwu) - Boot Image Modification Tool

the magiskboot version that is printed in stdout when flashing the kernel has nothing to do with the magisk.zip you flashed to root the phone.

The magiskboot binary is also able to remove verity from a kernel image. I use this ability of the magiskboot binary in my ak2-kernel zip to remove verity detection from the kernel, in case a custom rom is identified. Verity needs to be disabled on custom roms, otherwise they won´t boot.

There is a standalone magiskboot binary included in the /tools folder of my kernel.zip. This is still from magisk 17.4 but works fine for my purposes. I might want to update it at one point though ;)

If you want to take a look at the magisk documentation, here´s a good summary to see what the magiskboot binary can actually do:

https://github.com/topjohnwu/Magisk/blob/master/docs/tools.md
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] :
Thanks a bunch for the explanation! I was just curious, and a little bit OCD. I'm looking forward to the next 4.9.153 stable release.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Update to 2.0.3

Hey guys and girls,

As already announced here is 2.0.3 with 4.9.153 included, which dropped a few hours ago.

In case you missed the update to 2.0.2 here´s the link to the release post with the changelog for 2.0.2, quite a few nice additions included:

https://xdaforums.com/showpost.php?p=78761004&postcount=853

Changelog:

- Upstream linux-stable to 4.9.153

Important :)

All flashing errors are now fixed. If you experience the ramdisk error please take a look at the FAQ.

Have fun flashing and enjoy your device with latest linux-stable :)

Why is linux-stable important?

I wish you all a nice day/evening!

Download is below :)

Download:

https://www.androidfilehost.com/?fid=11410963190603908938

or following the link in the op to the correction version

Instructions can be found in the OP!

But look at this post too :)

Have fun, enjoy the kernel and your phone.

If you like my work please consider a donation.

Donations are not mandatory but very welcome.

If you like my work and want to buy me a coffee: http://paypal.me/freak07
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] odontastic:
I experienced similar random "reboots"

Are you using Adguard DNS-over-TLS (dns.adguard.com) as your Private DNS provider hostname?

This was causing my launcher to crash, a brief black screen, and dumped back to manual unlock as you describe.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] jcrompton:
The bootlegger ROM, probably innocuous enough, has some sort of foreign characters in parts of the ROM
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] alkeshgamer:
Yes the phone recovers instead of going for a full reboot.

Will try that out before I completely wipe everything and start fresh

Well, thank you so much for going through this and helping out, appreciate it!

Oh yes I'm using Adguard's DNS. So disabling the private DNS fixes your issue? This is new to hear, how did you figure out that private dns is causing the trouble? As from my scenario it's wifi or ambient music tracking causing problems as discussed previously.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] c_86:
Curious. What are some settings I can change to help with micro studders? Mainly happening in Facebook and chrome
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] odontastic:
Others on Reddit also had the same problem with Adguard Private DNS in the Pixel and Adguard forums.

https://www.reddit.com/r/Adguard/comments/abicn3/adguardprivate_dns_causing_restarts_on_pixel/

The problem goes away when I disable Private DNS or use anything other than Adguard's servers like Cloudflare or Quad9.

Google fixed the bug for a future update.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] alkeshgamer:
Yea I tried disabling the Private DNS and it didn't occur. And here I go blaming it on custom kernels. But still, this issue didn't happen to me when I was completely stock, that's weird. Let's hope we get the fix in next update.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Paz9:
[MENTION=3428502]Freak07[/MENTION] ive noticed since 2.x.x background_gc is off for F2FS /data when i look in proc/mounts

why is that? i thought discard and background_gc work hand in hand

ive also noticed slightly quicker idle and active drain after flashing 2.xx kernels 1.9 was perfect for me.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] nexusmaniac:
Oh damn! I had the same issue, rebooted loads on any custom kernel when I set it to dns.google ... I disabled it because it was the only thing I'd recently changed in the userspace ? nice to see a confirmation of the issue haha

Hope it gets fixed though ?
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
on 2.0.0 background_gc was still set to on. background_gc set to off can be observed since 2.0.2 not 2.x.x.

As mentioned in the release post GC is now done while the device is charging and idle. The release post of 2.0.2 has the commit in question linked.

See the commit

https://github.com/freak07/Kirisakura_bluecross/commit/adb98c5bf07d4217768b1e1578e4e96bca94929a

This change is still under evaluation and may be reverted at some point.

I´m getting roughly the same battery life since my private kernel has had all the changes that are present from 2.0.0 up to 2.0.3. Others reported also nothing negative or out of the ordinary. But that might be use case related...

Battery life staying roughly the same, while improving performance with a few of the latest commits since 2.0.0 is a good trade for me :) might not be true for other use cases though...
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] ridobe:
[MENTION=3428502]Freak07[/MENTION] I too am getting high idle drain. SOT continues to be stellar though. I also agree that 1.9 was the last low idle drain version.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
high idle drain when the phone is idling the whole night without touching it? if yes how much % do you lose over X hours per night?

or high idle drain while the phone is playing music with screen off? if yes how much?

Or just the collected stats from exkm over a very long period of time showing everything?
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] ridobe:
The first one. I've been losing 8-10% at night. Previously (1.9x), 2-3% easily.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
interesting. Did you check with better battery stats if you had an app keeping your phone awake the night?

Or if something else stood a bit out in better battery stats?

Like google play services, a freshly installed app and other recent changes?

I´m still losing 1-3% over 7 to 8 hours a night, just like since I had this phone. I doubt it´s the recent kernel changes but I´ll keep an eye on it. be sure to report back and maybe check better battery stats out over a few nights.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] DvLAx3l:
I've the same battery drain during the night, anyway I ask an RMA, 3h sot and 10h of battery cannot be normal!
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Paz9:
ops i see that now

also i think instagrams latest update caused the drain- restricted background activity and battery is fine now - ill keep an eye open for it.

also performance is noticably better with latest kernel - everything is snappy and opening almost instantly

well done :good:
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] c_86:
Anyone?
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] swieder711:
Not a kernel issue, but I can no longer get FK Manager to open a folder on my Pixel 3 XL. I get the message shown in the attached "For some reason your Android version doesn't know how to open this." FK Manager used to work for me.

Is there an XDA forum for FK Manager issues? I have emailed [MENTION=3292224]franciscofranco[/MENTION], but no response.

Sorry to clutter this thread with an unrelated issue, but this is bugging me.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] jcmm11:
Not specifically, no. You can try one of his active kernel threads. Better would probably be Twitter or Google+

https://plus.google.com/+FranciscoFranco1990/posts/GVHx97Bbcb3

https://mobile.twitter.com/franciscof_1990
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Do you have by any chance the built in file manager disabled on your device? Or maybe you’re running a custom rom that doesn’t have the stock file manager built in? Because that is the way fkm lets you choose which zip to flash since not only kernel zips are supported.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] swieder711:
I am on the stock ROM, but had Files 9 frozen. After unfreezing file manager I am back in business.

Thanks
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] rspkt:
I did notice like some other users that the 1.9.x kernel version seemed to have a lower idle and active drain than the 2.0.0 kernel. No changes to my installed apps or settings between these kernel updates besides the usual app updates via Play Store. I'm updating to 2.0.3 now so I'll let that run for a bit and report back on my results. Either way, this is still my kernel of choice by far.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Cacceli:
The battery drain has increased here too. Minium idle drain is 15%+. Before 2.X it was under 5%.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
It’s probably one of the app updates, google play services acting up or similar.

If the kernel itself would have a sleep problem everyone would be affected.

The kernel just grants wakelocks to apps that request the wakelocks in order to function properly. There are ( for example) various social media apps known to occasionally cause drain in the background. Be it because these apps are poorly coded, request a ****ton of resources or wakelocks or just need a lot of active time when they should idle.

I have two google accounts syncing on my phone all the time. Along with slack, hangouts etc constantly receiving notifications overnight. Ambient display is set to wake when lift the phone and when notifications arrive.

Here are two screenshots of my drain overnight from better battery stats. As you can see the awake time when the display is off is below 3%. This value is by the way, way more accurate than losing e.g. 3% of battery overnight. it’s a good indicator for a good deep sleep behaviour.

keep in mind this is overnight idle drain when not touching the phone for a few hours. It will look differently through the day when constantly using the phone, listening to music, waking it up to check messages etc.

https://photos.app.goo.gl/YUkVjoC2qzMBGofdA

To detect which app(s) is (are) causing the drain it’s important to look at partial wakelocks section and alarm section in better battery stars.

Sometimes it might be helpful to look in the kernel wakelock section too. But these are usually just the wakelocks the system needs in order to function properly.

Power manager service is most of the time on top as it’s the combination of all partial wakelocks.

Sometimes in the past a wlan wakelock stood out at the top. That may be related to a firmware incompatibility between router and the phone’s wlan driver (for example). Only in this situation a kernel wakelock should be blocked. Otherwise there are silent issue that will creep in. Like delayed notifications or the wakelock just being migrated to another wakelock.

99% of all cases it’s an app and you’ll find the problem in either partial wakelocks or alarms. :svetius:

Good hunting guys!

Oh and you can set a custom reference point in better battery stats if you don’t happen to unplug the phone just before going to sleep! That may come in handy for some :)
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] pkmoazzam:
Wow how did you do that? You had Bluetooth disabled?
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] MeetFace:
So my battery life hasn't been that it was pretty 2.x either. Today was pretty typical usage, a little light on the SOT though. I've been trending a full day with about 6 hrs SOT pre 2.x

Seems like a lot of alarms from system. Partial wakelocks look pretty benign to me, but I've never been good at reading these. Also note, I installed BBS part way through the day, so this isn't the full days' info, but my drain was almost a straight line today.

See anything wrong?

Thanks guys
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
I did nothing. I’m just running my kernel, use no scripts, apps or mods that mess with sleep/doze.

Bluetooth is disabled overnight.

yes I’m pretty sure your google play services are hogging resources. In the battery usage tab from settings play services are held responsible for a drain of 18% of your last charge. That’s way too much. Play services seem to be active for the entire time of your last run too (nearly 18 hours). Pretty sure that’s your problem.

Also you forgot to attach the bbs main screen screenshot with deep sleep/active while idle/screen on time etc.

Below are the stats from my run since yesterday now nearly 20 hours.

The screenshots show only the half time show as yesterday I charged the phone to 92% only:

https://photos.app.goo.gl/SUUFT5Qog9BKcGgU6

Here are the stats from just this night, the phone sleeping for 7 1/2 hours straight:

https://photos.app.goo.gl/dQidxdK81xVq4asX7

As you can see in bbs main screen during the day, usage of awake while screen off has risen to a bit above 3% in total now.

During the night this value is below 1%! This is crucial for good deep sleep over night!

My usage consists mainly of hangouts, slack, xda, chrome.

I did a few calls for 30 minutes. I listened to music via spotify a bit and did watch a few Youtube videos.

I even lost signal yesterday evening which is a worst case scenario for battery as the radio searching for signal drains a lot of battery.

Play services show 3% of battery usage and a usage time of not even 30 minutes.

I’m 99% sure the drain you’re facing is not kernel related. Some process/service of your google play services is requesting resources from the kernel and the kernel being the kernel grants it. The kernel cannot know that a process goes havoc and is exceedingly requesting unnecessary tasks to be completed.

Solutions could be to update play services app, clear data and cache from play services app, start completely clean without restoring anything from the cloud or previous backups.

If you ever interfered with doze or sleep related things this may also be the cause.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Later today an update which includes a Linux stable bump up to 4.9.154 will drop.

4.9.154 was just released a few hours ago :svetius:
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] MeetFace:
Thanks Freak, I'll see what I can figure out. Thanks
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Update to 2.0.4

Hey guys and girls,

Today 4.9.154 dropped. As already announced here is the new update, which includes it :)

Kernel is now built with Clang 7.0.2. Some logging is disabled.

Changelog:

- Upstream linux-stable to 4.9.154

- disable some debugging for low memory killer to make the kernel a little bit lighter

- Clang 7.0.2 is used to built the kernel as of now. Security features like LTO and CFI are still kept intact! :)

Important :)

All flashing errors are now fixed. If you experience the ramdisk error please take a look at the FAQ.

Have fun flashing and enjoy your device with latest linux-stable :)

Why is linux-stable important?

I wish you all a nice day/evening!

Download is below :)

Download:

https://www.androidfilehost.com/?fid=11410963190603912606

or following the link in the op to the correction version

Instructions can be found in the OP!

But look at this post too :)

Have fun, enjoy the kernel and your phone.

If you like my work please consider a donation.

Donations are not mandatory but very welcome.

If you like my work and want to buy me a coffee: http://paypal.me/freak07
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] melgar:
Thx a lot for the frequent updates and all your great work.

One question regarding the latest update. You mentioned that you disabled some debugging, could it be that this is the reason why "LiveBoot"(boot-animation that shows dmesg and logcat during boot) is not working anymore?

not a big deal, just curious...

regards,
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] jcmm11:
No. Something on your end. Try reinstalling or reinitializing LiveBoot. It's working fine for me.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Yeah as [MENTION=4487388]jcmm11[/MENTION] said it’s probably on your end. I’m also using live boot and it works just fine.

I know live boot is quote finicky with outputting its contents, magisk installation etc.
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] MArtyChubbs:
Anyone notice improvement in battery life with latest release?

I deleted some apps that were to blame and cleaned up system, suddenly my drain stopped. All prior to updating. So, I don't know if the kernel had anything to do with it but maybe others did some good testing?
[Google Pixel 3 XL ROMs, Kernels, Recoveries, & Oth] masri1987:
which apps did you delete? i might have to do something similar