[KERNEL] Draco Kernel for the OnePlus 7 Pro

How would you rate my kernel in its current state?


  • Total voters
    73
Search This thread

tytydraco

Recognized Developer
Mar 22, 2017
765
1,798
21
kwrwb6Rs.jpg
Hello there! I've been working on a new kernel for the OnePlus 7 Pro that I think our community will enjoy. I hope to bring a new viewpoint to kernel development that hasn't been seen previously in the dev community.

Philosophy
I just wanted to start off with the goal of my kernel. Draco Kernel isn't a feature-rich kernel, nor is it a performance-bias or power-bias kernel. Draco Kernel includes a collection of innovative commits (no backports or upstreams), designed to improve the efficiency of the device. Ideally, I will keep Draco Kernel up-to-date with the OnePlus official source code. The WiFi drivers will be imported from the latest 8.1-r1 CAF tag.

Upstreaming?
The reason I don't upstream is simply because I do not wish to risk instability in the kernel. Most people use their OnePlus as their daily driver, and I wouldn't want any potential panics or data loss due to a bad upstream. I'll leave the upstreaming to CAF and OnePlus, as they have the means for a more in-depth testing method.

Basic Features
Code:
- Minimal debugging and tracing
- No messy upstreams / backports that might cause issues down the line
- Performance and efficiency focused
- Multiqueue I/O scheduling
- Scheduler tweaks and hacks
- CPU governor adjustments
- ZERO in-kernel boosting while maintaining a smooth userspace

Advanced Features

This is just from the first official beta, so this list may change in the future.

Code:
- Remove AVB checks
- Disable SECCOMP (faster syscalls)
- Disable Audit (expensive in Android)
- Use non-blocking random pool
- Target small cluster in Makefile
- Disable IRQ debugging
- Don't use high-priority workqueue for usb policy_engine
- Schedule last-woken task for better cache locality
- Reduce cache pressure to keep cache valid for longer
- Increase vmstat interval to reduce intermittent jitter
- Adjust dirty ratios to writeback dirty pages later rather than sooner
- Do not collect I/O stats from block subsystem
- Don't dump oom_killed tasks
- Do not use UFS for randomness
- Disable ASLR fully by default (performance not benchmarked)
- Disable JTAG debugging by default
- Do not compile HIGHMEM (unused by our system)
- Do not compile watchdog (reduces jitter)
- BFP JIT (better networking performance)
- Increase haptic strength
- Allow GPU to sleep / nap
- Do not compile zRAM (unnecessary for this kernels MM settings)
- Do not perform readahead (proven to improve power and performance by 70%)
- Align scheduler timeslices with jiffies
- Overcommit memory for faster Android start times
- Remove a bunch of debug and tracing that is unnecessary for the kernel
- Remove schedutil hispeed boosting
- Remove iowait boosting (saves a large amount of battery)
- More that I forgot


Downloads
I will be releasing kernel versions on both GitHub Releases and on Telegram in the official group.
GitHub (no sign in): https://github.com/tytydraco/kernel_oneplus_guacamole/releases
Telegram (group): https://t.me/dracokernel
Source code: https://github.com/tytydraco/kernel_oneplus_guacamole

Donate
I am currently seventeen years old, and I am heading to college in the fall. If you appreciate my work and would like to give something back to me, I accept donations via PayPal :D
http://www.paypal.me/LockscreenMods

Contact
I love user feedback; it helps me improve my work for the better.
For kernel feedback or issues, please send a message in the official telegram chat for Draco Kernel: https://t.me/dracokernel.
For personal questions or if you are in need of an urgent response, you can contact me directly on telegram @tytydraco.
For anything else, please email me at [email protected] and we can chat!

Meta
- Toolchain: Latest Available Google Prebuilt Clang (subject to updates)
- Toolchain (companion): GCC 4.9
- Main branch: Android-10-Rebase

Please enjoy my kernel, and join us on the telegram channel!
 
Last edited:

boybkol

Senior Member
Jan 5, 2016
139
25
Jacksonville
Tried this kernel but battery drain is too much and phone is overheating,cluster 3 is stuck at 1841 MHz. Went back to kirisakura.
 

tytydraco

Recognized Developer
Mar 22, 2017
765
1,798
21
So I tried flashing over EvoX earlier,cause, I seen you ask for someone to test on custom r. Here's the results:
It's a no go. Stuck at bootloader and couldn't get out. Tried terminal to boot twrp and it was a fail. Only way out was msm tool back to stock. Not your fault as I've volunteered to do it.

That is concerning. Does flashing other custom kernels on EvoX cause that issue?
 

ZoiraP

Senior Member
Nov 6, 2018
182
241
19
Tokyo, Shibuya
Using Anxiety , better battery than stock. Thanks OP.

---------- Post added at 08:12 AM ---------- Previous post was at 08:02 AM ----------

