FORUMS
Remove All Ads from XDA

[KERNEL] [9.0.0 / 10.0.0] [4.9.194] [DTC 9.0.0 / GCC 10] Sphinx Kernel - v3.1

1,794 posts
Thanks Meter: 4,673
 
By milouk, Recognized Developer on 2nd November 2018, 08:40 PM
Post Reply Email Thread
Introduction
Ahoy everyone,

I decided to share my personal custom kernel with all of you. The main reason i started developing this kernel is to balance performance / battery / security and also add features.

I believe i have included most of the usually requested features. If your feature is not included you can ask for it and i will try to include it as long as you don't ask for ETA's. I am a student and i do this on my spare time.

This kernel is based on LineageOS 16.0 sources for beryllium.
Moreover, it is compiled with SdClang which is Qualcomm's LLVM Compiler for extra performance.

So let's jump to the interesting part!

Sphinx Kernel Features
  • Compiled with Dragon Toolchain based on Clang 9.0.0 with GCC 10 and optimized for SnapDragon 845
  • Upstreamed to 4.9.194
  • Merged Latest Lineage 16.0/17.0 commits
  • Merged CAF Tag LA.UM.7.3.r1-07900-sdm845.0
  • Makefile Optimizations
  • WireGuard Support
  • Novatek Firmware from 9.6.20
  • Underclock GPU to 180 Mhz
  • Dynamic Stune Boost v3
  • CRC Check Disabled
  • Pass SafetyNet without Magisk / Root
  • Boeffla Wakelock Blocker
  • AdrenoBoost v2.2 Support
  • Adreno 630 Nap Mode
  • Pixel 3 Energy Model
  • Hight Brightness Mode Support
  • IR Camera for MIUI based Roms
  • Support sdFAT Filesystem v2.1.8
  • Support exFAT Filesystem
  • Support F2FS File System
  • Support NTFS File System
  • Frandom Random Generator
  • Sound Control
  • TTL Target
  • IP Mangle
  • Fsync Control
  • Disabled Gentle Fair Sleepers
  • Atheros 9 Wireless Cards Support
  • Ralink 27xx / 28xx / 30xx Wireless Cards Support
  • Kcal Advanced Color Control
  • K-Lapse v5.0
  • Vibration Control
  • Reduced Latency
  • Config HZ -> 300
  • DriveDroid Support
  • DTS X Eagle Driver
  • LED Notification Control
  • USB Fast Charge up to 900 mAh
  • LZ4 Compression Algorithm by default
  • Backlight Minimum Brightness Control
  • Power Efficient Workqueues
  • mac80211 Injection (Kali Nethunter Support)
  • I/O Schedulers: Zen v2, Maple, Fiops, Sio, Noop, Deadline, Cfq, Tripandroid, Anxiety, bfq
  • TCP Congestion Algorithms : cdg, westwood, bbr, sociopath
  • Pre-Configured- Flash and Forget
  • Zipped up with AnyKernel2


Notes
  • I bear absolutely no responsibility. If you brick your device. If you are not sure what a kernel is, how to flash it or how to restore your phone in case something goes wrong then do NOT proceed.
    Moreover, you should flash this kernel only over the stock kernel that came with your Rom.

Downloads - Version 3.1
Sphinx 3.1 : https://www.androidfilehost.com/?fid...86940962594232

/-----------------------------------------------------------------------------/


I have dedicated countless hours developing this kernel so if you like my work consider buying me a coffee to help me stay awake an keep improving Sphinx.
Click Here for Coffee

/-----------------------------------------------------------------------------/

For Support, Updates, Questions, Releases regarding Sphinx join t.me/SphinxKernel

XDA:DevDB Information
Sphinx Kernel, Kernel for the Xiaomi Poco F1

Contributors
milouk
Source Code: https://github.com/milouk/Sphinx-Beryllium

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: 3.1
Stable Release Date: 2019-09-26

Created 2018-11-02
Last Updated 2019-09-26
The Following 215 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 08:40 PM |#2  
milouk's Avatar
OP Recognized Developer
Athens
Thanks Meter: 4,673
 
Donate to Me
More
Pocoooooooooo F1 - Donations
If you see your name and not your xda name PM me

Donations made by:

@JJ111
@tnicko
Jerzy Gawryluk
Georgios Bitloglou
@tnicko
@bla.blub
@reg66
@Lazy Rich
@BakaPhoenix @Mrdream94
@emmanuelo7
Pascal Bourasseau
@niccio67
Ramgonda Desai
@MP2005
@2WildFirE
@Dan_Jacques
@Bonz
@rodries
@fwb1973
@Lycidias
@dodjob
@makimac
@_phil07_
Arge_Canna
@SSmanBuraQ
@fmcheetah
@Migueliyo98
Andrea Nastro
Joao Martinho




Thanks again guys!
The Following 67 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 08:42 PM |#3  
milouk's Avatar
OP Recognized Developer
Athens
Thanks Meter: 4,673
 
Donate to Me
More
Changelog

Sphinx v1.7
-Upstreamed to Linux Version 4.9.135
-Merged ext4 upstreamed commits
-Merged Lineage 16.0 Upstream commits
-Now Compiling with Uber Toolchain 6.4.1
-Added Zen v2 I/O Scheduler
-Added TCP Congestion Algorithms (bic, cdg, cubic, westwood, htcp, hstcp, hybla, vegas, scalable, lp, veno, yeah, illinois) default is cdg
-Improved msm_performance
-Enabled USB Fastcharge up to 900 mAh
-Added blu_schedutil
-Makefile Optimizations
-Added LED Notification Control
-Enabled LZ4 Compression Algorithm for Zram
-Now Sphinx comes Pre-Configured out of the box for balance
-Support F2FS File System

Sphinx v1.8
-Compiled with Uber Toolchain 9.0.0 tuned for Snapdragon 845
-Added Adreno Idler
-Added Frandom Random Generator
-Tuned-Up Westwood TCP
-Added Simple Low Memory Killer
-Replaced Cpu_boost with Cpu_Input_Boost driver
-Adapted Dynamic Schedtune Boost to Cpu_Input_Boost
-Added Devfreq_boost driver
-Added alucard_schedutil
-Added darkness_schedutil
-Added pwrutilx_schedutil
-Zram Upstream Updates
-Crypto: Now compiling with armv8.2-a flag
-Updated WireGuard
-Added DCTCP TCP Algorithm
-Added BBR TCP Algorithm

Sphinx v1.8.7
-Removed Adreno Idler
-Compiled with GNU GCC 8.2.1
-Removed Simple Low Memory Killer
-Removed Cpu_Input_Boost / Devfreq_Boost
-Fixed ALL Reboot Issues
-Improved KCAL Control

Sphinx v1.9
-Now Building with Custom Uber Toolchain 9.0.0 with various optimizations for SnapDragon 845
-Upstreamed from CAF to 4.9.136 , 4.9.137, 4.9.138, 4.9.139 and 4.9.140
-Added Tripandroid I/O Scheduler
-Added Sociopath TCP Algorithm
-Massively Tuned Up Westwood and set it as default
-Improved Wakelock Blocker
-Reduced a lot Latency
-Upgraded to AdrenoBoost v2.1
-Updated WireGuard
-Merged CAF Tag CAF LA.UM.6.3.r4-05800-sdm845.0
-Set the Kernel's Base Frequency to 500 HZ
-Support NTFS File System

Sphinx v2.0
-Upstream to 4.9.141, 4.9.142, 4.9.143
-Updated TouchScreen to 8.12.6
-Underclocked GPU to 180 MHz
-Set Initial GPU Frequency to 180 MHz
-Improved Memcpy spped by 15%
-Added Sound Control (Only Headphones and Mic)
-Updated LZ4 Module
-Fixed ExFAT and NTFS File Systems
-Decreased the Time the GPU needs to enter Idle Module
-Improved Battery Drop Issue (NOT fixed, just improved)
-Merged some SnapDragon 845 Patches
-Removed Pwrutilx, Alucardsched, Darkness_Sched and Blu_schedutil as they were Unstable.
-Blocked Some extra Wakelocks
-Now Sphinx comes PRE-CONFIGURED out of the box. Just Flash And Forget (You need Magisk)
-Updated WireGuard
-Merged Lineage Latest Changes
-Some Battery Saving Patches
-Much more minor things --> Check GitHub

Sphinx v2.1
-Upstreamed to 4.9.145
-Re-Based Sphinx Kernel tree from scratch based on CAF Pie Tag
-Wifi working on all Roms
-Touch Firmware from 8.12.10
-Pre-Configured settings optimized a bit more
-Merged Latest Lineage Changes
-Updated WireGuard
-Many more bug fixes and Optimizations --> GitHub

Sphinx v2.2
-Upstreamed to 4.9.147
-Updated WiFi Driver from CAF Tag LA.UM.7.3.r1-0660-sdm845.o
-Merged Latest Lineage OS Changes
-Built with SdClang for maximum optimization and performance
-Merged Touch Firmware 8.12.20
-Updated AnyKernel2
-Updated Schedutil Governor
-Merged some cpufreq patches from Upstream
-Merged a commit for smoother Frequency downscaling
-Cleaned and Improved pre-configured Settings
-Fixed the bug during Installation for users with 9.0 and not 9
-Updated WireGuard
-Many more bug fixes and Optimizations --> GitHub

Sphinx v2.3
-Linux Upstream to 4.9.148
-Merge CAF Tag 'Merge tag ''LA.UM.7.3.r1-06600-sdm845.0' into kernel.lnx.4.9.r11-rel ~8.000 Changes
-Merge Lineage OS Changes
-Compiled with LATEST sdClang 6.0.9 from Qualcomm
-Merged 8.12.27 Touch Firmware
-Many ufs (mobile ssd) improvements
-Added Anxiety I/O Scheduler
-Improved Dyanamic Schedtune frequency scaling
-Patched some memory Leaks
-Some Battery improvement commits
-Updated WireGuard
-Many more changes --> check GitHub

Sphinx v2.4
-Upstream CAF/Linux version to 4.9.151
-Merged some commits for performance improvement
-Added High Brightness Support
-Merged some commits that improved wakelocks
-Enabled Nap Mode for Adreno 630 GPU
-Adjusted Energy Model to be inline with Pixel 3
-Added BFQ I/O Scheduler v8r10
-Fixed issue with stuck frequencies
-Massive refinement of pre-configured settings. (Note 1)
-Removed TouchBoost control from userspace
-Merged many Scheduler commits
-Merge Some EAS improvement commits
-Merged Touchscreen Drivers from Official Xiaomi's Pie Kernel release.
-Merge Lineage 16.0 Changes
-Update WireGuard
-Many more commits --> Check GitHub

Sphinx v2.5
-Upstreamed from 4.9.151 to 4.9.155
-Merged CAF Tag LA.UM.7.3.r1-06700-sdm845
-Merged some Camera improvements (not feature improvements...code improvements. Sphinx is not a camera app)
-Updated Touch Firmware to 9.1.24
-Update display panel drivers from MiCode/dipper-p-oss release
-Updated Wifi drivers
-Updated Sound drivers
-Updated SdFat Driver to v2.1.8 and merged some upstream commits from 4.13
-Updated BFQ I/O Scheduler to v8r12 and also merged mnany fixes
-Improved Cpu-Boost driver
-Reduced the log spam to improve performance
-Merged a commit for entering sleep state quicker
-Merged a commit that will make face unlock much quicker
-Merged a commit that will fix frequency scaling. So now governor's frequency change requests will be followed.
-Added Toggle for disabling newly added devices
-Disabled some TCP Congestion Algorithms to make the image lighter
-Enabled Support for Ralink 27xx / 28xx / 30xx external wifi adapters.
-Merged some Power Efficient Workqueue Changes that can save some battery.
-Fixed a stupid warning that was in dmesg.
-Cleaned the script and also now you do NOT need Root (Magisk) for pre-configured settings to apply. (thanks to @rodries)
-Updated WireGuard Backend
-Merges Lineage's latest sources.
-Many more changes --> Check GitHub

Sphinx v2.6
-Upstreamed to Linux 4.9.162
-Merged CAF TAG LA.UM.7.3.r1-06900-sdm845.0
-Fixed Carrier Video Calling
-Now compiling with Dragon Toolchain based on Clang 9.0.0
-Merged some upstream F2FS commits
-Fixed F2FS Verity.
-Merged some Power Efficient Workqueue commits to save some battery
-Improved Sociopath TCP Algorithm
-Merged some TCP improvement commits
-Enabled MIN_CAPACITY_CAPPING feature
-Added an extra option for Dynamic Schedtune Boost Duration in /sys/module/cpu_boost/parameters/dynamic_stune_boost_ms and improved the code.
-Merged some more Dynamic SchedTune Boost improvement commits.
-Fixed HDR Issue after watching Youtube
-Added K-Lapse Feature
-Merged Lineage 16 Branch
-Updated WireGuard
-Improved Default Settings and fixed some of them not sticking.
-Many More --> Check GitHub

