yashsingh1/xdaforums huggingface dataset:
[Xperia Z3 Compact Original Android Development] Infy_AsiX:
So BlueBorne is kernel side? How about KRACK?

Seems I didn't test undervolting enough before to notice the heat build up still occurs. When using Intellithermal settings as I used to with 66°C frequency throttle and max frequency of 1574. The throttling will eventually drop to 729 or even 422MHz after several minutes just playing a basic game like Clash Royale while streaming Google Play Music and slow charging. Once throttling drops to 729MHz lag is a problem. Custom stock used to only throttle to 1036MHz.

I found raising the throttle temp to 70 still eventually drops to 729MHz while battery temperature goes up by at least a couple more degrees too. That's further on top of the battery already being hot going up to around 44° with the 66°C frequency throttle. Note this is all at a relatively cool room temperature without direct sunlight and a low brightness.

A workaround to Intellithermal throttling lag I found is to use the paid app FauxClock for some extra thermal settings. It allows choosing individually which cores are freq' throttled or core throttled. I've settled on 1190 or 1267 max freq' with two cores freq' throttling at 50° which basically sets them at minimum 267MHz during usage. This is a compromise on max bandwidth that worked with previous settings on stock but uses less power and has similar performance.

By the way [MENTION=4275152]someone755[/MENTION] I took some time reading through the thread. It's good to have a developer like yourself providing steady quality support after all this time. I came across a comment about when Androplus Kernel was discontinued so I went back to it's thread and that brought back memories. Wasn't really that long ago but the community's changed, less people now. Of note, a particular someone was starting out development, look how far they've gotten :o. I suppose new devices are out and people move on, but not all of us. Newer Xperia forum boards aren't as active as they once were either, seems there's less interest in rooted devices nowadays. I guess there's less general interest in phone hardware releases too going by trend reports. Anyway if this device keeps running with some maintenance there's no foreseeable desire to replace it!
[Xperia Z3 Compact Original Android Development] someone755:
hahahahahahhahaha

stop it man you're killing me hahahaha

As far as I know it's at least partially a kernel bug. Look I'm no security expert, I one time chmodded the entirety of my phone to 777 just to get one script running. My guess (and I base this exclusively off of headlines I've read about the bug) is that it requires a driver patch, which, as far as I know, is part of the kernel code now. (On stock it used to be a module if memory serves -- It's been a long time since I last posted on here, let alone did anything Android related.)

I've been told this by the Carbon maintainer once already, I told him I'd get on it. That was a few weeks ago. Eh.

It could just be a different configuration of the intelli_thermal driver, or you have something running on stock that doesn't come with something as "pure" (for lack of a better word) as LOS/CR/AOSP. I'll peek into EK's intelli_thermal copy, but I can't guarantee your issue isn't because of one of Sony's background services. (By the way there's a kernel12s thread somewhere on here with builds made for stock Marshmallow, the thermal driver used in k12 and k12s is identical.)

Truth is I'm a poor sonofabitch and also the little Z3C represents to me the last beam of light not only for Sony, but Android as an ecosystem. The idea of Android as an open system is dead, and has been for around three years now; We're just the few old grumpy people who won't let go of the old days when the M7, N5, and the GPe incentive were a thing, and the Z3C is the last reminder of those days. Other users saw some shiny new feature somewhere else, or their Z3C broke, so naturally they moved on.

The reason newer Xperias don't get much development going goes back to the phone I bought back in October 2014. Sony's Open Device Project took off. I won't go into details about why I'm against it, or why everyone should be against it, but it's plain simple truth that SODP is what most developers are occupied with, all while SODP hasn't produced a single ROM ready for daily use.

Yeah AndroPlus sure got far collecting all those donations and risking bricking thousands of devices, you do have a point.

But on a more serious (and lighthearted) note:

hahahahahahhahaha good meme hahaha
[Xperia Z3 Compact Original Android Development] Infy_AsiX:
I'll try to find it and test for a difference.

edit: found it https://xdaforums.com/z3-compact/development/kernel-sernel12s-25-7-2016-t3425380

Forgotten and didn't realise there was another all around kernel for stock MM. Strange thing is flashing any kernel on my old stock rom now causes the phone loop the Sony boot logo, even if only reflashing EK. Interestingly restoring the boot paritition via TWRP does work though. What the? Suppose I can just test on a clean ROM

Not sure you got my subtle suggestion that you were starting out.
[Xperia Z3 Compact Original Android Development] someone755:
The Z3C, a fickle mistress haha

A bit on topic: I'll PM you a build that I hope has SC fixed, no thanks to EK. Also blueborne and all that.

I went looking through EK's source code (namely to compare the sound driver) and the commit log is ... bad, to say the least. Now I realize I'm no saint when it comes to this, but I'm surprised EK even boots, much less delivers a working implementation of faux's sound control.

Also looking at EK's configs he doesn't even enable intelli_thermal (or intelli_thermal v2, because for some reason both are present in his tree). No clue what's up with that.

Ah no, I got it, but took the liberty of derailing the conversation ;)

