[KERNEL][EAS][EOL][9/10/TREBLE][G95xF/FD/N] RZ Kernel for Samsung Galaxy S8(+)

Search This thread

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
Code:
#include 
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.*/

RZ Kernel aims for as stock experience as possible. It is made from Samsung's stock kernel with stability updates thanks to great guys who made ELS (exynos-linux-stable) branch
It also attempts to increase overall multitasking performance while maintaining good battery life with proper settings

Features
  • I/O Scheduler: CFQ (default), noop
  • Governors
    • schedutil (DEFAULT FOR EAS)
  • CPU
    • Support EAS (Energy Aware Scheduling), which balances battery life while maintaining great overall performance
    • Fine-tuned schedtune values for super fluid user experience
  • GPU
    • Fixed interactive governor for better load burst handling
  • Memory
    • Support zRAM with default size of 3/4 RAM size
    • Multiple compression algorithms for zRAM: zstd, lzo, lz4(default), lz4hc
  • Other tweaks and optimizations
    • F2FS filesystem support (require latest TWRP)
    • Init.d support (A BIG MUST for scripters)
    • Disabled battery-hogging WAKELOCKS
    • Westwood TCP congestion algorithm (small boost on network speed)
    • SELinux Permissive (for V4A and etc...)
    • WireGuard and DriveDroid support

XDA:DevDB Information
RZ Kernel, Kernel for the Samsung Galaxy S8

Contributors
remilia15
Source Code: https://github.com/diepquynh/android_kernel_samsung_universal8895

Kernel Special Features: Energy Aware Scheduling

Version Information
Status: Testing

Created 2019-01-24
Last Updated 2020-08-27
 

Attachments

  • photo_2019-12-17_05-11-03.jpg
    photo_2019-12-17_05-11-03.jpg
    47.9 KB · Views: 5,287
  • photo_2020-08-15_02-54-54.jpg
    photo_2020-08-15_02-54-54.jpg
    54.4 KB · Views: 1,661
Last edited:

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
Download link: Drive folder

CHANGELOG:
  • 20190124 (OREO): Initial release
  • 20190129 (OREO): Post #36
  • 20190201 (OREO): Post #39
  • 20190203 (OREO): Post #47
  • 20190210 (OREO): Post #60
  • 20190213 (OREO): Post #70
  • 20190218 (OREO): Post #81
  • 20190223 (PIE): Post #88
  • 20190225 (PIE): Post #110
  • 20190227 (PIE): Post #125
  • 20190310 (PIE): Post #128
  • 20190321 (PIE): Post #148
  • 20190329 (PIE): Post #158
  • 20190430 (PIE): Post #172
  • 20190503 (PIE): Post #176
  • 20190828 (PIE): Post #220
  • 20190909 (PIE): Post #245
  • 20191014 (PIE): Post #290
  • 20200406 (PIE): Post #307
  • 20200822 (PIE) [FINAL]: Post #339
 
Last edited:

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
Notices and Q&A

  • The kernel is based on tw90-android branch of ELS, which is currently at stable state from my experience
  • Other related features of the kernel were picked from other sources. Credits belong to the owner
  • I have totally ditched Samsung's HMP implementation by myself, and adapted aosp-common kernel's EAS commits with the brand new kernel scheduler (called Exynos Mobile Scheduler (EMS)) from Exynos 9820 kernel source, which seemed doing nice on our Exynos 8895. Because HMP isn't doing really well on our 8895, and to take advantage of 64bit kernel, I've done EAS by myself
  • The kernel's EAS figures were self-made using specific CPU capacity benchmarks and energy usage measurements, along with performance benchmarks for better balance and improved as possible

Questions and Answers (Q&A)

Q: My phone gets hot while using this kernel?
A: Short answer: It's your own issue, fix it yourself. Nobody makes a kernel just to burn your hands

Long answer:
  • Install Termux app from Play Store
  • Enable screen rotation, open Termux in landspace mode
  • Type this command: su -c top -d 2
  • A list of processes will appear and refresh with 2s interval. Find which process consumes the most CPU usage with [%CPU] column and the package name in ARGS column. You should see the culprit of your issue

Reminder: There is no such thing as "I have nothing in background but the phone still heats up". There definitely something happen and 99% of the time it's some of the rogue apps running in background