Sphinx v2.7
-Upstreamed to Linux 4.9.166
-Improved Frequency switching
-Improved Bluetooth performance
-Improved K-Lapse
-Added some more Power Efficient Workqueues
-Merged some ufs improvements
-Checked out ion to Android Q Developer Preview 1
-Fixed usb tethering.
-Merged some wakelock power saving commits
-Merged Lineage 16 Branch
-Updated WireGuard
-Many More --> Check GitHub

Sphinx v2.8
-Upstreamed to Linux 4.9.172
-Merged CAF Tag LA.UM.7.3.r1-07400-sdm845.0
-Added MSM Thermal Driver
-Fixed many Clang warnings
-Enabled Ultra Power Saving Mode for the Display Panel
-Increased CMA Memory from 200 MB to 296 MB
-Improved Boot Speed
-Merged many f2fs improvement commits
-Merged some UFS improvement commits
-Merged some Camera driver commits
-Exposed Drop Caches
-Merged Lineage 16 Branch
-Updated WireGuard
-Many More --> Check GitHub

Sphinx v2.9
-Upstream to Linux 4.9.184
-Merged CAF Tag LA.UM.7.3.r1-07900-sdm845.0
-Merged all the latest Security Patches
-Updated Wifi Drivers
-Adapted Some Compilers Flags to make it easier for other developers to compile Sphinx
-Updated TouchScreen Drivers from MIUI 9.6.20
-Merged some GPU fixes
-Updated K-Lapse to Version 5.0
-Fixed some memory leaks and race conditions
-Reverted Simple Thermal Driver (too many issues)
-Fixed random reboots issues
-Fixed Big Cluster stuck at 825 Mhz
-Merged Xbox Controller Drivers and more Gamepad Drivers
-Updated WireGuard Backend
-Merged Lineage 16.0 Branch

Sphinx v3.0
- Upstreamed to Linux 4.9.189
- Now compiling with my Custom GCC-10 Toolchain, built with optimization flags.
- Added Many SDM 845 specific optimization flags
- Merged Lineage 16.0 latest changes
- Merged Many SchedTune Commits
- Added VMStat and set it to 10
- Further Reduced Dirty Rations
- Merged Some UFS upstream Commits
- Improved Random Driver
- Turned off a lot of useless debug info
- Enabled RCU Boost
- Merged CFQ and other I/O improvement Commits
- Merged a bunch of sched Commits
- Added and Enabled SchedTune Assist Driver
- Added and Enabled CPUSet Assist Driver
- Merged some Workqueue commits.
- Added DTS X Eagle Driver.
- Added PSI.
- Fixed Phone rebooting into Fastboot Mode on MIUI Beta.
- Added DriveDroid Support for the first time for Pocophone.
- Added Pocket Judge Driver (this driver determines whether your phone is in your pocket and saves some extra battery)
- Merged a bunch o memory upstream commits.
- Updated WireGuard Backend.
- Many Many Many more commits --> Check GitHub.

Sphinx v3.1
- Upstreamed to Linux 4.9.194
- Merged Lineage 16.0 and 17.0 latest changes
- Updated my GCC 10 Toolchain to yesterdays commits
-Fixed Random Reboot issue
-Android 10 Support
- Added HID Mouse and Keyboard Support (you might need to set kernel to permissive for this to work)
-Zipped up with latest Anykernel3 thanks to @osm0sis
-Updated WireGuard Backend.

The Following 85 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 08:42 PM |#4  
milouk's Avatar
OP Recognized Developer
Athens
Thanks Meter: 4,673
 
Donate to Me
More
Previous Versions
The Following 38 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 08:43 PM |#5  
milouk's Avatar
OP Recognized Developer
Athens
Thanks Meter: 4,673
 
Donate to Me
More
Version 1.7
Ahoy Ladies and Gentlemen.

Time for new version!

Changelog:

1) Upstreamed to Linux Version 4.9.135 - Better Security / Stability / Performance
2) Merged ext4 upstreamed commits - Better System Performance
3) Merged Lineage 16.0 Upstream commits - Better Stability / Battery / Performance
4) Now Compiling with Uber Toolchain 6.4.1 - Better Battery/System Performance
5) Added Zen v2 I/O Scheduler - Better I/O Performance
6) Added TCP Congestion Algorithms (bic, cdg, cubic, westwood, htcp, hstcp, hybla, vegas, scalable, lp, veno, yeah, illinois) default is cdg - Better Internet Performance
7) Improved msm_performance - Better Performance
8) Enabled USB Fastcharge up to 900 mAh - Note (1)
9) Added blu_schedutil - Note (2)
10) Makefile Optimizations - Better Performance
11) Added LED Notification Control- Note (3)
12) Enabled LZ4 Compression Algorithm for Zram - Better Battery / Performance
13) Now Sphinx comes Pre-Configured out of the box for balance
14) Support F2FS File System - If Rom Supports it -