Actually my beginnings go as far back as September 2011, when I first joined XDA. I'm actually surprised by how many people still remember the Xperia S days.

Oh and also ([MENTION=4916555]okij[/MENTION], finally a chance to tag you back) I looked into the Blueborne and KRACK issues, and you can be calm knowing that the former is a kernel patch away from dying while the latter needs to be patched within the ROM itself (and already has been on both LOS and CR; https://review.lineageos.org/#/q/topic:krack-n; https://review.carbonrom.org/?polygerrit=1#/q/topic:krack-n).
[Xperia Z3 Compact Original Android Development] Infy_AsiX:
Ha yeah. After numerous flashes and restores I think any recent system SuperSU installed with a kernel flashed on .291 causes the loop. I tested K12S on a clean ROM and the sound issue isn't there while it's the same newer v3.8, indicating more so AOSP/N related. Tried the same clash royale, play music, slow charging but it's too low a load on a clean ROM. Hotplugging, load and smoothness is so much better I wonder if my LOS ROM has some background issue. I tried to get K12S on my dirty ROM but it's difficult switching the systemless superuser, xposed, sdext mounts.

Thanks, I'll give r_12 a go though and see.
[Xperia Z3 Compact Original Android Development] Infy_AsiX:
Sound Control still has the issue :(. Any potential change to test for Intellithermal? If not I can try harder getting my dirty .291 onto systemless SuperSU to test K12S for a difference with stock on the same K12 driver.

Here's a screenshot showing the aggressive throttling shortly after booting.

Orange is CPU, SOC temp. Red is battery. Yellow is charge current. Purple is free RAM. Teal is ZRAM. Green is battery voltage. Below that is the most resource-intensive process.

This is even with the battery separated from the phone to force it cooler!

Screenshot after a couple of rounds in Clash royale + play music + slow charging with battery back in case.

As you might suspect, I take this testing business seriously :cool:.

P.S. Charge rate is actually slow though AC plugged by automating Current edits through Tasker. Current display confirms.
[Xperia Z3 Compact Original Android Development] someone755:
Okay so I'm launching k12 r_12 (hehe); http://bit.ly/changelog12-1

Then it could well be an issue with the audio routing being weird rather than a problem with the sound control driver: During the summer some bellend decided to re-work the shinano audio routing on cm-14 for no reason and of course that ended up as a spectacular failure. In that case there's nothing I can do kernel-side, or at least, not with my knowledge. That said, then, I feel like launching r_12 is still justified for the other fixes included.

What I do, and could be why I can't reproduce the throttling issue, is I drag the CPU throttle temp lower than the frequency temp (50°C actually). Android doesn't take as much of a hit from lack of cores (look at old phones with one or two cores -- with low to no loads they are still as smooth as the newest gadgets) as it does from frequency drops (again look at old phones -- when you heat them up they throttle their single core and crawl to a stop; the only reason modern phones don't completely hang up like the old ones did is because we have more cores). Taking that into account, and of course the fact that four cores will put out ~4× the heat (while thermal output and frequency aren't in a relation as "linear" as that), it makes sense to prioritize running at higher frequencies rather than at higher core counts.

It's not a fix, but it's how I've been running my phones since way back in 2013, and never had problems like this. I mean I use my mom's old Galaxy Fame as a backup, and I've been an Android junkie since 2010, so I know a thing or two about single-core arm machines :P

Like I said regarding EK, I don't know what that thing is about: His kernel config calls for the stock thermal engine but he has both intelli_thermal v1 and v2 implemented. He has faux's Sound Control in there but he insists on calling it PDesire Audio.
[Xperia Z3 Compact Original Android Development] SkyHigh76:
First of all, thanks for your kernel,

Intellithermal rocks the temperature. My phone is far cooler with your kernel than with the stock one.

Off topic: Will you implement your additions to an oreo kernel as well? I think the first rom (Omni) is now available. Will there be an oreo version as well?
[Xperia Z3 Compact Original Android Development] someone755:
When I see it's good for daily use, sure, why not. Right now though, I don't have plans for that.

I make these projects mainly for myself: There is no point in me releasing a kernel that I ultimately will not test (or use), like many people on here have gotten used to doing, despite of the risks involved.
[Xperia Z3 Compact Original Android Development] :
There may be better stuff out there, but you're the one coming here and sharing your work is what they meant IMHO. So thank you for sticking with us :p

I've got a somewhat annoying question, but I'm probably too uninformed to answer it myself.

I'm currently running tomascus's LOS14.1 06/10 with the kernel it came with, and apart from System Idle constantly consuming almost 40% of the total battery capacity, I have no complaints towards the performance. I always use it GAPPS-less and am quite paranoid when it comes to background activity - I block everything apart from apps I directly interact with from running in the background (+Greenify) or using any Mobile/WiFi data - so a battery life of 4-5 days with light-average usage on my Z3C is what I consider to be the norm.

The question, therefore, is whether I would benefit from using your kernel, given my usage scenario?

Thanks in advance for taking the time, know it's much appreciated, cheesy as that may sound :)
[Xperia Z3 Compact Original Android Development] someone755:
Ah I know, just poking fun at the "developer" bit. I ain't one, that's my point :P

Idk mate honestly I'm not even sure if this kernel will boot with LOS anymore. You're free to try of course, just make sure you have a backup handy; I haven't been tracking tomascus' LOS repo for a few months now, sadly the whole LOS situation has gotten a bit convoluted. Used to be shinano repos were hosted directly on the LOS Github bit now it's under tomascus' private account -- All in all very weird, so I'm avoiding it.

As for the battery life with a custom kernel, you'll have to try that as well. If you're willing to trade peak performance for some longer battery life, then sure -- Pick the right governor (powersave prefers cores to be at the lowest frequencies, no matter the load, so there will be stutter probably, while conservative will make things more smooth), shut off a core or two, set up the screen-off and touch boost frequencies and input boost timings. Also the thermal engine is a big plus for me personally. Undervolting is of questionable help (but if done right can help with thermals -- if you undervolt too far the device will either shut down or keep working, but at increased stress levels, i.e. more heat and shortened lifetime). There's also GPU underclocking to 27 MHz and adreno_idler, a driver that keeps your GPU's frequencies low (with default settings it kinda works like the conservative governor works for the CPU). In any case the change shouldn't be a dramatic increase, I reckon around 5% difference at most. But then with your usage pattern you'd really be among the best test cases for the question.

It might be effective, it might be placebo, it might make things worse. Only way to find out is to try and set it up to your liking.
[Xperia Z3 Compact Original Android Development] Infy_AsiX:
Well I'll probably still be around to test for you, got my GS8+ battery mod working :p https://xdaforums.com/z3-compact/general/original-low-battery-capacity-density-t3699900/post74398710. The topic may hold some interest to the inner electrical engineer.
[Xperia Z3 Compact Original Android Development] wserfer:
After flashing this kernel i get soft brick with only fastboot working.

>lineage-14.1-20171006-UNOFFICIAL-z3c
[Xperia Z3 Compact Original Android Development] someone755:
I wouldn't think that this kernel would work with LineageOS -- it's not been tested with LineageOS. (And no, this isn't the first time I'm writing this, least of all in this thread.)

Mod Edit by [MENTION=3843529]gregbradley[/MENTION]

Tag removed.

Please check your PMs
[Xperia Z3 Compact Original Android Development] :
Do your job and make it so

/s
[Xperia Z3 Compact Original Android Development] wserfer:
Its a joke? >[KERNEL][LineageOS 14.1/CM12.x][r_12] Kernel12
[Xperia Z3 Compact Original Android Development] someone755:
I'm not editing the thread title.
[Xperia Z3 Compact Original Android Development] Kocane:
I used this when I briefly tested the lasted LOS, there wasn't any issues as far as I could see? Currently using it with CarbonROM. Only issues I've experienced is twice that my phone froze completely when I initiated a call, although I wouldn't nessesarily blame it on the kernel. If it happens again, I guess I'll fetch the last_kmsg and we'll see. Other than that, I'm just rolling with the default settings the kernel comes with, and it's buttery smooth. I'm seeing more "Phone idle" battery use than on the MM rom but I think that's just how Nougat likes to report the battery, because I don't really see that much of an actual difference in battery life, atleast not in actual "awake" time
[Xperia Z3 Compact Original Android Development] okij:
Why not?

It might avoid some unnecessary discussions because people first look at the thread title before they start reading the posts (if they read them at all, that is. ;))

But of course it's your decision.

Have some happy Christmas holidays! :)
[Xperia Z3 Compact Original Android Development] okij:
[MENTION=4275152]someone755[/MENTION]: Since CarbonROM 5.1 for the Z3c was updated to 2018-01-05 security patch level, which also includes some kernel patches (one of them being CVE-2017-13218 as a mitigation for the Spectre vulnerability), I'd like to ask if you could update Kernel12 too. :)

I'm not sure if the patch for CVE-2017-13218 can be applied to your kernel, since [MENTION=3816568]Myself5[/MENTION] wrote here three weeks ago: "There are no patches for Spectre for 32Bit devices, nor for 3.4 Kernels, therefore nothing we could merge yet." This might have changed, because Google released the January Patches for 7.x in the meanwhile and I'm wondering if those kernel patches now can be merged.
[Xperia Z3 Compact Original Android Development] Myself5:
Google didn't release any January patches for Nougat, the one used on Carbon were backported from Oreo. Also there are still no 32Bit patches, and there probably won't be any ever. On top of that, it's unknown if the S801 is affected by the patches. Qualcomm isn't really informative about it. We know that ARM-Cortex A15 is affected by all Spectre and Meltdown exploits, which the Krait 400 Design used by the S801 is based on, but there is no clear information about it other than "it might be possible, Krait 400 can do branch prediction", which is what Meltdown abuses.
[Xperia Z3 Compact Original Android Development] okij:
Ah, OK, thanks a lot for this information! I really thought that Google released something and didn't think about backported patches. :)

Do you know if there have been any patches merged to the CarbonROM Z3c kernel since Oct 30th, 2017, so that it would be worth that [MENTION=4275152]someone755[/MENTION] merged them to Kernel12 too?
[Xperia Z3 Compact Original Android Development] someone755:
Actually, while Krait shares similarities with Cortex-A15, it is supposedly developed in-house. Anandtech wrote back when Krait was first released (with the 8960 chip):

