yashsingh1/xdaforums huggingface dataset:
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Below you will find a couple of kernels that I put together for various roms and purposes. Most of these are now included into my other builds, but I thought that I would share them here as well, in case they are useful on any other roms. You are welcome to use and abuse these kernels for any purpose that you see fit!

It started when I wanted to add some governors to a kernel, and it didn't work very well. However, praise God, I learned a lot of things and was able to add the governors in! From there I played around with various sources and have put together some developer kernels as well (including kexec and other tools). None of my work is purely original, I typically beg or borrow from other kernel developers by looking at their source. Please feel free to use any of the materials here if it will help you in any way (including adding to a different rom).

Feel free to comment if you have tried them on another rom, successful or not, or to leave feedback on these kernels as well. These can be flashed on any JF variant of phone, but I have only personally tested them on JFLTETMO. Some have been reported working on JFLTEAIO, and i9505.

Post #2: Marshmallow kernels

Post #3: Lollipop kernels

Source: https://github.com/alaskalinuxuser/

Post created: 7/5/16

Last updated: 12/20/16
[T-Mobile Samsung Galaxy S 4] Quimicax:
Excellent work.!
[T-Mobile Samsung Galaxy S 4] dtriguero:
Do these have fast charge enabled
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Great question, and as always, I appreciate any feedback!

At this time, these kernels do not have fast charge. I do have the commits for fast charge, but I am working on mixing it in. This is a learning experience for me, so I tend to be a bit slow. Hopefully we can see this in the future though. A couple other items on my "bucket list" are:

-Under voltage

-Over clocking

-GPU governors

-Upgrading to a 4.x.x kernel (They already exist for this processor, just not this phone.)
[T-Mobile Samsung Galaxy S 4] Quimicax:
Thx Alot To Bring Back To Life This Device Again.!!! :highfive:
[T-Mobile Samsung Galaxy S 4] dtriguero:
Thanks for the quick reply back and big thanks for giving us s4 users something to still look forward to. can't waite for all the goods u planing keep up the great work
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New Kernel is up, see Post #2 for details!
[T-Mobile Samsung Galaxy S 4] dtriguero:
fast charge one getting boot loop on resurrection remix 5.7.0 but gonna try again after I change some stuff also would u be able to add fast charge to ur developer one
[T-Mobile Samsung Galaxy S 4] dtriguero:
Got it to boot on resurrection remix not sure what the issue was but no matter which rom I used fast charge kernel on it has issues with external sd card
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
I am glad that it booted! I am using that kernel right now, and my 64 GB sd card is working great. Is your sd card larger than 64 GB? Is your sd card encrypted? Do you know what format your sd card is (ext 3/4, ntfs, vfat, etc.). This information may help us look at what is not working.

At this time, I use the same kernel source to build the developer kernel, I just enable more of the dangerous features (like kexec), so I will be rebuilding the developer with the fast charge on also. Perhaps this weekend I can get that rebuilt.

Thanks again for the feedback! It is great to know someone is trying it out, and good to know if there are problems so I can work on them.

EDIT:

New developer2 kernel is up! See Post #2 for details!
[T-Mobile Samsung Galaxy S 4] bubbayang:
How did you get it to boot on RR?

Mine just keeps bootlooping
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Bubbayang,

If it still bootloops, could you pull a logcat? That would help with troubleshooting.

Also, have you tried wiping cache/davlik after flash?
[T-Mobile Samsung Galaxy S 4] dgm_mixtoon:
when they will add audio modification
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Hey dgm_mixtoon,

I feel we are suffering from a language barrier. I would really like to help you and answer your question, but I don't understand exactly what it is you would like. Can you please be more specific? Or provide a link for more information?

Thanks, friend!

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com/
[T-Mobile Samsung Galaxy S 4] dtriguero:
O0

I boot rr with its included kernel let it settle a few then went back to recovery and flashed new kernel

---------- Post added at 07:34 AM ---------- Previous post was at 07:23 AM ----------

it's 64gb exfat I believe was formatted by rom on ur rom settings fc after formatting and says sdcard corrupted if use ur kernel on resurrection I can get it to boot after first boot with it's included kernel then flashing ur's. Resurrection sees sdcard and it works with its included kernel but after I flash ur's and boot it no longer sees sdcard till reflash included resurrection kernel

---------- Post added at 07:36 AM ---------- Previous post was at 07:34 AM ----------

I haven't tried the developer kernel yet will give it a go sometime today
[T-Mobile Samsung Galaxy S 4] dtriguero:
update it will boot on resurrection but only after it first boots with it's kernel then u can flash new kernel but if wipe cache and dalvik it boot loops again
[T-Mobile Samsung Galaxy S 4] gizm0luvsu:
I am running cm 13 nightly and this kernel and i will say that it is running very nicely. To install i did a nandroid backup just incase then wiped dalvik/art cache and cache. Then i installed the kernel and rebooted. Everything booted fine and so far i have no issues at all.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Great! Glad to hear you like the kernel, and that it is working smoothly with CM13!

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] aymenflash:
Is it worrking for cm12.1
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Glad that it is working on CM12.1! Thanks for the feedback!

Also, updated post #3 with a Lollipop fast charge kernel! Keep in mind that you will need an app such as Kernel Adiutor, or Device Control to turn on the feature!
[T-Mobile Samsung Galaxy S 4] dtriguero:
Been trying the developer kernel I can't seem to get sdcard to work with it. Noticed rom I'm on formatted it to f2fs it works fine with cm13 kernel that's bundled with RR rom does your kernel support f2fs
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
As always, great question! Yes, the Dev2 kernel does support F2FS, as seen here:

CONFIG_F2FS_FS=y
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
CONFIG_F2FS_FS_SECURITY=y
# CONFIG_F2FS_CHECK_FS is not set
# CONFIG_F2FS_FS_ENCRYPTION is not set

However, encryption is not on. Perhaps the other roms encrypted it? Another option is to reformat the sdcard and use the sdcard as portable storage. Perhaps I can whip one up later with encryption enabled, but if your sdcard is encrypted, I think changing roms means you have to reformat it, right? I am not too knowledgable about that, to be honest.

I use my 64 GB sdcard as "portable storage" because I have to backup my roms, and then reflash my phone every time I am testing out my new builds. I flash test roms and kernels to my phone 3-5 times per week, so I try to protect my files by keeping the sdcard portable storage and sometimes even remove it for a flash.

I will try to add the F2FS encryption soon, and see if that helps! Again, thanks for your feedback! It is good to hear how others are using the kernels, and areas that I should focus on. :D
[T-Mobile Samsung Galaxy S 4] dtriguero:
Thanks for the quick reply still learning myself not sure on the rom as to if need reformat. I know twrp sees it no matter which. It just puzzles me as to why when only kernel is changed it says sdcard removed and if I tap the notification it brings me to something asking if I wish to forget it which then brings me to the sdcard setup. But if flash back to the included kernel which I believe is the cm13 for TmS4 it sees sdcard with no issues

---------- Post added at 11:36 AM ---------- Previous post was at 11:34 AM ----------

What is the config_f2fs_check_fs
[T-Mobile Samsung Galaxy S 4] dtriguero:
Any idea as to why developer2 kernel will boot resurrection remix but only if rom has been boot at least once and when kernel is flashed you can't wipe dalvik/cache or it will just boot loop is it possibly something with the rom that won't allow it to work right
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New Kernel is up!

The new GPU overclocked kernel is up! Praise God! Post #2 has all the info, check it out!

Essentially the GPU moved from 450MHz to 487MHz, with some numbers I pulled from some work on a kernel by [MENTION=3332811]faux123[/MENTION] !

