FORUMS
Remove All Ads from XDA

[KERNEL][EAS][8.x/9.x/TREBLE][G95xF/FD/N] RZ Kernel for Samsung Galaxy S8(+) Exynos

329 posts
Thanks Meter: 1,237
 
By remilia15, Senior Member on 24th January 2019, 07:01 AM
Post Reply Email Thread
Announcement from remilia15: First ever EAS kernel for Exynos 8895 platform
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), deadline
  • Governors
    • schedutil (DEFAULT FOR EAS)
    • pwrutilx
  • 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
    • OVERCLOCKED Mali GPU up to 572MHz with tuned thermal values
  • Memory
    • Support for zRAM compression algorithm (updated to upstream Linux 4.14), with 2,5GB zRAM set by default
    • Support multiple compression algorithms for zRAM: zstd, lzo, lz4(default), lz4hc
    • Replaced Samsung's broken zswap driver with vanilla zswap from upstream Linux kernel (for overall stability)
  • Other tweaks and optimizations
    • Init.d support (A BIG MUST for scripters)
    • Kernel Gaming Mode (see post #4)
    • Support dynamic fsync (significantly increase I/O performance e.g faster read/write speed)
    • Disabled battery-hogging WAKELOCKS
    • Optimized Integer SQRT. for upto 3x faster operation.
    • Westwood TCP congestion algorithm (small boost on network speed)
    • SELinux Permissive (for V4A and etc...)
    • WireGuard and DriveDroid support
    • Support Spectrum with optimized profiles (REMOVED SUPPORT FROM PIE BUILD 20190310)

TELEGRAM CHAT GROUP: Link

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

Contributors
remilia15
Source Code: https://github.com/diepquynh/android..._universal8895

Kernel Special Features: Energy Aware Scheduling

Version Information
Status: Testing

Created 2019-01-24
Last Updated 2019-08-27
Attached Thumbnails
Click image for larger version

Name:	photo_2019-01-11_19-35-38.jpg
Views:	12558
Size:	56.1 KB
ID:	4692665   Click image for larger version

Name:	photo_2019-01-21_20-04-16.jpg
Views:	12202
Size:	55.4 KB
ID:	4692666   Click image for larger version

Name:	photo_2019-01-23_18-17-49.jpg
Views:	12262
Size:	67.7 KB
ID:	4692667   Click image for larger version

Name:	photo_2019-01-24_00-24-13.jpg
Views:	11858
Size:	71.2 KB
ID:	4692668  
The Following 50 Users Say Thank You to remilia15 For This Useful Post: [ View ] Gift remilia15 Ad-Free
 
 
24th January 2019, 07:01 AM |#2  
remilia15's Avatar
OP Senior Member
Flag /dev/ram
Thanks Meter: 1,237
 
More
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
The Following 29 Users Say Thank You to remilia15 For This Useful Post: [ View ] Gift remilia15 Ad-Free
24th January 2019, 07:01 AM |#3  
remilia15's Avatar
OP Senior Member
Flag /dev/ram
Thanks Meter: 1,237
 
More
Setting Spectrum profiles (WILL NOT WORK FROM PIE BUILD 20190310)
We got 4 options in Spectrum: Balanced, Performance, Battery and Gaming
How these options affect performance?
  1. Balanced:
    • big cluster maximum frequency: 2314MHz
    • LITTLE cluster maximum frequency: 1690MHz
    • CPUs allowed to run foreground apps: 6 (with only 2 big CPUs)
    • CPUs allowed to run background apps: 2 (only LITTLE CPUs)
    • schedtune boost enabled: No
    • Swappiness: 80 (for less CPU cycles)
    • GPU frequencies (max/min): 572/338 MHz
  2. Performance:
    • big cluster maximum frequency: 2314MHz
    • LITTLE cluster maximum frequency: 1690MHz
    • CPUs allowed to run foreground apps: 8 (all CPUs)
    • CPUs allowed to run background apps: 3 (only LITTLE CPUs)
    • schedtune boost enabled: Yes
    • Swappiness: 150 (stock default)
    • GPU frequencies (max/min): 572/338 MHz
  3. Battery (for ultra saving):
    • big cluster maximum frequency: 1469MHz
    • LITTLE cluster maximum frequency: 1456MHz
    • CPUs allowed to run foreground apps: 5 (with only one big CPU)
    • CPUs allowed to run background apps: 2 (only LITTLE CPUs)
    • schedtune boost enabled: No
    • Swappiness: 60
    • GPU frequencies (max/min): 338/338 MHz
  4. Gaming (EXTREMELY SMOOTH):
    • big cluster maximum frequency: 2314MHz
    • LITTLE cluster maximum frequency: 1690MHz
    • CPUs allowed to run foreground apps: 8 (all CPUs)
    • CPUs allowed to run background apps/services: 4 (only LITTLE CPUs)
    • schedtune boost enabled: Yes
    • Swappiness: 150 (stock value)
    • GPU frequencies (max/min): 572/385 MHz

Why do we use Spectrum while having EAS on this kernel?
Well it is actually just for better experience. Setting performance mode as default will still maintain great battery savings as for EAS' nature (I can get barely 6-7hrs SOT with my one-year old S8+)
Furthermore, Samsung does the same stuff with its power saving mode on S9(+) so why can't we use Spectrum as relative?
The Following 18 Users Say Thank You to remilia15 For This Useful Post: [ View ] Gift remilia15 Ad-Free
24th January 2019, 07:02 AM |#4  
remilia15's Avatar
OP Senior Member
Flag /dev/ram
Thanks Meter: 1,237
 
More
Notices and Q&A
  • The kernel is based on tw80-android-o 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 partially ditched Samsung's HMP implementation by myself, and adapted aosp-common kernel's EAS commits with some improvements from wahoo and other msm8998 kernel sources, which seemed doing nice on our Exynos 8895. Because HMP isn't doing really well on our 8895 (e.g frequencies ramp up unnecessarily, even with tuned interactive and other governors), and to take advantage of 64bit kernel, I've done EAS by myself
  • The kernel's EAS energy costs table was based on universal9810's and later adapted using ARM's LISA notebook for system energy and cluster costs, with several configurations need to be done in the notebook itself because Samsung doesn't play well with its 8895 kernel (or maybe I haven't acknowledged enough)

Questions and Answers (Q&A)

Q: Differences between Performance and Gaming profile?
A: Only difference here is the minimum GPU frequency, 338 vs 385 MHz for performance and gaming profiles respectively

Q: Why my phone gets hotter during gaming with performance mode?
A: Gaming profile is born for gaming, as its name says. To prevent CPU overheat during heavy gaming, I've limit big cluster maximum frequency for all GPU frequencies from 385MHz and above to 1,7GHz
I have tested thermal throttle with my settings with 2 graphics intensive games, Honkai Impact 3 and PUBG, respectively. At 2K+ high graphics settings for both games, I saw maximum temperature of both games fluctuates around 62-68C (CPUfloat is a nice app to check). With old gaming profile settings from older builds, locking 572MHz GPU frequency is overkill, causes the device to overheat badly and drastic frame drops are seen
Performance profile, with some games, GPU frequency won't go above 385MHz so big cluster won't get locked -> more heat

Q: AnTuTu scores please?
A: Look at screenshots. That's the maximum I could reach

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: 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)


Q: What is kernel gaming mode (or gaming control)? How does it work?
A: Kernel gaming mode is born to bring maximum gaming experience, potentially reduce FPS drops as much as possible. It works by locking frequencies of each cluster
By default, minimum and maximum frequency of big cluster are 1,7GHz and 2GHz respectively. The maximum frequency of little cluster is 1,45GHz. The default frequencies set is made to overcome thermal issues
How can I configure it? Just by accessing sysfs nodes available in /sys/kernel/gaming_control
  • big_freq_max: Maximum big cluster frequency allowed during gaming mode
  • big_freq_min: Minimum big cluster frequency allowed during gaming mode
  • game_packages: List of supported games that user added through add_game[X] command
  • little_freq_max: Maximum little cluster frequency allowed during gaming mode
  • min_mif: Minimum RAM bus frequency allowed during gaming mode (default: 1794MHz)

To get Gaming Mode working, follow these steps:
  1. First, download Package Name Viewer 2.0 from Play Store
  2. Find your games there. The package name will usually start with com. (example of package name: com.miHoYo.bh3rdJP)
  3. Go to terminal emulator, run with su permission, type this command: add_game <package_name> (where package name is the one with your game, example is mentioned in step 2)
  4. You're all set

How to remove my games from added list?
Just go to data partition, find games_list file. Find your games package name and remove it from the list inside the files
The same method is applied to game_packages node in /sys/kernel/gaming_control


EAS vs HMP_perf on universal8895
Well, this is a long story. I would write this later xD
The Following 19 Users Say Thank You to remilia15 For This Useful Post: [ View ] Gift remilia15 Ad-Free
24th January 2019, 07:27 AM |#5  
remilia15's Avatar
OP Senior Member
Flag /dev/ram
Thanks Meter: 1,237
 
More
Reserved for future usage
The Following 7 Users Say Thank You to remilia15 For This Useful Post: [ View ] Gift remilia15 Ad-Free
24th January 2019, 08:42 AM |#6  
Senior Member
Thanks Meter: 29
 
More
Thanks will try 6 hrs sot is great
24th January 2019, 09:03 AM |#7  
steveman29's Avatar
Senior Member
Thanks Meter: 121
 
More
Thank you for this great kernel!

Στάλθηκε από το SM-G955F μου χρησιμοποιώντας Tapatalk
24th January 2019, 09:36 AM |#8  
gregou's Avatar
Senior Member
Flag Nantes
Thanks Meter: 151
 
More
Is this kernel compatible for Android Pie ?
24th January 2019, 09:37 AM |#9  
parser's Avatar
Senior Member
Flag Mersin
Thanks Meter: 152
 
More
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.
24th January 2019, 10:07 AM |#10  
remilia15's Avatar
OP Senior Member
Flag /dev/ram
Thanks Meter: 1,237
 
More
Quote:
Originally Posted by parser

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-sourc...are-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
The Following 5 Users Say Thank You to remilia15 For This Useful Post: [ View ] Gift remilia15 Ad-Free
24th January 2019, 10:13 AM |#11  
Senior Member
Flag Johannesburg
Thanks Meter: 79
 
More
EAS on the S8? Superb work here, mate. Makes me regret selling my S8+ even more now [COLOR="Silver"]

---------- 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?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes