yashsingh1/xdaforums huggingface dataset:
[Xperia Z3 Compact Original Android Development] sm4tik:
Thanks for the update!

A quick test revealed voltage control missing for 268MHz. Default hotplug & thermal changes look good. The screen was getting dimmed after a couple of reboots before, I think default thermal settings were to blame. Until you get oc'ing to work, having 2419MHz enabled might be a bit unnecessary. Basically I thought of it more of a convenient replacement for 2457MHz between 2265MHz and 2573MHz than an extra step. If actually undervolting, 2.2GHz will be a better performance/voltage choice anyway.
[Xperia Z3 Compact Original Android Development] someone755:
I'll let the step stay, it's not doing any harm. What I'm more worried about is this part:

What exactly do you mean by that?
[Xperia Z3 Compact Original Android Development] sm4tik:
I think the screen dimming is a part of the thermal thingy and when the phone overheats, it's getting desperate and tries every possible solution to make it feel more comfortable. With the defaults in previous release, only one core's frequency got reduced making the phone hot. After it had settled, screen brightness was restored back to normal state.

Edit: I realized not being clear enough with the reboots. Screen was dimming after a couple of reboots close enough to each other, or when building dalvik at boot..
[Xperia Z3 Compact Original Android Development] sm4tik:
So, I was doing some electronic exercises with my phone and found out there's still some problems with thermal control. Basically whenever the cpu gets stressed with max freq set to something lower than the default, it will eventually revert back to it. This happens after throttling occurs, when the temp gets low enough and the first core gets ramped up. In the meanwhile, no matter how low the max freq is set / will go down to, only the first core is faithful to it while the others spend their time freely @ 2457MHz.

What's good though, is that I've still not managed to get the temperature too high with core control also enabled, but sadly underclocking is a bit flaky atm as the freq might jump up at some point.

To test this behavior, set max freq < default and launch antutu stability test.

I'm thinking why? Doesn't intelli_thermal "know" the currently set max freq, where does it look for the value, is i_t even responsible for this behavior, is there a way to set the freq sometime at boot to actually cap it or does the timing matter; is kernel adiutor as good of an option as a script for the job?

Edit: freq ctrl temp 75°C, core ctrl temp 80°C
[Xperia Z3 Compact Original Android Development] someone755:
ew antutu *shrugs*

I did run benchmarks and noticed that strange behavior, but only with the default settings -- changing them back to my usual setup didn't produce that same issue. Guess I'll leave the defaults the same and let the user configure thermal management and hotplugging. Intelli_thermal does know what the max freq value is, but apparently not with the default values (what even).

Kernel Adiutor is in itself essentially a script -- it does the same thing as an init script in the ramdisk does.

But to answer an earlier question of yours, yes, I will add F2FS (I have already, actually, to TWRP as well). I'll make a release once I fix that overclocking of yours :P
[Xperia Z3 Compact Original Android Development] sm4tik:
Yes, I know..

Mind sharing your setup? I'm not able to make the max freq stick with mine when running that antutu stability thingy. Even tried with a clean install to make sure..

F2fs - thank you

overclocking - .. more time tweaking with the phone for my wife to put up with.. :D

Edit: to clarify, cores 3 & 4 always ramp up to 2457mhz even when max freq is set lower.
[Xperia Z3 Compact Original Android Development] someone755:
I'd much rather you flash r_01, do your tweaking, and then run the stress test -- I have a feeling it's less a problem with the kernel and more a problem with the ramdisk defaults I've set (r_01 doesn't have that).

I'll send you my settings when I get off this damn laptop and to a real computer -- 1.5GB of DDR2 RAM and other 2005 tech doesn't make things easy lol.
[Xperia Z3 Compact Original Android Development] sm4tik:
Talking about damn-painful-not-making-your-life-easy type of computers.. I used to build CM7 for my trusty old blade with a 1GHz (single core) athlon and 1GB of some memory that had only heard of DDR when Germany was still divided. I wonder why the whole thing eventually gave up on me?

Anyways, r_01 is working fine. It did cross my mind at some point to test it as I didn't remember having any issues using it. Thanks.
[Xperia Z3 Compact Original Android Development] someone755:
Meaning I'll be ditching ramdisk edits. Huh.

That only makes my next little project easier: let the user decide if he wants a permissive or enforcing image on install and make it on the fly out of the already-available ramdisk. :D
[Xperia Z3 Compact Original Android Development] sm4tik:
I'm sorry mate, I spoke too soon. The same behavior is happening with r_01 also.. :( Maybe I wasn't stressing the cpu long enough for it to happen earlier (I forgot I'd changed throttling temperatures), but anything below 2457MHz will eventually revert back to it. From what I remember, this was the case with M5 also and there's no such frequency available?! ( (it's been a while since I used it)

Edit: I tested M5 kernel and the behavior is the same even without 2457mhz enabled in the frequency table.

[MENTION=3816568]Myself5[/MENTION]
[Xperia Z3 Compact Original Android Development] Myself5:
What specifically doesn't work?

Aha!

The Thermanager ramps down the brightness to keep the phone cooler. During the Bootup (bootup time is getting extended by the Optimization Part) the phone is running on full performance, hence it's temperature raises, which then results in a increasing temp and the lowering of the brightness.

Stupid question, but are you sure you enabled Intellithermal?

Intel Core i7 5820K (I really should OC it one day), 16GB of 2133MHz Corsair Gaming RAM and a Intel 750 Series PCI-E SSD here. Compiles CM in 16min and a boot.img in 2. Come at me :P

I was faster ;)

https://github.com/Myself5/M5KernelTools

I still don't really understand the issue. I have a rough guess it is caused by the Sony Thermanager and Intellithermal interfering with each other, but I'd need to do some research on that. [MENTION=4275152]someone755[/MENTION], we could try and disable the CM thermanager somehow, maybe that could help.
[Xperia Z3 Compact Original Android Development] someone755:
Took you long enough to notice :P

I'm a budget builder :c

i5-4440@3.1 GHz, 8GB of Crucial Ballistix Sport 1600 MHz RAM (at a pretty nice CL=9), a 60 GB Kingston V300 for Ubuntu (which holds ccache), a 120 GB Samsung 840 EVO for Windows (which is also the out folder for compiling), and a 500 GB drive that holds the sources. And 4 case fans in total -- no intelli thermal on PCs :^)

Also a GTX660 because why the heck not. Those Steam sales can get pretty crazy. And with Fallout 4 coming out very soon...

I've had this on my mind for some time now. I started working on it a little while ago, but never really finished. I saw your AnyKernel implementation but it's still not what I want, completely.

I might take a chunk of code from you though. :P

(Or better yet, if (or when) I give up (which I'm about 3 lines of code away from, I hate edify), I might just give you a pull request with whatever I'm doing.)

I'm ripping that thing out if I have to. Ain't noone messing with my thermal throttling.

Why did CM even implement this!? Huge chunk of code from an OEM is fine but two commits into the kernel aren't!?

First I'll update to W10 (HYPEHYPEHYPE, I hear it actually fixes some older bugs!), finish my little install script, then try and debug intelli thermal.
[Xperia Z3 Compact Original Android Development] Myself5:
GTX760 here :P (EVGA GTX760 SC)

Feel free to do :D

the implementation is the one from Sony AOSP, not Sony as the stock Rom creator.

Thats totally on my list too :D
[Xperia Z3 Compact Original Android Development] sm4tik:
To be honest, neither do I :p

To reproduce, set max freq to say 2GHz ish, start antutu's stability test (from antutu bechmark) and switch quickly to whatever CPU monitor you're using. At first, cores 3 & 4 are at 2457MHz (this freq is with kernel12, not sure about M5), then as throttling kicks in all cores look to behave ok, but when phone cools enough to ease on throttling, all cores travel up to 2457MHz. Let the test run for x amount of time, let the phone settle and as it cools down, max freq is then set to 2457MHz (even in the case of M5).

Running the app called StabilityTest doesn't produce this behavior. I don't know why, but the difference between it and antutu's stab test is that it's utilizing all cores the same way at the same time.

Hope I was clear enough this time, and yes, I have intelli thermal enabled :)
[Xperia Z3 Compact Original Android Development] someone755:
And even after seeing my professional attitude and clean GitHub, [MENTION=3816568]Myself5[/MENTION] doubts in the discussions I'm a part of!? Outrageous!

(also i finished that script that lets the user choose what image to install on boot. also PA, the ROM I'm building TWRP with, uses an old version of f2fs tools so i have to update that now D: )

EDIT: The joke is that I'm very unprofessional and if anyone's GitHub is a mess, it's mine.
[Xperia Z3 Compact Original Android Development] someone755:
It only took me 3 hours to fix the small bugs but I finally did it! And to no one's surprise, they were all syntax errors within my shell script, not in the edify script. I still hate edify though.

[MENTION=3816568]Myself5[/MENTION] my zip is smaller than yours and keeping in line with my general childishness, I must now rub that in. A deciding factor in why I didn't adopt AnyKernel is that my script uses keycheck to get user input and make a single zip.

[MENTION=1007992]everyone[/MENTION]: there's only one zip now. Press Vol+ to install a permissive image and press Vol- (or don't press anything for 30 seconds) to install an enforcing image. Also F2FS and those CPU things [MENTION=3904203]sm4tik[/MENTION] wanted are here. Also if anyone knows of a recovery that lets you format to F2FS, please let me know.

Intelli-thermal is yet to be debugged. (sadface)

EDIT: Why the heck is there an account named everyone ffs
[Xperia Z3 Compact Original Android Development] Myself5:
Sounds very nice :) I guess your zip is smaller than mine due to the dt.img included in mine. I don't think there are many changes to the dt.img but when there is once you'll have a problem [emoji14]