Whether this is reason enough for concern, I cannot say (although personally I couldn't care less -- we're already bypassing safety checks left and right and missing out on other security patches that this one patch makes little difference).

But even if Qualcomm ever admits any (possible) faults in older chips (a big *if* in and of itself), I doubt they would ever release a patch. I think a lot of people on these forums are forgetting that 8974 was outdated already when the Z3 line was released, having first been used in the LG G2. The Nexus 6 (S805, 32-bit) quickly followed the Z3's release.

On top of that, since Google dropped 8974 like it's a new form of bubonic plague when they released Nougat, no sane developer would go back and work on this, much like nobody is crazy enough to port CM11 to these devices.

In the Nougat kernel? No. In the Oreo branch? Possibly, *but*: There is at least one major device-breaking flaw in the Nougat kernel anyways, so for the time being I've switched back to Marshmallow. I'll give Oreo a spin after exams end.

*edit: s805 is 32-bit
[Xperia Z3 Compact Original Android Development] okij:
Thanks for these infos! :)

Which device-breaking flaw??
[Xperia Z3 Compact Original Android Development] someone755:
I can't go into specifics, because I didn't research that far, and the last time I bothered to research anything about it was a few months ago, but as far as I understand, the wlan driver is somehow borked. It tries to write something but it fails, and from then on it triggers a wakelock that the system shows as "mmc0:0001:2". This can go on for days on end, effectively halving battery life. Sadly I'm currently in a position where I need my phone to last a full day no matter what, and I don't want to keep guessing if the wakelock is running or not.
[Xperia Z3 Compact Original Android Development] okij:
Hm, I just used Wakelock Detector to look at the kernel wakelocks and indeed mmc0:0001:2 is triggered quite often.