Would be possible to ad pwrutilx Gov?
 
  • Like
Reactions: tytydraco

ulxerker

Senior Member
Jul 6, 2015
4,210
1,107
Samsung Galaxy S23
Just flashed and testing now, on the first look its pretty good and smooth. Will report back after 1 or 2 days, especially regarding battery life.
 
So I tried flashing over EvoX earlier,cause, I seen you ask for someone to test on custom r. Here's the results:
It's a no go. Stuck at bootloader and couldn't get out. Tried terminal to boot twrp and it was a fail. Only way out was msm tool back to stock. Not your fault as I've volunteered to do it.

Same happen to me roo,,From PE,,tried terminal boot it fail,,try fastboot flash boot,,its work,,then dirty flash PE rom again,,back to normal again,,wait your next kernel,,,
 

ivoe

Senior Member
Same happen to me roo,,From PE,,tried terminal boot it fail,,try fastboot flash boot,,its work,,then dirty flash PE rom again,,back to normal again,,wait your next kernel,,,

Hold the power button and volume up until it reboots,

then hold volume down and power to boot twrp.

This has happened to me way to many times. Take like 10-15secound for the first part
 

terrorspacer

New member
Nov 15, 2019
4
0
Bug

You have a bug in your kernel. My op7p can't read my usb it say's that there was a problem i can only format it and in an other device i have no problem
 

tytydraco

Recognized Developer
Mar 22, 2017
765
1,798
21
BETA #47

- Disable msm_performance and core_ctl
- Activate schedutil's hispeed frequency at 80% usage instead of 90% (lower direct input latency)
- Process I/O on the origin CPU to score a cache hit
- Set readahead to 128KiB instead of 512KiB (flash memory suffers higher latency with higher readahead)
- Check dirty writebacks every 1MiB rather than every 128 KiB (less jitter and keep cache valid longer)
- Reduce cache pressure to 50% (our RAM size can handle it)
- Load balance less tasks per scheduling cycle (lower latency)
- Compile DTBO in the kernel
- Remove iowait boosting from schedutil

CUSTOM ROMS ARE FIXED
Huge thanks to avid_droid and also @kaz205 for helping me test the builds.

