[r21] arter97 kernel for OnePlus 6T

Search This thread

Timmmmaaahh!

Forum Moderator
Staff member
  • Sep 11, 2012
    4,466
    8,446
    Bruges
    Important note on security with my kernels, please take your time and read.

    I guess this is one of those exceptions when we drop rule #5 😁

    I've never been a fan of permissive SELinux, despite its massive advantages in terms of flexibility. It also messed with payment apps so I ruled it out soon enough (righteously so, as it turns out!). I remember advocating this with RR releases back in my Bacon days.

    Anyhow, thank you for your transparency on the matter. Good luck on figuring it all out and I hope you get back on track soon. And if this is a setback for development, so be it. I'm sure we can all agree that our personal data is just a bit more important opposed to fancy animation tweaks. Besides, we've overcome worse on these grounds.

    If you need any help from the moderator side; we'd be happy to assist.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 38
      arter97.png

      arter97 kernel for OnePlus 6/6T running OxygenOS​

      /* Details */

      Fully rebased kernel with OnePlus' debugging code out
      Latest CAF msm-4.9 kernel fully merged
      This kernel contains more cutting-edge changes from Qualcomm than the regular sdm845 tag
      Latest Linux 4.9 subversion merged
      Use CONFIG_HZ = 300
      - This changes context switching interval from 10ms to 3.33ms
      - Pixel used this for years and Google recommends other vendors to do the same for fewer jitters
      Memory management improved(from Pixel 2 & 3)
      Pixel's lowmemorykiller used
      DM-verity fully disabled (you can remount /vendor to R/W properly)
      Scheduler commits cherry-picked from Pixel 3
      Timer optimizations
      Additional power savings applied to the display panel
      Heavily optimized touch panel source code resulting in reduced touch latency
      RTL8152/8153 USB LAN adapter support
      TWRP integrated with proper f2fs support (see below)
      Other various optimizations from Paranoid Android
      Permissive SELinux
      Passes SafetyNet
      Built with -O3 speed optimizations
      Built with latest GCC
      Westwood as default TCP network congestion control
      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
      Various changes merged from the Razer Phone 2 and Snapdragon 855

      /* Notice */

      Both OnePlus 6 and 6T is supported.
      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.

      Unlike my OnePlus 5/5T kernels before, you are free to flash Magisk after installing the kernel. Kernel does not include Magisk by default.

      /* f2fs */

      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.

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

      To use f2fs, download zip files from http://arter97.com/browse/f2fs

      Flash f2fs_tools_for_twrp.zip from TWRP. This won’t format your /data partition.
      This will replace TWRP's f2fs tools with the latest version and pass the correct parameter to mkfs.f2fs, which is necessary.
      This needs to be done everytime you enter TWRP, if you want to re-format to f2fs.

      After formatting, or flashing a new ROM or an OTA, /vendor’s fstab needs to be changed.
      Flash f2fs_fstab.zip to convert fstab to f2fs again. This won’t format your /data partition.

      /* 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
      Tim Murray
      RenderZenith
      nathanchance - for android-linux-stable

      /* Instructions */

      You can use the zip file to flash the kernel from your existing TWRP recovery.
      If you don't have TWRP installed already, you can use the img file to flash the kernel directly from your PC via fastboot.

      Both methods will install both kernel and modified TWRP recovery.
      You can check if the modified TWRP is installed by looking at TWRP's version name.
      It should say "arter97-f2fs".

      If you use fastboot method(directly flashing img), you will not pass SafetyNet.

      /* Swap variant */

      This kernel has a swap variant for memory-hungry users.
      - Users with 6GB of memory or heavy multi-taskers are recommended to use the new swap variant
      - Ditched conventional zram swap approach and taken zswap+vnswap 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

      /* Downloads and links */

      arter97.com
      Kernel source

      XDA:DevDB Information
      arter97 kernel for OnePlus 6T, Kernel for the OnePlus 6T

      Contributors
      arter97
      Kernel Special Features:

      Version Information
      Status: Stable

      Created 2019-01-25
      Last Updated 2019-10-28
      19
      A yuge beta kernel is up.
      It should be a daily driver material, I'm marking it as a beta just in case a major issue slipped that I didn't notice.

      As always, make a back-up!

      A lot changed in the touch panel drivers. Please feedback if you encounter any gestures/wake-up related issues newly introduced with r15b1.

      Encryption now works with f2fs, albeit with a huge caveat: TWRP may not be able to read /data.
      More info: http://arter97.com/browse/f2fs/encrypted
      The procedures for using FBE with f2fs is the same as before, just use the new zip files to format to f2fs.
      You must re-format if you want to use encryption.
      Since encryption now works, OnePlus 6T users can now use f2fs. Though, I haven't been able to test whether TWRP works with 6T + f2fs(FBE). Keep in mind that it may not.

      This kernel is now VLA-free too. VLA(Variable-Length Array) causes performance regression and may expose potential security holes under the Linux kernel. I've managed to get rid of VLA by porting mainline commits and patching some Qualcomm code myself.
      afaik, I'm the first one to do this on XDA. Spread the word and encourage other developers to get rid of VLAs as well :)
      More info regarding VLA: https://www.phoronix.com/scan.php?page=news_item&px=Linux-Kills-The-VLA

      r15b1
      Linux v4.9.175 merged
      Wi-Fi drivers updated to 5.1.1.71H
      Latest f2fs-stable merged
      LA.UM.7.3.r1-07400-sdm845.0 merged
      LA.UM.7.8.r3-01400-SDM710.0 merged
      Fixed a Qualcomm issue that prevented audio-app stune creation
      Fixed an improper timer operation in fuelguage driver causing battery statistics to not update until 20 minutes after boot
      Merged various patches from Proton kernel by kdrag0n to lower overheads and improve responsiveness (thanks to kdrag0n, sultanxda and ab123321)
      Applied various optimizations to the touch panel drivers
      Now VLA-free
      RCU boost enabled for better responsiveness
      New patches made to f2fs for more efficient GC and trim
      FBE(File Based Encryption) now works with f2fs
      17
      /* Changelog */

      r21
      Boot issue fixed caused by improper switch to AK3
      Brightness issue on exiting AOD fixed
      LA.UM.8.3.r1-06300-sdm845.0 merged
      Diag USB interface enabled for QPST

      r20
      Swap compressor backend(LZ4) updated
      LA.UM.8.3.r1-06100-sdm845.0 merged
      Linux v4.9.196 merged
      Wi-Fi drivers updated to 5.1.1.74O
      Latest f2fs-stable merged

      r19
      OnePlus changes merged including support for DC dimming
      Linux v4.9.189 merged
      Wi-Fi drivers updated to 5.1.1.73W
      LA.UM.7.3.r1-08200-sdm845.0 merged
      LA.UM.7.8.r1-06900-SDM710.0 merged (includes various scheduler improvements)

      r18
      Linux v4.9.186 merged
      Wi-Fi drivers reverted back to stock Snapdragon 845 ones to resolve signal strength issues
      Swap variant's LMK aggressiveness adjusted to use the stock values

      r17b1
      Linux v4.9.185 merged
      LA.UM.7.3.r1-07900-sdm845.0 merged
      LE.UM.3.2.1-00910-SDX24 merged
      Wi-Fi drivers updated to 5.2.03.10Q
      More debugging features removed from Wi-Fi drivers
      Wi-Fi regulatory database taken from OnePlus to fix slow handshakes with 5 GHz APs (by LuK1337)
      Faulty Low Memory Killer fixed to work better and resolve wake-up delays
      General scheduler improvements backported
      Virtual memory allocator performance improved
      Task scheduler debugging disabled properly for lower overheads
      Many parts of the kernel converted to use hotplug state machine
      WireGuard updated to 20190702
      Bunch of memory allocations from various subsystems were reworked to perform much better (thanks to Sultan) (total of 46 patches)
      Debugging features disabled for Adreno GPU drivers to improve performance
      Fixed an issue that was causing charging to be stopped randomly (details)
      Rewritten IOMMU by Sultan reverted to resolve screen flickerings
      Introducing a new swap variant for memory-hungry users
      - Users with 6GB of memory or heavy multi-taskers are recommended to use the new swap variant
      - Ditched conventional zram swap approach and taken zswap+vnswap 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

      r16
      Linux v4.9.180 merged
      Wi-Fi drivers replaced with Snapdragon 855 drivers
      - Switched from 5.1.1 to 5.2.03 release
      - 1810 files changed, 851191 insertions(+), 187458 deletions(-)
      - I've been internally using this for 3 weeks and noticed multiple improvements like faster handshakes and higher throughput without any issues
      Fixed several memory management issues from previous releases
      - This fixes multiple issues including performance regressions(wake-up delays, etc) and radio malfunctions
      - Thanks to @habylab for testing multiple builds prior to release)
      Latest f2fs-stable merged
      LA.UM.7.8.c3-06800-QCS605.0 merged
      LE.UM.3.2.1-18400-SDX24 merged
      Removed f2fs debug tracing codes added by Qualcomm
      qseecom performance improved
      Re-enabled kernel tracers for avoiding janks
      32-bit vDSO added for improving performance on arm32 programs
      Audio kernel updated LA.UM.7.3.r1-07800-sdm845.0

      r15b1
      Linux v4.9.175 merged
      Wi-Fi drivers updated to 5.1.1.71H
      Latest f2fs-stable merged
      LA.UM.7.3.r1-07400-sdm845.0 merged
      LA.UM.7.8.r3-01400-SDM710.0 merged
      Fixed a Qualcomm issue that prevented audio-app stune creation
      Fixed an improper timer operation in fuelguage driver causing battery statistics to not update until 20 minutes after boot
      Merged various patches from Proton kernel by kdrag0n to lower overheads and improve responsiveness (thanks to kdrag0n, sultanxda and ab123321)
      Applied various optimizations to the touch panel drivers
      Now VLA-free
      RCU boost enabled for better responsiveness
      New patches made to f2fs for more efficient GC and trim
      FBE(File Based Encryption) now works with f2fs

      r14
      Wi-Fi drivers updated to 5.1.1.71C
      Disabled some debugging options to improve performance
      Added vibration control
      Added wcd934x sound control

      r13
      Reverted a problematic Wi-Fi drivers optimization causing Wi-Fi to not turn on after some period of time

      r12
      Fixed a faulty memory region removal causing kernel panics
      (Thanks to @habylab for directly testing builds)

      r11
      Reverted a minor Wi-Fi drivers improvement causing kernel panics

      r10
      AnyKernel2 is now being used
      Linux v4.9.168 merged
      Fixed a major memory management regression
      Linux CMA pool size increased for better CMA efficiency
      Improved memory allocation from the Wi-Fi drivers to reduce memory fragmentation
      Fixed occasional kernel crashes(entering dumpmode) on shutdowns

      r9
      Linux v4.9.166 merged
      LE.UM.3.2.1-11600-SDX24 merged
      Use CONFIG_HZ = 300
      - This changes context switching interval from 10ms to 3.33ms
      - Pixel used this for years and Google recommends other vendors to do the same for fewer jitters
      Some changes from Pixel 3’s Q preview kernel
      Some mainline performance improvements to procfs merged
      Removed RTB(interrupt) logging entirely
      WireGuard updated to 20190227
      Stock LowMemoryKiller parameter restored to hopefully fix wake-up delay and general lags
      Fixed bq27541 fuelguage driver to properly work with CONFIG_HZ != 100
      (Fixes various battery-related issues such as displaying -22% on initial boot)
      Reverted a problematic memory management commit causing CMA allocation errors
      Merged LA.UM.7.8.r1-05000-SDM710.0
      Merged LA.UM.7.3.r1-06900-sdm845.0 audio kernel
      Various changes made to f2fs rapid GC to make it more efficient
      dirty_expire_centisecs set to 30 seconds to reduce flash wearouts and power consumption
      Various changes merged from the Razer Phone 2 and Snapdragon 855
      Kernel is now built with -O3 optimization flag

      r8
      Linux v4.9.163 merged
      LE.UM.3.2.1-08000-SDX24 merged
      Wi-Fi drivers updated to 5.1.1.70J
      f2fs updated to 5.1 mainline version
      Disabled qcom_rx_wakelock (details)
      Reworked msm_geni_serial driver
      - Lighter resource usage
      - Lower power consumption upon wake(ISR)
      - Fixed an issue preventing suspend indefinitely
      Various changes from Proton kernel by kdrag0n
      - Use flatmem to save kernel memory usage
      - Use optimized memcmp
      - Optimize rbtree
      - Disable erratum 843419 properly
      - Delay vmstat updating interval to avoid jitter
      - Disable I/O stat accounting completely for lower overheads
      - Reverted a cpuidle change for possible fix for power consumption regression during sleep
      - Faster crypto algorithms ported(chacha20, sha2, crc32)
      A bit lower power consumption by using WFE for long delays
      Add accelerated crc32 routines
      Use -O3 for input drivers for avoiding overheads

      r7
      Linux v4.9.160 merged
      LA.UM.7.3.r1-06900-sdm845.0 merged
      LA.UM.7.8.r1-04800-SDM710.0 Wi-Fi drivers merged
      A totally new kernel base merged - LE.UM.2.3.2-05800-SDX24
      - Total of 1153 commits and about 25,000 lines of code difference
      - A lot has changed ranging from scheduler, memory management, device encryption, GPU and panel handling, UFS device driver, ION, cpuidle, binder and a whole lot more
      OnePlus changes to OxygenOS 9.0.12 merged
      - This includes display panel changes and may affect screen on/off delays
      IRQ balancer settings updated to include UFS interrupts for better overall smoothness
      Some of upstream camera commits applied for more reliable camera operations
      Sultan’s display wake-up optimization re-applied after a bug fix revision

      1.5
      Linux v4.9.158 merged
      Kernel configuration fixed for proper scheduler operation
      OnePlus changes to display panel settings merged
      Faulty screen optimization from Sultan reverted to fix occasional screen-on misses
      Mainline f2fs fixes merged
      LA.UM.7.8.r3-01100-SDM710.0 merged
      - This new tag for Snapdragon 710 includes multiple enhancements over sdm845 tag, most notably scheduler improvements
      WireGuard updated to 20190123
      seccomp disabled in favor of less system-call overheads
      Minor issue with f2fs rapid GC fixed
      Fixed an issue with execprog causing readahead settings to be ignored on some boot
      Modified IRQ balancer settings added for better smoothness

      1.4
      Linux v4.9.154 merged
      ULPS during suspend disabled for (possibly)lower panel power consumption during screen-off
      Audio HAL reworked to fix Type C audio adapter (thanks to @Nezorflame for testing)
      Patch level set back to 2019-01

      1.3
      Linux v4.9.153 merged
      ZIP installation now uses proper security patch level to bypass SafetyNet
      (If you install the kernel by fastboot/IMG method, it won't bypass SafetyNet)
      Merged several changes from Sultan's Pixel 3 kernel
      - Numerous memory leaks fixed
      - GPU performance improved with corrected priority
      - Faster display wake-up
      - Lower power consumption

      1.2
      OnePlus 6T support added - thanks to freshgiammi and nezorflame for testing
      Security level is set to 2025-12(details)

      1.1
      CAF tag LA.UM.7.3.r1-06700-sdm845.0 merged
      Linux v4.9.151 merged
      Wi-Fi issue fixed (thanks to pappschlumpf for tipping me the culprit)
      pstore kernel log is now properly saved
      Custom TWRP integrated
      Readahead set to 128kB to minimize page thrashing
      IMG file is now provided for direct fastboot installation

      1.0
      Initial release
      15
      A new major update is up.
      Several changes with this release directly impacts daily UX.

      I'm not sure it's just me, but the "Instagram/Twitter lag" some users reported seems definitely better with this release.

      BTW, I'm fully aware of decryption on TWRP not working properly with OnePlus 6T. It's extremely cumbersome to work on this as I don't have an actual device. I'll keep this forum updated for progress on TWRP.

      1.5
      Linux v4.9.158 merged
      Kernel configuration fixed for proper scheduler operation
      OnePlus changes to display panel settings merged
      Faulty screen optimization from Sultan reverted to fix occasional screen-on misses
      Mainline f2fs fixes merged
      LA.UM.7.8.r3-01100-SDM710.0 merged
      - This new tag for Snapdragon 710 includes multiple enhancements over sdm845 tag, most notably scheduler improvements
      WireGuard updated to 20190123
      seccomp disabled in favor of less system-call overheads
      Minor issue with f2fs rapid GC fixed
      Fixed an issue with execprog causing readahead settings to be ignored on some boot
      Modified IRQ balancer settings added for better smoothness
      15
      New update is up!
      Most notable things in the changelog are in bold texts.

      Sidenote for those using f2fs:
      I've got a report that my f2fs conversion tools weren't applying appropriate optimizations.
      If you're using f2fs, just flash this zip from the recovery just to make sure you have up-to-date extensions list for f2fs.
      http://arter97.com/browse/f2fs/optimize

      r16
      Linux v4.9.180 merged
      Wi-Fi drivers replaced with Snapdragon 855 drivers
      - Switched from 5.1.1 to 5.2.03 release
      - 1810 files changed, 851191 insertions(+), 187458 deletions(-)
      - I've been internally using this for 3 weeks and noticed multiple improvements like faster handshakes and higher throughput without any issues
      Fixed several memory management issues from previous releases
      - This fixes multiple issues including performance regressions(wake-up delays, etc) and radio malfunctions
      - Thanks to @habylab for testing multiple builds prior to release)
      Latest f2fs-stable merged
      LA.UM.7.8.c3-06800-QCS605.0 merged
      LE.UM.3.2.1-18400-SDX24 merged
      Removed f2fs debug tracing codes added by Qualcomm
      qseecom performance improved
      Re-enabled kernel tracers for avoiding janks
      32-bit vDSO added for improving performance on arm32 programs
      Audio kernel updated LA.UM.7.3.r1-07800-sdm845.0