FORUMS

[r62] arter97 kernel for OnePlus 7 series

3,745 posts
Thanks Meter: 33,996
 
Post Reply Email Thread

arter97 kernel for OnePlus 7 series running OxygenOS


/* Features */

Supports OnePlus 7, OnePlus 7 Pro, OnePlus 7T and OnePlus 7T Pro
Fully rebased kernel without unnecessary OnePlus' code
Latest CAF msm-4.14 kernel fully merged
Using zswap + vnswap to replace zram
- Ditched conventional zram swap approach for more efficient memory operations
- Backported zsmalloc memory allocator from mainline
- Backported zswap compressed page cache from mainline
- Samsung's Galaxy S9 memory modifications merged for better swapping efficiency tuned for Android
Use CONFIG_HZ = 300
Optimized power configuration
BBR as the default TCP network congestion control
vDSO 32 patches to improve 32-bit performance
vmalloc backported from mainline to improve memory allocation performance
Latest Linux 4.14 subversion merged
DM-verity fully disabled (you can remount /vendor to R/W properly)
Timer optimizations
Additional power savings applied to the display panel
RTL8152/8153 USB LAN adapter support
Passes SafetyNet
Built with -O3 speed optimizations
Built with latest GCC
UFS optimizations
Entropy hook on storage removed
Latest mainline f2fs support with GC fixes
CFQ I/O scheduler backported from mainline
Systemless installation (the kernel doesn't touch /system or /vendor)
Modules support disabled for lighter kernel
WireGuard support
Removed RTB(interrupt) logging entirely
No VLAs(info)
A whole lot more...

/* Details */

- Fully rebased kernel without unnecessary OnePlus' code -

This kernel is not based on stock OxygenOS kernel source provided by OnePlus. Instead, it’s based on the latest and greatest Qualcomm has to offer. Only the necessary parts from the OnePlus kernel has been cherry-picked, such as OnePlus 7 specific device drivers.

This brings 2 major changes: less debugging code and an overall lighter kernel.

There are miscellaneous changes made by OnePlus that are supposed to maximize utilization of system memory. But seeing how it’s implemented(heavily relying on zram and a physical writeback swapfile), I decided to remove it entirely.

Users are recommended to disable the “RAM Boost” feature from Settings > System > RAM Boost.

Due to the completely different base, the memory management with this kernel will be drastically different from other kernels.

- Latest CAF msm-4.14 kernel fully merged -

This kernel is also constantly merging the latest Qualcomm Android 4.14 kernel. This tag contains more up-to-date changes from Qualcomm than the regular Snapdragon 855 tag(sm8150).

- Use CONFIG_HZ = 300 -

This changes the context switching interval from 10ms to 3.33ms. Pixel used this for years and Google recommends other vendors to do the same for less jitter.

This is even more important on displays with higher refresh rates.

- Optimized power configuration -

Stock OnePlus configuration forces display-related processes to use the Gold cluster(formerly known as big cores) exclusively.
This configuration brings a huge power regression since it makes every frame dispatch to wake up and use Gold cores.

This kernel resets this profile to use the configuration Google recommends, which is to use the Silver cluster(formerly known as LITTLE cores) exclusively instead. No performance penalty was noticed with this change while massively improving battery life.

- BBR as the default TCP network congestion control -

BBR is a (relatively)new TCP congestion control developed by Google, and it’s regarded as one of the best things you could do to your network configuration. You can find its benefits easily just by Googling BBR. I’ve been personally running BBR for months on various Linux machines including the server running arter97.com and it’s been great.

Now that our Android kernel is running v4.14, I’ve enabled BBR and backported other BBR changes from mainline.

/* Notice */

5G variant is unsupported.
Only OxygenOS is supported, but it is likely that the kernel will work with other ROMs. Though you may encounter minor issues.
Feel free to tip me which commits are needed to fix other ROMs.

/* f2fs */

OnePlus 7T and OnePlus 7T Pro users cannot use f2fs without involving heavy and risky repartitioning operations due to Dynamic Partitions.
r61+ allows using f2fs on OnePlus 7T and OnePlus 7T Pro.

This kernel fully supports f2fs for /data and I encourage everyone to use f2fs with my kernel for better performance.
See here as to why you might want f2fs.

The process differs with T and non-T series.

/* T variants */


The kernel now detects whether the userdata is in f2fs format and patches fstab on boot for OnePlus 7T and 7T Pro users during boot.
This is done in a volatile manner, which means your system files are not modified and using other kernels will revert the effect.
This is half of the puzzle.

The other half of the puzzle is to getting userdata partition into the f2fs format.
Due to lack of a proper recovery for the OnePlus 7T, I patched up f2fs-tools to support formatting while the Android is up and running.
You can use Franco Kernel Manager's flasher to flash the live-formatter.

This obviously removes all data on the device.
Please make sure your data is fully backed-up.


f2fs live-formatter:
https://arter97.com/browse/f2fs/liveformat

Existing f2fs users won't be affected by any of these changes.
Note that the OnePlus 7T and 7T Pro's OxygenOS has an issue handling FBE(File-Based Encryption) with f2fs(which is presumably why they left it out while the OnePlus 7 Pro had it), and encryption will be disabled when you use my kernel's f2fs live-patching feature.

Without encryption, your entire data will be in danger if you lose your device.
Please use f2fs if you understand this trade-off.
(Non-T series users can safely use f2fs with encryption.)


f2fs installation steps:
1. Download and install my kernel.
2. Download and install f2fs live-formatter.

OxygenOS OTA steps:
1. Install OTA and DO NOT reboot.
2. Download and install my kernel using Franco Kernel Manager.
3. Reboot.

Re-format into ext4 steps:
1. Use stock recovery and perform a factory reset.

Re-format into f2fs steps:
1. Use stock recovery and perform a factory reset and turn the userdata back to ext4.
2. Reboot to Android.
3. Download and install f2fs live-formatter using Franco Kernel Manager.


/* Non-T variants */


TWRP is not integrated to the kernel.
Please use a TWRP installer to install TWRP on top of my kernel.

To use f2fs, simply format /data to f2fs with TWRP.

Afterwards, flash f2fs-optimize.zip from http://arter97.com/browse/f2fs/optimize

There’s no need to flash separate zip files for replacing f2fs-tools or fstab.


/* Disclaimer */

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. Hard. A lot.

/* Thanks to */

TheCrazyLex
xboxfanj
kdrag0n
nathanchance - for android-linux-stable

/* Instructions */

1. Read the above. Please.
2. Flash the zip file from your existing TWRP recovery.
2.1. FK Kernel Manager also works for installation. EXKM is unsupported and reported to brick the device due to installation failures.

/* Downloads and links */

r30 and up only supports Android 10
arter97.com
Kernel source

XDA:DevDB Information
arter97 kernel for OnePlus 7, Kernel for the OnePlus 7 Pro

Contributors
arter97
Source Code: https://github.com/arter97/android_k...oneplus_sm8150

Kernel Special Features:

Version Information
Status: Stable

Created 2019-07-28
Last Updated 2020-10-18
The Following 165 Users Say Thank You to arter97 For This Useful Post: [ View ]
29th July 2019, 02:11 AM |#2  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,996
 
Donate to Me
More
/* Changelog */

r62
A major memory management issue fixed for 6GB variants
A scheduler patch from Pixel merged to improve power consumption
Reverted drm changes from July to fix intermittent frame drops (mostly noticeable from app open/close animations)
Linux v4.14.202 merged (includes a fix for critical Bluetooth vulnerability "BleedingTooth")
Thanks to @idkwhoiam322 and @NTLinhHaHa for this release

r61
SELinux is now set to enforcing
f2fs fstab live-patching implemented to allow f2fs on OnePlus 7T and 7T Pro users
Memory swap's aggressiveness tuned to reflect the device's RAM size
Wi-Fi driver backported from LA.UM.9.12.r1-08400-SMxx50.0
(The version jumped from 5.2.03.31A to 5.2.022.4J)
Merged LE.UM.3.3.2-09000-SDX55 tag
OnePlus brain service is disabled in a cleaner manner
Disabled f2fs' background GC

r60
Applied a fix for rare random reboots since r57
The entire SELinux subsystem backported from mainline Linux for better performance and efficiency
(Magisk users must use Magisk v21.0 or the kernel will not boot)

LA.UM.8.1.r1-16000-sm8150.0 merged
Linux v4.14.200 merged
Wi-Fi drivers updated to 5.2.03.31A
Now built with GCC 10.2
2020-09-05 security patch merged
WireGuard updated to v1.0.20200908
Sultan's Simple LMK updated
Merged optimizations from kdrag0n
Latest f2fs-stable merged

r58
LA.UM.8.1.r1-15400-sm8150.0 merged
Linux v4.14.188 merged
Wi-Fi drivers updated to 5.2.03.27R
Minor trivial optimizations

r57
Linux v4.14.186 merged
Wi-Fi drivers updated to 5.2.03.27K
LE.UM.4.3.3.r1-00500-SDX55 tag merged
Minor memory optimization to the graphics drivers (by Yaro330)

r56
Merged OnePlus kernel changes to support optimized charging
Bunch of memory allocations from various subsystems were reworked to perform much better
Now built with GCC 10.1
2020-06-05 security patch merged
Linux v4.14.183 merged
Latest Qualcomm's Android 4.14 kernel merged
Wi-Fi drivers updated to 5.2.03.26Q
WireGuard updated to v1.0.20200520
Sultan's Simple LMK updated
Merged optimizations from kdrag0n
Latest f2fs-stable merged

r54
Switched to Sultan's Simple LMK to fix lags and stalls on memory-pressured scenarios
Disabled scheduler debug for better performance
Reduced memory allocations on network sockets
Reworked and optimized vnswap (renamed to vbswap)
Reworked Wi-Fi configuration
USB UASP enabled
Minor fixes to previous memory optimization commits
LV.AU.0.2.0-01800-gen3meta.0 merged
2020-03-05 security patch merged
Linux v4.14.173 merged
Latest Qualcomm's Android 4.14 kernel merged
Wi-Fi drivers updated to 5.2.03.22Q

r52
Fixed slow boot issue on OnePlus 7T series

r51
Fixed Wi-Fi not working on some devices due to MAC address loading failures
Backported Android ion driver from Snapdragon 865 kernel
Latest f2fs-stable merged
Linux v4.14.170 merged
Latest Qualcomm's Android 4.14 kernel merged
Wi-Fi drivers updated to 5.2.03.19P

r50
Beta details
Cleanly rebased version
OnePlus performance boost hacks removed
Random reboots with WireGuard fixed
Random reboots with f2fs encryption fixed
Added vibration level control (by flar2)
Few patches from LE.UM.4.1.1-02910-sa515m merged including scheduler improvements
LV.AU.0.2.0-00810-gen3meta.0 merged
Latest OnePlus changes merged
Latest f2fs-stable merged
Linux v4.14.163 merged
Latest Qualcomm's Android 4.14 kernel merged
Wi-Fi drivers updated to 5.2.03.18B

r40
OnePlus 7T and OnePlus 7T Pro support added
Added support for flashing via FK Kernel Manager
Major optimizations to touch panel drivers for lower overheads
Merged a zswap patch for faster lookups - better memory swap performance
Disabled unnecessary kernel log writeback debug feature
Linux v4.14.156 merged
Latest Qualcomm's Android 4.14 kernel merged
(LA.UM.8.1.r1-12200-sm8150.0, LA.UM.8.11.r1-01800-NICOBAR.0, LA.UM.8.9.r1-06500-SM6xx.0)
Wi-Fi drivers updated to 5.2.03.15T
exFAT drivers added
WireGuard updated to 20191127

r33
LA.UM.8.1.r1-10700-sm8150.0 merged

r32
Ported patches from Razer Phone 2 to improve touchboost and general performance (by TheCrazyLex)
Linux v4.14.151 merged
Ported patches from LA.UM.8.9.r1-05300-SM6xx.0
Wi-Fi drivers updated to 5.2.03.14L
Memory management patches applied from kdrag0n kernel

r31
Integrated Google Camera AUX mod
(No need to use a separate Magisk Module)
LA.UM.8.1.r1-10300-sm8150.0 merged
Linux v4.14.150 merged
WireGuard updated to 20191012
Backported patches from LA.AU.0.0.2.c1-07610-gen3meta.0

r30
Rebased the kernel for Android 10 (based on LA.UM.8.1.r1-09500-sm8150.0)
Applied zswap + vnswap for replacing zram
Wi-Fi drivers updated to 5.2.03.13O
Linux v4.14.148 merged
Latest OnePlus changes merged
Latest f2fs-stable merged
Backported BBR TCP congestion control patches (by kdrag0n)
Switched to AnyKernel3
r30 won't work with the OnePlus 7T

r25
Linux v4.14.141 merged
Merged additional f2fs bug-fixes
Kernel download size reduced
LA.AU.0.0.1-15710-gen3meta.0 merged as an extension of SDX55 merge (contains various patches including scheduler enhancements)
GPU runtime overhead reduced
Garbled sound with type-C wired headphones fixed
General stability improvements

r24
Fixed a display-related patch introduced in r20 that may cause severe memory leakage and freezes

r23
Fixed yet another recent f2fs rapid GC changes that caused an indefinite wakelock
Reverted TCP backports and cherry-picked relevant BBR commits to fix rare random reboots

r22
Fixed a recent f2fs rapid GC commit that caused an indefinite wakelock
5G support removed due to improper radio support
Linux v4.14.138 merged
Switched to GCC 9.2.0

r21
Merged some performance improvement patches from kdrag0n

r20
Random reboots due to improper TCP backports fixed (thanks to freak07)
Random reboots due to f2fs rapid GC fixed (thanks to ab123321)
Nightscape fixed
Booting issues with OnePlus 7 non-Pro fixed
Support for OnePlus 7 Pro 5G added
Linux v4.14.137 merged
LA.UM.7.1.r1-15800-sm8150.0 merged
Wi-Fi drivers updated to 5.2.03.11J
Latest OnePlus changes merged
Latest f2fs-stable merged with correct encryption patch
Properly disabled userspace lmkd
Qualcomm RmNet extensions added
Enabled power efficient workqueues
Bunch of memory allocations from various subsystems were reworked to perform much better (thanks to Sultan)

r1
Initial release
The Following 46 Users Say Thank You to arter97 For This Useful Post: [ View ]
29th July 2019, 02:12 AM |#3  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,996
 
Donate to Me
More
/* Known issues */

None
The Following 19 Users Say Thank You to arter97 For This Useful Post: [ View ]
29th July 2019, 02:12 AM |#4  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,996
 
Donate to Me
More
/* Telegram */

Join our Telegram group:
https://t.me/joinchat/FW_6TBAlmu0DeMzUDyLkIw
The Following 15 Users Say Thank You to arter97 For This Useful Post: [ View ]
29th July 2019, 02:12 AM |#5  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,996
 
Donate to Me
More
Reserved 4
The Following 15 Users Say Thank You to arter97 For This Useful Post: [ View ]
29th July 2019, 02:12 AM |#6  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,996
 
Donate to Me
More
Reserved 5
The Following 14 Users Say Thank You to arter97 For This Useful Post: [ View ]
29th July 2019, 02:21 AM |#7  
ludester's Avatar
Senior Member
Flag Toronto
Thanks Meter: 164
 
More
I'll be the first. Just formatted my device and rooted it, first kernel im going to test!
29th July 2019, 02:28 AM |#8  
Senior Member
Flag Mississauga
Thanks Meter: 151
 
Donate to Me
More
Wow, very interesting changelog, will be interesting to see how it performs and what others think!

Conflicting decisions between kernel devs it seems on some features, like ZRAM for example.

Looking forward to flashing
29th July 2019, 02:28 AM |#9  
Senior Member
Thanks Meter: 109
 
More
Looking forward to flash, there's no klapse support right?
Edit: Damn this kernel is snappy AF 😃
29th July 2019, 02:31 AM |#10  
TheCrazyLex's Avatar
Inactive Recognized Developer / Forum Leader
Thanks Meter: 8,044
 
Donate to Me
More
Congrats on this release!
The Following 4 Users Say Thank You to TheCrazyLex For This Useful Post: [ View ] Gift TheCrazyLex Ad-Free
29th July 2019, 02:33 AM |#11  
Member
Thanks Meter: 11
 
More
Finally arrived! waiting for it since I know you are about to build one for op7pro.
The Following User Says Thank You to xuelide For This Useful Post: [ View ] Gift xuelide Ad-Free
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