Be sure to check it out! And remember, if you use apps like "Kernel Adiutor" you can still tone it down by choosing lower frequencies under GPU settings.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New Lollipop version of the GPU overclock kernel is up!
[T-Mobile Samsung Galaxy S 4] dtriguero:
Does the developer kernel have the updated stuff
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Not yet, it is compiling tonight, should be up tomorrow. :D

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] dtriguero:
Thanks can't wait also did you turn on the f2fs encryption I do believe that maybe my issues with sdcard cause I flashed your aokp ROM and after it booted said sdcard was corrupt ect. So I flashed the kernel from resurrection remix from my backup and rebooted and sdcard works fine and also from time to time I get an error in twrp saying something about not mounting unencrypted adopted storage and have to reboot twrp and sometimes loads it with no issues so I do think my sdcard issues may have something to do with it being encrypted maybe you may have a better idea
[T-Mobile Samsung Galaxy S 4] dtriguero:
What is different between your developer2 kernel and gpu-oc kernel. The gpu-oc one see's my sdcard fine but developer2 doesn't any ideas to why this maybe
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Great work!

Great work dtriguero!

Now I think I know what the problem is! Knowing that it works with the gpu-oc, but not dev2 showed me the problem. Hopefully this will help. I will re-compile it today. Also, I think I forgot to turn on Smartmax as an option for Governor on the gpu-oc kernel.

Thanks for pointing that out, now hopefully we can fix it!
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New Kernels are up!

20160722 is up!

dev3 is up!

I have made some changes to the way that I post the kernels. Rather than a confusing list of kernels, I have simplified it to the current user and developer kernels for Marshmallow. I will see about doing the same for Lollipop soon.

Be sure to read post #2 for the updates and changes!

EDIT: updated lollipop kernel, check post #3 for updates and changes!
[T-Mobile Samsung Galaxy S 4] dtriguero:
Dev 3 kernel working great so far since the change

---------- Post added at 07:40 PM ---------- Previous post was at 07:39 PM ----------

What does that change do y to m something to do with encryption I'm guessing
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Good question!

When building kernels, you can choose y for yes, build it in, or m for module. If you choose neither, then you get the flag "is not set" which means no, don't build that.

So, if you choose y, or yes, it actually makes it a part of the kernel.

If you choose m, for module, it is built as a module that you must insmod or modprobe to install and turn on. The idea is that the dev kernel has module support, and then devs could build their own modules and insmod them with force loading. Enabling modules allows you to build smaller kernels that you can "add" features to on the fly.

Glad to hear it is working great, though!

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

Praise God! New Kernel build is up!

I have a new kernel build in post #2! Added CPU overclocking from 1890MHz to 1998MHz! Seems to be working great for me, but let me know if you have issues! Also, if you want to tone it down, don't forget that you can set lower limits with Kernel Adiutor.

Also, the dev build will be updated (hopefully) tomorrow.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

The Developer build has been updated with overclocking cpu!

Edit: The overclocking has been added to the Lollipop kernel, too!
[T-Mobile Samsung Galaxy S 4] dtriguero:
Gonna give it a go and that Change u made last update fixed the sdcard issues with dev kernel
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Yes, this is an issue with TWRP:

https://github.com/TeamWin/Team-Win-Recovery-Project/issues/592

It is a sometimes random, but persistent problem between TWRP and CM13. I use some CM13 trees when compiling this ROM, and AOKP changed to CM as a base for its builds some time after KitKat. The overall problem has to do with encryption algorithm/authentication, but it is a bit above my skill level.

You may try an older version of TWRP, such as 2.8.7-0, or wait for an updated version for our phones. From my limited understanding, the problem is limited to TWRP 3+.

I hope that helps, sorry for the troubles. The web link above mentions a few work a rounds that you may wish to try.

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] dtriguero:
Thanks will look into them or maybe an older version like u suggested

---------- Post added at 11:22 PM ---------- Previous post was at 11:09 PM ----------

Below is something I copied off the site suggested think it maybe my issue but if is it's beyond my limited skills at this point

￼

afflux*

commented*about 1 month ago

I still have this issue with 3.0.2-2 as released on twrp.me. The encrypted volume is formatted with f2fs. I managed to pinpoint the issue on a missing delay between thecryptfs_setup_ext_volume*and*blkid_do_fullprobecalls.

Apparently*blkid_do_fullprobe*can't open the device yet, as it has just been created. I managed to workaround the issue by calling*sleep(3)*aftercryptfs_setup_ext_volume, since I'm not familiar with TWRP. Probably you guys know of a cleaner solution to fix this.

￼

jcadduono*

commented*about 1 month ago

thanks*@afflux*for the gerrit patch [MENTION=1372986]https[/MENTION]://gerrit.omnirom.org/#/c/18254

seems to apply to quite a few devices and people coming in with adopted storage issues :)

also, thanks*@nrosier*for the mention of great work (that's my personal site :p)
[T-Mobile Samsung Galaxy S 4] Quimicax:
Men Thx For You Work.!!!
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New Kernel is up for Dev, MM, and LP! Added a new scheduler and enabled more governors, by God's grace it is working great! Enjoy!

20160727

-Added VR I/O scheduler

-Enabled more Governors, in addition to the others:

Lagfree

Intelliactive

Intellidemand

SmartassV2

Badass

-Edited SmartMax governor minimum frequency to 384000, it was 368000, which had potential to cause the sleep of death.

But be careful with the VR I/O scheduler. It is best when used for benchmarks, but can sometimes be inconsistent and even unstable for some applications.

Some notes on the new governors:

Lagfree is supposed to be more battery friendly, it may cause stutters when watching movies.

Intelliactive is based on interactive governor, with self-boost from input drivers.

Intellidemand essentially polls the GPU to find out how busy it is, and ramps the CPU up or down to match.

SmartassV2 works based on "ideal" frequencies. These are pre-programmed ideals that the CPU tries to meet.

Badass essentially ramps up to an ideal frequency, then polls the load to see if it should increase to meet demand.

Let me know what you guys think! I figure more choices is always better, since we all use our phones for different purposes.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New kernel build is up!

I had some trouble with how to implement this, but by God's grace I was able to keep the 487 MHz GPU overclock, but also add back in the 450 MHz frequency, for those who did not wish to use the overclock. Default is 487 MHz max, but you can use Kernel Adiutor or other apps to set the max frequency at 450 MHz if you do not wish to overclock your GPU.

Enjoy!
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

New kernel is up!

Praise God, the simple GPU governor is now working and can be selected. There was a problem where I needed to put it into the trust zone. Fortunately, [MENTION=3332811]faux123[/MENTION] had already done this in a kernel, and I could borrow some code to make this work.

Change log:

20160808

-Fixed GPU simple governor. It now works and is selectable.

-Added 450 MHz GPU frequency back in. Still overclocked to 487 MHz.

The GPU governors Performance, Ondemand, and Simple are working and can be selected.

The GPU governors Powersave and Conservative are not functioning at this time. Powersave could essentially be forced by choosing a max GPU frequency of 128 MHz. Conservative shows up in the GPU selection, but is not an option that I put in. I do not know why it shows up there, and I am investigating how to make it disappear from the list.

Let me know if you have any problems. The simple GPU governor seems to work really well.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
New Kernel is up!

To God be the glory, the new kernel build is up!

This is the most dangerous kernel that I have put out yet. In and of itself, with the default settings, this kernel is completely stable and safe.

However, you now have the ability to alter the space-time continuum. At least on your phone.

After reviewing some of the code put out by [MENTION=5795145]javelinanddart[/MENTION] and [MENTION=3332811]faux123[/MENTION], I have borrowed some of their work and put it into the AKLU kernel. You now have the ability to edit the voltages of your CPU and your GPU on the fly. Currently, the Kernel Adiutor app will add a menu option for CPU voltage control. There is no app that I have seen yet for GPU voltage control, but I am working on that (perhaps a KA plugin/custom control).

WARNING: Any change in the voltage of your CPU/GPU is inherently dangerous! Proceed with caution! This will allow you to undervolt and overvolt! You can cause crashes and may even burn up your phone! BE CAREFUL!

If you choose to change any voltage, I recommend that you do not set the KA app to "set on boot" for the voltage changes until you have tested that your changes do not cause fault crashes, kernel panics, your phone to burst into flames, etc....

20160809

-Added voltage control after reviewing Faux123 and Javelinanddart's code.

-Over/under volt control for CPU and GPU. KA app only supports CPU at this time.

-Control GPU at /sys/devices/system/cpu/cpufreq/vdd_table/gpu_vdd_levels

-Control CPU at /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
[T-Mobile Samsung Galaxy S 4] qltsar:
[MENTION=7026648]AlaskaLinuxUser[/MENTION]

Thank You for your hardwork!

I installed the MM non-dev version since ~2 days, and I can confirm that it's working flawlessly on the jfltexx variant.

I am using the kernel with the default settings, I only enabled the fast charge option - which is working great :)!

[MENTION=4039011]dtriguero[/MENTION]

I saw that you had some problems with RR ROM. I am using 5.7.1, and i did not experience any boot loop issues or SD card issues that you mentioned - fortunately :).
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Glad you like it, and thanks for sharing!
[T-Mobile Samsung Galaxy S 4] qltsar:
Something has changed since the RR 5.7.2, I flashed it yesterday - i did not try the 5.7.3 because it has some major bugs - but with 5.7.2 i got no notification, ring & music sound | but i was able to place and receive calls with audio...really strange.

The RR team must have changed something, so I had to revert back to 5.7.1.

Unfortunately, I am not able to find the recent change log for RR at github.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Qltsar,

Do you mean that with the AKLU kernel you had this problem, or just for RR in general? This thread is for the AKLU kernel. If you have RR issues, you might find more help in the RR thread. ;)

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] qltsar:
I meant it after I flashed your kernel :)! With the stock-RR kernel, the audio was working fine, after I flashed AKLU the audio went away (except for phone calls).
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Now it is clear!

Hmmm... I am not sure why that would be, I do not use RR, does it have any special sound fx manager app?

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] qltsar:
Yes it has, but this is not as heavy as Viper Audio or something.

And...actually, I am not using it, and it has been disabled (frozen).

I will wait for the next RR (fixed) build and I will try if the audio works with AKLU kernel.
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
Fauxsound.

I have been experimenting with adding sound mods to the kernel, only to find that the source I originally borrowed from Arc-Team already has Fauxsound enabled.

Fauxsound is a sound modification created by [MENTION=3332811]faux123[/MENTION], and he does some really great work.

The only downside is this: the only way I know of to control it is to download the Fauxsound app from the Google Play Store:

https://play.google.com/store/apps/details?id=com.teamkang.fauxsound

Which costs $2.

I am not opposed to paying faux for his work, and I have purchased the app myself. However, I do not wish to push everyone into purchasing his app. I have tried several free apps that supposedly can control Fauxsound, but none of them have worked.

I am investigating Viper4Android and Voodoo sound at the moment as potential alternatives that do not cost the end user money to actually use.
[T-Mobile Samsung Galaxy S 4] timz1313:
K........helping........ U...... privilege..........trying......tlearn..
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
As I continue to look into different sound modificatios, I have come to realize that viper4android does not require any kernel modifications. You can read about how to install that here: http://xdaforums.com/showthread.php?t=2191223

Voodoo sound mods were designed for a specific chip which is not in our phone, so I will not be implementing that either.

For now, I plan to stick with Fauxsound. Here are some screenshots of the app at work on our S4.

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] jonpjingleheimler:
great info

Hi. i am glad you got this kernel to work with RR. could you tell me what version RR you used? i cannot get it to work on the latest RR
[T-Mobile Samsung Galaxy S 4] AlaskaLinuxUser:
I do not use RR, but I believe 5.7.1 was working with this kernel. From the posts, you can see that they would install RR and gapps, let it boot, reboot into recovery, then flash the kernel.

Hope that helps!

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[T-Mobile Samsung Galaxy S 4] dtriguero:
Was 5.7.1 but was a pain to get to boot haven't tried with the 5.7.3 but it should boot it u just may have to play with it a bit. Try it and see but always backup before u try messing around. Flash RR and gapps let boot and do whole setup then flash this kernel but don't wipe dalvik/cache. At least I found when I did rom would bootloop till the bundled RR kernel is reflashed. It may work better now that RR and the kernel here have been updated. The kernel for RR is based off of stock/CM source. Give it ago best of luck but if can't get it to work u should try out aokp-mm-6.0.1 rom its made by same dev as this kernel and does awesome work