Recovery with F2FS for example is TWRP from MultiROM. I added support for it there.

P.S. I really like that Keycheck idea, I hope you are fine with me taking a look at that [emoji14]

P.S.2 it took me a over half a year (with breaks tho) to fix that bloody intellithermal build error when building the kernel inline, so don't worry about 3 hours ;)
[Xperia Z3 Compact Original Android Development] someone755:
Oh don't worry there's a dt image somewhere in there too :P Doesn't really matter, nobody will notice the difference lol.

It's not my code, so go ahead and use it. I just write scripts around pieces I know work to make my life simpler :P
[Xperia Z3 Compact Original Android Development] someone755:
Uploaded r_04, and the changelog hasn't been this long in a while lol.

Everyone go thank [MENTION=3816568]Myself5[/MENTION] for being smart and [MENTION=3904203]sm4tik[/MENTION] for being a great tester in our time of need. :D
[Xperia Z3 Compact Original Android Development] sm4tik:
Well, so much for being a great tester.. Guess what? Ohs and Nohs.. NONONO!! I told you I'd do more testing!

https://www.youtube.com/watch?v=NV4xo_rF-oo

*banging my head on the big brick wall*

What on earth is going on? I was sure you'd nailed that d*mn throttling whatever frequency piece of poop thing, or maybe I'm just currently seeing things I'd rather not want to? Duh..

I'll get some sleep now, atleast this leaves me with a reason to wake up tomorrow :D
[Xperia Z3 Compact Original Android Development] Myself5:
Huh :/ He fixed the throttling thingy, at least the result of our tests was he did :D

See, we start with normal values

And with increasing time and heat

All cores throttle.

P.S. If you search for a good way to waste battery, there you go :D
[Xperia Z3 Compact Original Android Development] sm4tik:
I'll just be quick here, before I forget. Something's still buggy here, but I need to investigate further whether it's reliably reproducible. I have kernel adiutor to set max freq to 2.2GHz. After boot, values look fine, but (some) cores are still running at 2.57GHz. When I reset max freq manually, the behavior is gone untill next reboot.

I'll get back to this later, but I'm being optimistic about your reply and hope it's only my setup causing hickups!
[Xperia Z3 Compact Original Android Development] sm4tik:
So, after further testing I think I've found the cause, or a reason would be more like it. Can anyone test with different intelliplug settings and see whether this is what might be causing it? Here are the values I've used (don't even ask how I've come up with these??), defaults have yet to fail on me. *fingers crossed*

Profile Balanced

Touch Boost 1

Hystresis 4

Threshold 675

Max Screen Off Freq 1190MHz

BTW, I can't boot into CM 0730 nightly with permissive version and reflashing enforcing afterwards won't help. Still stuck at sony logo?
[Xperia Z3 Compact Original Android Development] someone755:
Okay, yep, definitely a syntax error on my end. Critical r_04b update uploaded.

As for that intelli_plug issue you're suggesting, we believe thermald might be the cause -- Kernel Adiutor doesn't seem to stop it when enabling intelli thermal.

This should fix the issue, but it'll reset after every reboot.