However, I don't see an impact (at least not a big one) on battery life. At night, when my phone is connected to Wifi network, the battery drain is at about 0,25 %/h, which seems fine to me. On stock 6.0.1 ROM it maybe was a bit lower, at about 0,15 %/h, but I don't know if this is Wifi driver related!?

But the current Wifi driver also isn't perfect in other aspects. On stock ROM I got a connection speed of 450 Mbit/s on a 5 GHz Wifi network, now it's just 200 Mbit/s (not that this would matter in real life. ;)) But the signal strength (at least according to the symbol in the notification bar) also is weaker than on stock ROMs. This is the reason why I assumed to have a litte more battery drain on Nougat custom ROMs.

Maybe [MENTION=6979267]nailyk[/MENTION] could give us some informations about the current Wifi driver and if some development is going on!? :) AFAIR, the devs also tried to use the Sony stock driver during the Nougat bringup, but the problem with this was a battery drain caused by some not correctly working system timer, so they decided to use the open source driver, even though it has some drawbacks.

Yeah, I understand that. How much battery drain did you have when using a Lineage or Carbon Nougat ROM?
[Xperia Z3 Compact Original Android Development] Kocane:
This kernel + CarbonRom has been pretty good to me, also batterywise. Havent experienced the wifi kernel wakelock but until my recent unesseary reboot I had an uptime of 711 hours. Pretty stable.
[Xperia Z3 Compact Original Android Development] someone755:
I could get anywhere from zero to practically infinite battery life. It was a huge gamble but the situation allowed for it (no emergencies, entire days at uni, which is full of computers and electrical outlets, could drive around with the car). I could often lose 50% overnight.

44 more hours and you would have brought it full circle. 200 more hours and we could've made some nice "kernels don't melt steel beams" memes. As it stands we can only make Trump and 711 jokes ):
[Xperia Z3 Compact Original Android Development] Kocane:
Haha ;) Sadly, today I suddenly experienced a sleep of death, or whatever it's called, where the screen wouldn't come on. I force rebooted and when it was back up it seemed like xposed had stopped working. Another reboot made it come back but then I noticed that some apps had dropped their settings.

It's probably not Kernel12 (who knows, didn't grab any logs, stupidly) but it's weird after such a long peroid with stability, the ROM started ****ing with me.

I can understand using marshmallow for the stability, but there's some nougat stuff I already really like, so I'm having a hard time switching back lol.

How's you guyses bluetooth working, anyway? I recently got a BT headphone pair and I've noticed that I'm getting an insane amount of dropouts on little distance with nothing blocking the signal. Even my hand can **** it up sometimes. Not sure where the blame lies there, either.
[Xperia Z3 Compact Original Android Development] okij:
I have no problems whatsoever with my stereo headphone (Mpow Cheetah Gen 2) and my two monaural headsets (Plantronics Explorer 500 and Jabra Easycall) on CarbonROM 5.1 and Kernel12.

I hope that you get your phone running stable again after the forced reboot. :fingers-crossed: The same ROM and kernel is running rock stable here (normally I only reboot for flashing a new ROM version or when updating Magisk or Xposed), so maybe an Xposed module caused those problems!?
[Xperia Z3 Compact Original Android Development] Kocane:
I wish I could do something about it, I don't even know how to troubleshoot it. It's probably the main thing making me wanna buy a new phone :\ ..

Yeah the instability could be caused by anything. Hard to say so I'm not gonna blame anything in particular :P