Notes:
Note 1: This is USB Fast Charge which means it works ONLY when you charge from a computer. The default output was 500 mAh and now it's 900 mAh (which is the maximum a usb port can support)
Note 2: This is a new EAS Governor ported from blu_spark Kernel for OnePlus 6. Currently it is almost the same with the schedutil governor from Pixel 3
Note 3: Many of you made some comment about the LED Notification being brighter etc. Now you can configure it yourself. THOUGH there is not interface for that in ANY App, you need to do it yourself.
Specifically:

Code:
     *  /sys/class/leds/white/device/led_fade (rw)
                        0 : blink
                        1 : fade (default)

     *  /sys/class/leds/white/device/led_intensity (rw)

                                        0 : stock intensity
                        1-100 : 0% to 100% of stock intensity
			Note: Does only work for static led, not fading/blinking !!!

     *  /sys/class/leds/white/device/led_speed (rw)

                                        0 : stock speed
                                        1 : continuous notification light
                         2-12 : 2 = very slow to 20 = very fast
I have listened to your requests to bring Sphinx to Poco and did everything in my powers to satisfy most of you and ensure this version is stable so if you enjoy this version don't forget to buy me a coffee
Cheers
The Following 67 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 09:20 PM |#6  
Senior Member
Thanks Meter: 94
 
More
Wow, Amazing. Can i flash this on stock miui beta 8.11.1 also
Great work.
Edit :
Just installed , super smooth. Everything works great so far. Antutu 291328. Not sure if it is placebo but face unlock seems to be faster, haven't been able to see lock screen in the trials I have done so far.
Rom is stock beta 8.11.2 and no root yet.
Will root and tweak with suggested ex kernel manager and report
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2018-11-03-11-55-31-679_com.antutu.ABenchMark.png
Views:	16102
Size:	184.6 KB
ID:	4633221   Click image for larger version

Name:	Screenshot_2018-11-03-11-49-47-421_com.antutu.ABenchMark.png
Views:	16092
Size:	204.1 KB
ID:	4633222  
The Following 5 Users Say Thank You to sanjay0501 For This Useful Post: [ View ] Gift sanjay0501 Ad-Free
2nd November 2018, 09:23 PM |#7  
milouk's Avatar
OP Recognized Developer
Athens
Thanks Meter: 4,673
 
Donate to Me
More
Quote:
Originally Posted by sanjay0501

Wow, Amazing. Can i flash this on stock miui beta 8.11.1 also
Great work.

Of course you can mate
The Following 4 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 09:27 PM |#8  
Senior Member
Flag West Midlands
Thanks Meter: 171
 
More
frequency on big cluster is max on blu schedutil whilst on omnirom
2nd November 2018, 09:27 PM |#9  
Member
Thanks Meter: 16
 
More
thanks sounds really good gonna try it right after i flashed 8.11.1
2nd November 2018, 09:30 PM |#10  
milouk's Avatar
OP Recognized Developer
Athens
Thanks Meter: 4,673
 
Donate to Me
More
Quote:
Originally Posted by Skinpipe

frequency on big cluster is max on blu schedutil whilst on omnirom

Its how it works. It maxes the big but it lowers little cores. Currently its almost a direct copy from Pixel's 3 schedutil. If you dont like this behaviour i would suggest regular schedutil. Regarding blu_schedutil you can read more on its original thread "blu_spark kernel for OnePlus 6"
The Following 4 Users Say Thank You to milouk For This Useful Post: [ View ]
2nd November 2018, 09:31 PM |#11  
Senior Member
Flag West Midlands
Thanks Meter: 171
 
More
Quote:
Originally Posted by milouk

Its how it works. It maxes the big but it lowers little cores. Currently its almost a direct copy from Pixel's 3 schedutil. If you dont like this behaviour i would suggest regular schedutil. Regarding blu_schedutil you can read more on its original thread "blu_spark kernel for OnePlus 6"

ill check it out im familiar with eng.stk' work
Post Reply Subscribe to Thread

Tags
beryllium, kernel, sphinx

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

Advanced Search
Display Modes