su
stop thermald
[Xperia Z3 Compact Original Android Development] sm4tik:
Something's still seriously screwed. :/ Either it's me (possible), my phone (even more so) or the r_04b itself (wouldn't know?) I tested the permissive install just out of interest on top of Jul30 permissive, but it got me booting a Jul29 build?! I'm seriously getting the feeling I'm being haunted by some pissed of daemons or alike.. Maybe I should just start it all over from the beginning; flashtool et al.

Edit: all readers can ignore the above, consider my phone as cursed until further notice :/

Edit2: I ordered an exorcist and have been freed from evil :D

In my end it seems to be more of a hit/miss situation, but that's good to know if things start acting up again. Currently I'm happy with what I got. ..finally..
[Xperia Z3 Compact Original Android Development] BurnRubber90:
Just wondering, what recovery i need to flash this? It fails on Cyanogenmod Recovery :/
[Xperia Z3 Compact Original Android Development] someone755:
You need a recovery that works, i.e. not Cyanogen recovery. Get TWRP.
[Xperia Z3 Compact Original Android Development] BurnRubber90:
Where? There is no working build afaik. Tried flashing this with Dual Recovery and ended up in a bootloop also.

Sorry for the questions, been trying to install this for a couple hours without any progress :/.
[Xperia Z3 Compact Original Android Development] funiewski:
Flash multirom twrp with fastboot
[Xperia Z3 Compact Original Android Development] BurnRubber90:
Fastboot flash recovery recovery.img right?

Is there like any tutorial? I'm lost.

Edit: Managed to install a FOTA version of TWRP, still stuck on bootloop.
[Xperia Z3 Compact Original Android Development] funiewski:
can you reach recovery?

if yes flash custom rom of your choice than kernel from this thread, if no extract boot.img from cm 12.1 flash with fastboot: fastboot flash boot boot.img, than flash fota recovery with fastboot: fastboot flash recovery recovery.img, than you will be able to reach recovery and flash rom of your choice and than kernel from here
[Xperia Z3 Compact Original Android Development] BurnRubber90:
Yes I can. I tried flashing this after flashing CRDroid, to no avail. It's weird. I'm currently on the stock kernel that comes with the rom.
[Xperia Z3 Compact Original Android Development] funiewski:
sounds strange, crdroid is th rom I use as daily now , which twrp have you flashed? You have flashed first twrp, than rom and than kernel12? and after that you have bootloop? you can try m5 kernel and see if it is the same result or/and you can try another twrp - multi for exampel
[Xperia Z3 Compact Original Android Development] BurnRubber90:
I'll try Multi Rom TWRP later, I need some sleep haha. I did try both M5 and Kernel 12. Never got past the Sony screen (Bootanimation never started)
[Xperia Z3 Compact Original Android Development] Myself5:
Cause both can only be installed with real recoverys (e.g. NOT CynogenRecovery)
[Xperia Z3 Compact Original Android Development] sm4tik:
Yup. The only drawback with the installers of the latest Kernel12/M5 is that you need to find a boot.img with lzma support as there wont be one inside the zip. And it gets even trickier if you need f2fs. My workaround has been first installing renf_02 boot.img, then TWRP, boot to recovery and flash latest kernel that has f2fs support, reboot recovery and flash rom gapps kernel. Simple as that :D

I don't remember if M5 v6 had f2fs support though, it would make the process one step simpler.

Btw, the r_04b.zip has a wrong kernel inside in case someone was wondering what the exorcist was for. Replace install.sh inside r_04.zip with the one from r_04b.zip and you should be booting to the latest build, permissive or enforcing.
[Xperia Z3 Compact Original Android Development] someone755:
Release no. 5 now up, with less stupidity inside.
[Xperia Z3 Compact Original Android Development] b1u571k:
The XZ Dualrecovery website has a kernel builder. i plugged in the renf_02 boot.img, selected cm12.1 - lollipop 5.1.1, and it produced a flashable zip. i pulled the new boot.img from the tmp folder in the zip, flashed it through fastboot flash boot boot.img.

i booted directly to philztouch by pressing up repeatedly after powering on, then flashed r_05.zip from there.

it booted right up with the new kernel.

good luck.
[Xperia Z3 Compact Original Android Development] someone755:
You could also have not used Dualrecovery because it'll only cause you more issues in the long run.

This device is now officially supported by TWRP, so there is no need for any of that.
[Xperia Z3 Compact Original Android Development] Spiney6:
I just flashed the newest version through TWRP (I'm running resurrection) and i got stuck in a bootloop. Reverted back to M5 Kernel for now. Am i doing something wrong?
[Xperia Z3 Compact Original Android Development] someone755:
I'd very much like to see a recovery log. Be a dear and flash the zip again, but this time pull the log to your computer using adb after you're done (or use the "Copy log to SD card" option).

No promises though, like my signature says, I'm going back to school.
[Xperia Z3 Compact Original Android Development] sm4tik:
I was building your kernel from the latest git sources as a learning project and thought I might as well bump the thread also. It's been a while since the last post. :)

After flashing the kernel I built, I ended up with black screen with only a buzz when pressing the power button. Here's how I built the kernel. Maybe I'm missing something I'm just not aware of. (I fixed the warning about an error in defconfig before building the kernel)

ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-eabi- make 755_shinano_aries_defconfig
ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-eabi- make
dtbToolCM -2 -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/

Then I replaced zImage, dt.img and all the modules in r_05.zip with the new ones. Flashed the zip (enforcing), rebooted and voilà, screenos del blancos.

I pulled /proc/config.gz from my phone and the only difference is a missing CONFIG_ZRAM and CONFIG_ZSMALLOC=y changed to "not set" (+ default governor and frequency changes)

Any advice, hints, tips, tricks or treats from anyone would be appreciated, thanks!
[Xperia Z3 Compact Original Android Development] someone755:
The only two things I can think of is that 1) there's something wrong with your device tree binary or 2) that the damn script inside the zip is messing up your boot.img. Just to see if it's the latter, it wouldn't hurt to check your recovery.log for suspicious activity (or lack thereof). You could also use Myself5's zip if you think this might be the issue. Or try and make a boot image out of the thing to see how/if that changes anything.

Idiot short story time: I once built a kernel for leo (because somebody broke something and I wanted to see what was up) but the dt files for leo wouldn't get removed by make clean. Took me a few reboots to realize what was up until somebody told me of distclean. So if you're in that same boat maybe try that.

(Also, why use subarch? I've honestly never seen that being used with a kernel. On that note, around two years ago I found this thread and the make scripts I made (using the commands from that post) still work to this day.)
[Xperia Z3 Compact Original Android Development] sm4tik:
How about the unthinkable 3) user screwup xD

I did two mistakes

1) at first I built the dt.img without -2 option (this was the actual cause for the black screen)