Q: Can you add X Y Z feature to this kernel?
A: I want to keep the kernel clean and simple. However, if the feature is really useful, I'll consider adapting it with proper performance check before releasing

Q: I can't connect to any access point after installing this kernel?
A: If you can't connect to an access point on stock/stock-based ROM, simply forget its password and connect again

Q: This kernel is unbootable on my One UI ROM?
A: If you came from previous builds, it's because of Secure Folder. You can either continue using previous build (which I would not recommend) or uninstall Secure Folder, install the latest build and reinstall it again. It's all because I have removed Samsung's FIPS cryptographic API which breaks device encryption

Q: My touchscreen/XYZ hardware stuff doesn't work after flashing kernel
A: Make sure your flashing procedure is right. I'd recommend flashing the kernel with a clean stock boot.img (Magisk or SuperSU-patched one is also okay)
Also, check your device name first before downloading (S8/S8+ and it has to be EXYNOS)
 
Last edited:

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
Installation instructions

  1. Select proper kernel variant to download (Stock SE/One UI, LineageOS, Treble)
  2. Put the downloaded kernel flashable zip in the internal storage or SD card
  3. Flash the zip with ease (no root re-installation needed, because the kernel isn't shipped with prebuilt stock boot.img)

Selecting kernel variant:
  • Non-treble ROMs: RZ-LineageOS-* (might not compatible with all non-treble ROMs as each might use its own kernel and stuffs)
  • Treble ROMs: RZ-treble (note that it is meant to be used with hadesTreble). If you didn't install hadesTreble, use non-treble build for non-treble AOSP ROMs
  • One UI/Stock SE: The remaining build
 
Last edited:

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
The more the merrier. Happy to see some more development. Was also curious about EAS feature, velocity had the governer (schedutil) but it freezes like hell.

For now none of the custom kernels has EAS by default. Samsung used HMP for our 8895 and recently implemented EAS for 9810
For more information about EAS, read here:
https://elinux.org/images/6/69/Eas-unbiased1.pdf
https://developer.arm.com/open-source/energy-aware-scheduling

schedutil is a governor born for EAS. It bases on the energy costs table to decide which frequency should be chosen under specified workload
This is different from load-based capacity calculations of HMP with interactive governor. It needs almost zero userspace interact. Installing a kernel with EAS is just "Flash and forget". Governor tweaks are unavailable for schedutil because the CPU up/down rates depends on CPU's transition latency, which is independent among all SoCs
 
EAS on the S8? Superb work here, mate. Makes me regret selling my S8+ even more now :(

---------- Post added at 10:13 AM ---------- Previous post was at 10:07 AM ----------
@remilia15 a question regarding the schedtune boost configuration: are you setting the same values for all cgroups (i.e. foreground, top-app etc.) or are these specific per cgroup? Also, when enabling schedtune via the Spectrum profiles, are you also enabling the prefer_idle value?
 

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
EAS on the S8? Superb work here, mate. Makes me regret selling my S8+ even more now :(

---------- Post added at 10:13 AM ---------- Previous post was at 10:07 AM ----------

@remilia15 a question regarding the schedtune boost configuration: are you setting the same values for all cgroups (i.e. foreground, top-app etc.) or are these specific per cgroup? Also, when enabling schedtune via the Spectrum profiles, are you also enabling the prefer_idle value?


I use 10 and 0 for top-app and foreground with Performance mode, as well as 50 and 60 for Gaming mode

prefer_idle is always 1 for all modes

But I'm still investigating about Exynos thermal driver, because it is too agressive regarding frequencies handling

Sent from my SM-G955F using XDA Labs
 

parser

Senior Member
For now none of the custom kernels has EAS by default. Samsung used HMP for our 8895 and recently implemented EAS for 9810
For more information about EAS, read here:
https://elinux.org/images/6/69/Eas-unbiased1.pdf
https://developer.arm.com/open-source/energy-aware-scheduling

schedutil is a governor born for EAS. It bases on the energy costs table to decide which frequency should be chosen under specified workload
This is different from load-based capacity calculations of HMP with interactive governor. It needs almost zero userspace interact. Installing a kernel with EAS is just "Flash and forget". Governor tweaks are unavailable for schedutil because the CPU up/down rates depends on CPU's transition latency, which is independent among all SoCs

I had checked EAS when I first saw schedutil in the kernel I mentioned. Its good to see it implemented into our phone.

Installed the kernel and trying out now.

Alittle request if you don't mind. Wakelock blocker would be nice addon. And if its not much flickerfree.

Thanks for you great work mate!
 
I use 10 and 0 for top-app and foreground with Performance mode, as well as 50 and 60 for Gaming mode

prefer_idle is always 1 for all modes

But I'm still investigating about Exynos thermal driver, because it is too agressive regarding frequencies handling

Sent from my SM-G955F using XDA Labs

Appreciate the feedback. Thanks.

I agree with the other poster that the Boeffla wakelock blocker along with the PWM flickerfree module being incorporated into your kernel would be fantastic additions.
 

Vaughnn

Senior Member
Jun 2, 2017
132
250
I would like to talk to you personally on telegram, please contact me at @ Vaughnell . Thanks
 
G

GuestK00315

Guest
Hello, thanks for this kernel, i have real all posts on this thread but I can't find how do I change the Setting Spectrum profiles?
 

remilia15

Senior Member
Jan 1, 2017
361
1,649
/dev/ram
I had checked EAS when I first saw schedutil in the kernel I mentioned. Its good to see it implemented into our phone.

Installed the kernel and trying out now.

Alittle request if you don't mind. Wakelock blocker would be nice addon. And if its not much flickerfree.

Thanks for you great work mate!


Appreciate the feedback. Thanks.

I agree with the other poster that the Boeffla wakelock blocker along with the PWM flickerfree module being incorporated into your kernel would be fantastic additions.

Both of these I have done several tests

For wakelock blocker, I couldn't find any actual battery differences. There weren't any drivers that trigger actual CPU wakelocks so I don't adapt it in the kernel

About flickerfree, it's pretty nice, but I'll still need to investigate more before adding this feature permanently because we all don't want weird burn-in in our AMOLED screen. Moreover, I think there will be another disadvantage of it, which is battery impact

Edit: I actually need to investigate more about wakelocks of this device

Sent from my SM-G955F using XDA Labs
 
Last edited:

jgun007

Senior Member
Feb 8, 2014
96
33
@remilia15 your kernel has no way of rooting it with super su or magisk and ur kernel doesn't come pre-installed with a rooting method so am asking myself what is the real purpose of this kernel that i cannot root? ?*♂️
 

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    Code:
    #include 
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this kernel
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.*/

    RZ Kernel aims for as stock experience as possible. It is made from Samsung's stock kernel with stability updates thanks to great guys who made ELS (exynos-linux-stable) branch
    It also attempts to increase overall multitasking performance while maintaining good battery life with proper settings

    Features
    • I/O Scheduler: CFQ (default), noop
    • Governors
      • schedutil (DEFAULT FOR EAS)
    • CPU
      • Support EAS (Energy Aware Scheduling), which balances battery life while maintaining great overall performance
      • Fine-tuned schedtune values for super fluid user experience
    • GPU
      • Fixed interactive governor for better load burst handling
    • Memory
      • Support zRAM with default size of 3/4 RAM size
      • Multiple compression algorithms for zRAM: zstd, lzo, lz4(default), lz4hc
    • Other tweaks and optimizations
      • F2FS filesystem support (require latest TWRP)
      • Init.d support (A BIG MUST for scripters)
      • Disabled battery-hogging WAKELOCKS
      • Westwood TCP congestion algorithm (small boost on network speed)
      • SELinux Permissive (for V4A and etc...)
      • WireGuard and DriveDroid support

    XDA:DevDB Information
    RZ Kernel, Kernel for the Samsung Galaxy S8

    Contributors
    remilia15
    Source Code: https://github.com/diepquynh/android_kernel_samsung_universal8895

    Kernel Special Features: Energy Aware Scheduling

    Version Information
    Status: Testing

    Created 2019-01-24
    Last Updated 2020-08-27
    41
    Download link: Drive folder

    CHANGELOG:
    • 20190124 (OREO): Initial release
    • 20190129 (OREO): Post #36
    • 20190201 (OREO): Post #39
    • 20190203 (OREO): Post #47
    • 20190210 (OREO): Post #60
    • 20190213 (OREO): Post #70
    • 20190218 (OREO): Post #81
    • 20190223 (PIE): Post #88
    • 20190225 (PIE): Post #110
    • 20190227 (PIE): Post #125
    • 20190310 (PIE): Post #128
    • 20190321 (PIE): Post #148
    • 20190329 (PIE): Post #158
    • 20190430 (PIE): Post #172
    • 20190503 (PIE): Post #176
    • 20190828 (PIE): Post #220
    • 20190909 (PIE): Post #245
    • 20191014 (PIE): Post #290
    • 20200406 (PIE): Post #307
    • 20200822 (PIE) [FINAL]: Post #339
    26
    Installation instructions

    1. Select proper kernel variant to download (Stock SE/One UI, LineageOS, Treble)
    2. Put the downloaded kernel flashable zip in the internal storage or SD card
    3. Flash the zip with ease (no root re-installation needed, because the kernel isn't shipped with prebuilt stock boot.img)

    Selecting kernel variant:
    • Non-treble ROMs: RZ-LineageOS-* (might not compatible with all non-treble ROMs as each might use its own kernel and stuffs)
    • Treble ROMs: RZ-treble (note that it is meant to be used with hadesTreble). If you didn't install hadesTreble, use non-treble build for non-treble AOSP ROMs
    • One UI/Stock SE: The remaining build
    25
    New build is up, and this will be the final build of the kernel project!

    Changes:
    • A brand new scheduling method supporting 32-bit and 64-bit task scheduling
    • A few scheduler fixes for overall stability
    • GPU governor fixes and tunings for better performance and thermal handling/stability
    • [NEW] F2FS support (require latest TWRP)
    • Fixes in-call audio issue on latest stock
    • mDNIE color tunings (require EXKM or any kernel managers support the feature)

    As this is the final build of the whole kernel project, I'd like to say thank you to all supporters/developers who helped me improving the kernel. It had been a very long and great journey with the project, but everything has come to its own end. This and the RZ Kernel project for Exynos 9810 will also be abandoned, unfortunately

    Once again, thank you for all your support!
    23
    Notices and Q&A

    • The kernel is based on tw90-android branch of ELS, which is currently at stable state from my experience
    • Other related features of the kernel were picked from other sources. Credits belong to the owner
    • I have totally ditched Samsung's HMP implementation by myself, and adapted aosp-common kernel's EAS commits with the brand new kernel scheduler (called Exynos Mobile Scheduler (EMS)) from Exynos 9820 kernel source, which seemed doing nice on our Exynos 8895. Because HMP isn't doing really well on our 8895, and to take advantage of 64bit kernel, I've done EAS by myself
    • The kernel's EAS figures were self-made using specific CPU capacity benchmarks and energy usage measurements, along with performance benchmarks for better balance and improved as possible

    Questions and Answers (Q&A)

    Q: My phone gets hot while using this kernel?
    A: Short answer: It's your own issue, fix it yourself. Nobody makes a kernel just to burn your hands

    Long answer:
    • Install Termux app from Play Store
    • Enable screen rotation, open Termux in landspace mode
    • Type this command: su -c top -d 2
    • A list of processes will appear and refresh with 2s interval. Find which process consumes the most CPU usage with [%CPU] column and the package name in ARGS column. You should see the culprit of your issue

    Reminder: There is no such thing as "I have nothing in background but the phone still heats up". There definitely something happen and 99% of the time it's some of the rogue apps running in background

    Q: Can you add X Y Z feature to this kernel?
    A: I want to keep the kernel clean and simple. However, if the feature is really useful, I'll consider adapting it with proper performance check before releasing

    Q: I can't connect to any access point after installing this kernel?
    A: If you can't connect to an access point on stock/stock-based ROM, simply forget its password and connect again

    Q: This kernel is unbootable on my One UI ROM?
    A: If you came from previous builds, it's because of Secure Folder. You can either continue using previous build (which I would not recommend) or uninstall Secure Folder, install the latest build and reinstall it again. It's all because I have removed Samsung's FIPS cryptographic API which breaks device encryption

    Q: My touchscreen/XYZ hardware stuff doesn't work after flashing kernel
    A: Make sure your flashing procedure is right. I'd recommend flashing the kernel with a clean stock boot.img (Magisk or SuperSU-patched one is also okay)
    Also, check your device name first before downloading (S8/S8+ and it has to be EXYNOS)