Latest builds on github and telegram!
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 41
    kwrwb6Rs.jpg
    Hello there! I've been working on a new kernel for the OnePlus 7 Pro that I think our community will enjoy. I hope to bring a new viewpoint to kernel development that hasn't been seen previously in the dev community.

    Philosophy
    I just wanted to start off with the goal of my kernel. Draco Kernel isn't a feature-rich kernel, nor is it a performance-bias or power-bias kernel. Draco Kernel includes a collection of innovative commits (no backports or upstreams), designed to improve the efficiency of the device. Ideally, I will keep Draco Kernel up-to-date with the OnePlus official source code. The WiFi drivers will be imported from the latest 8.1-r1 CAF tag.

    Upstreaming?
    The reason I don't upstream is simply because I do not wish to risk instability in the kernel. Most people use their OnePlus as their daily driver, and I wouldn't want any potential panics or data loss due to a bad upstream. I'll leave the upstreaming to CAF and OnePlus, as they have the means for a more in-depth testing method.

    Basic Features
    Code:
    - Minimal debugging and tracing
    - No messy upstreams / backports that might cause issues down the line
    - Performance and efficiency focused
    - Multiqueue I/O scheduling
    - Scheduler tweaks and hacks
    - CPU governor adjustments
    - ZERO in-kernel boosting while maintaining a smooth userspace

    Advanced Features

    This is just from the first official beta, so this list may change in the future.

    Code:
    - Remove AVB checks
    - Disable SECCOMP (faster syscalls)
    - Disable Audit (expensive in Android)
    - Use non-blocking random pool
    - Target small cluster in Makefile
    - Disable IRQ debugging
    - Don't use high-priority workqueue for usb policy_engine
    - Schedule last-woken task for better cache locality
    - Reduce cache pressure to keep cache valid for longer
    - Increase vmstat interval to reduce intermittent jitter
    - Adjust dirty ratios to writeback dirty pages later rather than sooner
    - Do not collect I/O stats from block subsystem
    - Don't dump oom_killed tasks
    - Do not use UFS for randomness
    - Disable ASLR fully by default (performance not benchmarked)
    - Disable JTAG debugging by default
    - Do not compile HIGHMEM (unused by our system)
    - Do not compile watchdog (reduces jitter)
    - BFP JIT (better networking performance)
    - Increase haptic strength
    - Allow GPU to sleep / nap
    - Do not compile zRAM (unnecessary for this kernels MM settings)
    - Do not perform readahead (proven to improve power and performance by 70%)
    - Align scheduler timeslices with jiffies
    - Overcommit memory for faster Android start times
    - Remove a bunch of debug and tracing that is unnecessary for the kernel
    - Remove schedutil hispeed boosting
    - Remove iowait boosting (saves a large amount of battery)
    - More that I forgot


    Downloads
    I will be releasing kernel versions on both GitHub Releases and on Telegram in the official group.
    GitHub (no sign in): https://github.com/tytydraco/kernel_oneplus_guacamole/releases
    Telegram (group): https://t.me/dracokernel
    Source code: https://github.com/tytydraco/kernel_oneplus_guacamole

    Donate
    I am currently seventeen years old, and I am heading to college in the fall. If you appreciate my work and would like to give something back to me, I accept donations via PayPal :D
    http://www.paypal.me/LockscreenMods

    Contact
    I love user feedback; it helps me improve my work for the better.
    For kernel feedback or issues, please send a message in the official telegram chat for Draco Kernel: https://t.me/dracokernel.
    For personal questions or if you are in need of an urgent response, you can contact me directly on telegram @tytydraco.
    For anything else, please email me at [email protected] and we can chat!

    Meta
    - Toolchain: Latest Available Google Prebuilt Clang (subject to updates)
    - Toolchain (companion): GCC 4.9
    - Main branch: Android-10-Rebase

    Please enjoy my kernel, and join us on the telegram channel!
    15
    We're out of beta! This is the first official "stable" build.

    - 250 Hz timer (4 ms) (lower latency)
    - Batch multiple times in Anxiety I/O scheduler (more efficient for sync requests)
    - Use exponential frequency selection in schedutil (significantly better frequency selection in terms of UI performance)
    - Smooth WALT predicted load (avoid unnecessary freq spikes)
    - Use shallow idle state (in testing) (may or may not halve idle drain)
    - Normal RCU grace periods after boot
    - Heavy rebase
    - 7T / 7T Pro support added

    As usual, builds are on GitHub Releases and Telegram!
    13
    Beta #80

    - Add custom rom support (use the corresponding build)
    - Do extended merges (was off before; turns out RedHat says its still viable for flash)
    - Disable autogrouping since Android does a better job
    - Patch potential future issue with Anxiety I/O scheduler
    - Use 300hz timer for lower latencies (3.33... ms jiffy)
    - EXPERIMENTAL: Align scheduling periods with our kernel timer

    Without Experimental Commit
    - Every 3.33ms, the scheduler gets an interrupt
    - If 10ms had passed from the previous cycle, check if we should load balance
    Result: ~6.67ms of times where the scheduler could have moved tasks around, but didn't

    With Experimental Commit
    - Every 3.33ms, the scheduler gets an interrupt
    - Perform a load balance check
    Result: Scheduler can take advantage of new loadavg information and reduce load balancing latency three-fold

    Massive shoutout to avid_droid for somehow making time and risking his own device to helping me test custom rom support!
    10
    Release #337 is out!

    - Enable autogrouping (less jitter)
    - Enable write back throttling
    - Disable INET diagnostics
    - Disable CHAR diagnostics
    - Disable NTFS RW (misc)
    - Disable F2FS stat accounting
    - Disable TCP SYN cookies
    - Disable TCP timestamps
    - Do not queue block requests on origin CPU if it's idle
    - Set max block latency to 1ms before throttling
    - Queue block requests on origin CPU
    - Limit perf scanning impact to 5% CPU usage
    - Queue sched entities on origin CPU
    - Don't queue sched entities or origin CPU if it's idle
    - Add back hispeed load and iowait boosting to sugov
    - Set scheduling period to 10ms
    - Give tasks at least 1ms of runtime (10 tasks stable)
    - Don't let sleepers preempt tasks unless they are at a 5ms runtime deficit
    - Don't give sleepers 50% more runtime on wakeup
    - Enable TCP fastopen for everything
    - Switch to userspace low memory killer
    - Use game switch for touchscreen (lower latency)
    - Enable PSI for LMKd
    - Use pfifo_fast for congestion control
    - Enable glove mode by default
    - Disable synthetic core isolation (core_ctl)
    - Rebase out bad changes, improve existing commits

    TL;DR:
    - More CPU time to running tasks
    - Less CPU time to tasks that are mostly asleep
    - More I/O bandwidth for higher priority tasks
    - Less I/O latency
    - Higher chance for cache hits
    - Faster net speed
    - Lower touch latency

    Find the release on GitHub or on @dracokernelrel on telegram.
    6
    Beta #70 is out on GitHub and Telegram!

    - Garbage collect wakelocks
    - Reduce number of wakelocks to lock before scanning for idle ones
    - Start killing wakelocks right away if the current CPU is idle
    - Update Anxiety I/O scheduler
    -- Reduce looping
    -- Remove redundant checks
    - Remove high priority flag for thermal ADC
    - Use LMKd instead of LMK
    - Reduce I/O latency by limiting max requests