2) when replacing my original dt.img with a new one I built with -2, I accidentally added external/res/dt.img, instead of actually replacing anything (command line makes you do odd things at times, but I won't be drag 'n droppin')

All in all, job well executed.. Learning (from mistakes) is what it was all about in the first place. The subarch came from source.android.com. Didn't pay much attention to it as it didn't look like it was going to make my phone fly out the window. Thanks for the tut you linked, will look deeper into it later.

Cheers
[Xperia Z3 Compact Original Android Development] someone755:
So I took a day off and rebased the whole thing. Some things are missing, some things are improved, and one or two are new!

This rebase is also a great time to start using Github's release functionality, check it out! https://github.com/someone755/android_kernel_sony_msm8974/releases/tag/r_06

It's been a great year, in a large part thanks to all of you! Merry Christmas and all that good stuff, guys!
[Xperia Z3 Compact Original Android Development] nelvinchi:
*blush* Love you too dood! *blush*

Merry New Year!
[Xperia Z3 Compact Original Android Development] someone755:
We're back in business -- I don't think I've missed a single function the kernel had prior. The improvements over r_05 are huge (dropping all the old and unused code helped a ton)!

Gosh Github is beautiful for changelogs: https://github.com/someone755/android_kernel_sony_msm8974/releases

The happy holidays message still stands tho.
[Xperia Z3 Compact Original Android Development] sm4tik:
Thanks a bunch for the update! I'm having trouble with voltage control though, it's acting up on me. Setting one voltage in KA strangely changes a bunch of others too, can you confirm?
[Xperia Z3 Compact Original Android Development] someone755:
I can, and I know exactly what I missed, thanks for the reminder

Seems like I'll be having three consecutive days of releases, there should be a medal for "how crap can you get" on xda lol.

Also let me know if your phone freezes or anything. I might have borked the low memory killer a bit, but since last_kmsg is gone (and nobody knows how to use ramoops), I can only know through testing.

EDIT: I regret nothing. http://j.mp/changelog12
[Xperia Z3 Compact Original Android Development] sm4tik:
Thanks again, everything seems to be stable now. My phone went a bonkers after switching between the new and old kernel a few times, so I did a clean istall just in case. If you have any tips on how to help low memory kiler reveal it's potential weakness, let me know.