[KERNEL] [Android 12] [v12.7] MVK - Maximum Velocity Kernel

Search This thread
No idea what either of those are.

As you can under the pwm section, the pixel 3a uses screen flickering at ~200mz to lower brightness instead of lowering the voltage of the displaywhich can be straining for the eyes. You can check by looking at the pixel screen at low brightness with another camera and you will see a helicopter effect of screen flicker.

Here's an article about pwm & dc dimming: https://www.androidpolice.com/2019/07/24/what-is-dc-dimming-and-why-are-phone-screens-getting-it/

I'll do some research and check if the pulse frequency feature under klapse helps. or that other backlight dimmer option.


Edit: Results

Okay Klapse does work in stopping pwm but it has some downsides. Steps:
1. Set adaptive display brightness off
2. Set brightness to 100% where pwm is not present on the pixel 3a
3. enable klapse mode 2 (brightness dependant mode)
4. set dimming in EX kernel manager to 90% (or whatever you want)
Notes: the problem with this is you have to set brightness through the kernel management app and the min brightness is not as low as stock...

Better alternative: use OLED Saver app. This allows setting brightness manually in the notification tray and even has adaptive brightness built in.
 
Last edited:

nowster

Senior Member
Dec 30, 2012
421
135
I've tried it. It's nice and snappy. However the kernel OOMs crop up regularly.

Code:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sargo/sargo:12/SQ1A.220205.002/8010174:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2022-02-23 09:59:07.269259066+0000
Process uptime: 0s
Cmdline: /system/bin/netd
pid: 1007, tid: 22648, name: Dns_104_10329  >>> /system/bin/netd <<<
uid: 0
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'terminating with uncaught exception of type NSt3__112system_errorE: thread constructor failed: Out of memory'
    x0  0000000000000000  x1  0000000000005878  x2  0000000000000006  x3  00000072516a2fe0
    x4  736f646277641f73  x5  736f646277641f73  x6  736f646277641f73  x7  7f7f7f7f7f7f7f7f
    x8  00000000000000f0  x9  f7871b0bfeea6a58  x10 0000000000000000  x11 ffffff80ffffffdf
    x12 0000000000000001  x13 0000000000000018  x14 000001357c3e583e  x15 000c2e814fa6d0ba
    x16 00000074f18c1050  x17 00000074f189deb0  x18 0000007250f72000  x19 00000000000003ef
    x20 0000000000005878  x21 00000000ffffffff  x22 00000074f18c3330  x23 00000072516a3150
    x24 00000072516a3110  x25 0000007311794ed8  x26 000000727179bb30  x27 0000007311794ed0
    x28 00000074f5ae7173  x29 00000072516a3060
    lr  00000074f1850ba0  sp  00000072516a2fc0  pc  00000074f1850bcc  pst 0000000000000000

backtrace:
      #00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
      #01 pc 00000000001271a0  /apex/com.android.resolv/lib64/libnetd_resolv.so (abort_message+248) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #02 pc 0000000000127a88  /apex/com.android.resolv/lib64/libnetd_resolv.so (demangling_terminate_handler()+212) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #03 pc 0000000000127234  /apex/com.android.resolv/lib64/libnetd_resolv.so (std::__terminate(void (*)())+12) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #04 pc 0000000000127410  /apex/com.android.resolv/lib64/libnetd_resolv.so (__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*)+28) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #05 pc 0000000000127378  /apex/com.android.resolv/lib64/libnetd_resolv.so (__cxa_throw+112) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #06 pc 00000000001e4138  /apex/com.android.resolv/lib64/libnetd_resolv.so (std::__1::__throw_system_error(int, char const*)+96) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #07 pc 00000000001336e4  /apex/com.android.resolv/lib64/libnetd_resolv.so (res_querydomainN(char const*, char const*, res_target*, ResState*, int*)+2792) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #08 pc 00000000001325a4  /apex/com.android.resolv/lib64/libnetd_resolv.so (resolv_getaddrinfo(char const*, char const*, addrinfo const*, android_net_context const*, addrinfo**, android::net::NetworkDnsEventReported*)+2316) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #09 pc 0000000000157d8c  /apex/com.android.resolv/lib64/libnetd_resolv.so (android::net::DnsProxyListener::GetAddrInfoHandler::run()+656) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #10 pc 0000000000151c58  /apex/com.android.resolv/lib64/libnetd_resolv.so (void* android::netdutils::runAndDelete<android::net::DnsProxyListener::Handler>(void*) (.cfi)+328) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #11 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
      #12 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

...
 

ctfrommn

Senior Member
May 25, 2011
7,120
10,504
Minnesota
I've tried it. It's nice and snappy. However the kernel OOMs crop up regularly.

Code:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sargo/sargo:12/SQ1A.220205.002/8010174:user/release-keys'
Revision: 'MP1.0'
ABI: 'arm64'
Timestamp: 2022-02-23 09:59:07.269259066+0000
Process uptime: 0s
Cmdline: /system/bin/netd
pid: 1007, tid: 22648, name: Dns_104_10329  >>> /system/bin/netd <<<
uid: 0
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'terminating with uncaught exception of type NSt3__112system_errorE: thread constructor failed: Out of memory'
    x0  0000000000000000  x1  0000000000005878  x2  0000000000000006  x3  00000072516a2fe0
    x4  736f646277641f73  x5  736f646277641f73  x6  736f646277641f73  x7  7f7f7f7f7f7f7f7f
    x8  00000000000000f0  x9  f7871b0bfeea6a58  x10 0000000000000000  x11 ffffff80ffffffdf
    x12 0000000000000001  x13 0000000000000018  x14 000001357c3e583e  x15 000c2e814fa6d0ba
    x16 00000074f18c1050  x17 00000074f189deb0  x18 0000007250f72000  x19 00000000000003ef
    x20 0000000000005878  x21 00000000ffffffff  x22 00000074f18c3330  x23 00000072516a3150
    x24 00000072516a3110  x25 0000007311794ed8  x26 000000727179bb30  x27 0000007311794ed0
    x28 00000074f5ae7173  x29 00000072516a3060
    lr  00000074f1850ba0  sp  00000072516a2fc0  pc  00000074f1850bcc  pst 0000000000000000

backtrace:
      #00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
      #01 pc 00000000001271a0  /apex/com.android.resolv/lib64/libnetd_resolv.so (abort_message+248) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #02 pc 0000000000127a88  /apex/com.android.resolv/lib64/libnetd_resolv.so (demangling_terminate_handler()+212) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #03 pc 0000000000127234  /apex/com.android.resolv/lib64/libnetd_resolv.so (std::__terminate(void (*)())+12) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #04 pc 0000000000127410  /apex/com.android.resolv/lib64/libnetd_resolv.so (__cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*)+28) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #05 pc 0000000000127378  /apex/com.android.resolv/lib64/libnetd_resolv.so (__cxa_throw+112) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #06 pc 00000000001e4138  /apex/com.android.resolv/lib64/libnetd_resolv.so (std::__1::__throw_system_error(int, char const*)+96) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #07 pc 00000000001336e4  /apex/com.android.resolv/lib64/libnetd_resolv.so (res_querydomainN(char const*, char const*, res_target*, ResState*, int*)+2792) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #08 pc 00000000001325a4  /apex/com.android.resolv/lib64/libnetd_resolv.so (resolv_getaddrinfo(char const*, char const*, addrinfo const*, android_net_context const*, addrinfo**, android::net::NetworkDnsEventReported*)+2316) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #09 pc 0000000000157d8c  /apex/com.android.resolv/lib64/libnetd_resolv.so (android::net::DnsProxyListener::GetAddrInfoHandler::run()+656) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #10 pc 0000000000151c58  /apex/com.android.resolv/lib64/libnetd_resolv.so (void* android::netdutils::runAndDelete<android::net::DnsProxyListener::Handler>(void*) (.cfi)+328) (BuildId: 31c1d6be9c1b74b99d61f7c7c263e927)
      #11 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
      #12 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

...
Can you give me a scenario that causes you issues so I can try to repeat it?

I have never had any practical OOM issues that cause apps to close while using them.
 

nowster

Senior Member
Dec 30, 2012
421
135
Can you give me a scenario that causes you issues so I can try to repeat it?

I have never had any practical OOM issues that cause apps to close while using them.
It's happening with general use. It's a framework restart, not a kernel crash. It usually happens after about 20-30 hours of uptime. There's no obvious correlation other than the uptime.

As you'll see it's crashing inside the DNS resolver.
 

nowster

Senior Member
Dec 30, 2012
421
135
So what is it affecting from a user standpoint?
It drops back to the G google logo. The most recent one had zygote64 crashing with "pthread_create failed for new thread pool worker thread: Out of
memory".

The kernel itself hasn't rebooted.

I think it may occasionally be triggered by plugging in a charger, though I had it crash half way through me doing a two hour run last week.
 

ctfrommn

Senior Member
May 25, 2011
7,120
10,504
Minnesota
It drops back to the G google logo. The most recent one had zygote64 crashing with "pthread_create failed for new thread pool worker thread: Out of
memory".

The kernel itself hasn't rebooted.

I think it may occasionally be triggered by plugging in a charger, though I had it crash half way through me doing a two hour run last week.
Interesting.... I've never seen that in any build
 

Mokura3rd

Member
Jul 26, 2014
34
15
Against my better judgment, I tried installing this on LineageOS 18.1 (A11). Everything seems to be working okay so far, even though Android 12 is the intended target :V
 

Mokura3rd

Member
Jul 26, 2014
34
15
Stay safe and take care of yourself first. The quality of your work speaks for itself. Best of luck confronting whatever faces you.
 
  • Like
Reactions: ctfrommn

ctfrommn

Senior Member
May 25, 2011
7,120
10,504
Minnesota
Looks like the May update is the last official for these phones....sad. I am back working on a new build and it will hopefully be out in the next week.

I started completely over and this will be a much more simplified build when done. A lot of the more experimental commits will be left behind this go round.

If anyone wants pre release builds let me know and I'll link them as I go.
 

Style2010

New member
Apr 23, 2019
3
0
Will there be another kernel update?Google said the latest firmware will be in July 2022.
 
Last edited:

nowster

Senior Member
Dec 30, 2012
421
135
Many many thanks for this.

I've compiled v12.6_r1 myself and it seems OK so far (but due to Magisk updates it hasn't had a full 24 hours yet).
 
  • Like
Reactions: ctfrommn

ctfrommn

Senior Member
May 25, 2011
7,120
10,504
Minnesota
Nearly 48 hours uptime so far. The longest I've had for a while. (y)

With Magisk 24312 and Shamiko 0.5.0 (110).
Yeah, this is a more simplified, less experimental build now. I would love to figure out exactly which memory commit(s) were causing issues for you guys as the commits do add performance but Im pretty happy with the current state.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    v12.6 is up. Custom boost framework with revised settings added back.
    1
    Looked for the answer in both threads so I apologize if answered: does the mvk.img come in a zip form that can be installed via twrp?

    Asking - on Lineage so I get weekly updates - it'd be convenient to keep a zip on the sdcard. Thanks
    No, boot image only. TWRP on pixels hasn't been a thing for years. Plus, how often do you need to flash them? There are kennel apps that allow you to do it right from the phone.
    1
    12.5 for some reason feels like a downgrade on my sargo with android 11...

    min CPU freq locks to ~500Mhz instead of 300Mhz and the battery life is almost twice less then usual

    Reverted back to 12.4: ~12 hours from the last full charge, 4h35m screen time, 50% charge left (12.5 would be dead at this point)

    Sounds more like MVK to me :)
    Not surprising, though my battery life is still roughly the same.

    I cooked up a version with the custom boost settings if you want to try it.

    1
    Just wanted to say that this kernel has made my Sargo run so much smoother on A12 w/ stock rom.

    But since you'll move to another device as the new platform. I'm wondering if you would post a thread about which phone you've purchased. The future platform of this project would be an enticing option to me.

    And again, I appreciate your work very much.
    1
    v12.6_r1 was absolutely and boringly rock solid with firmware 220505.002. No problems at all for the 5 weeks I used it.

    I've just updated to the 220505.006 image and am trying v12.7_r1 with it. Fingers crossed!
  • 17
    For those familiar with Velocity Rom this is the kernel I build for it. Velocity hasnt been on XDA as a rule so Im sure not many are familiar. Velocity is my personal Rom Ive been building for years and have shared with all that are interested. This isnt and will never be an "official development project" but will always exist as long as I continue to develop Android roms.

    Velocity is focussed on speed, stability, and efficiency and not on adding every imaginable feature. As this is my personal Rom it will have everything I deem useful to me and/or that doesnt compromise the goals of the project.

    I dont add every conceivable governor, I/O scheduler, or other user tweakable options. In fact, I typically remove all the options and keep the best. This is designed as a plug and play kernel, not something to be changed. Its also not designed for other Roms.

    Please do not ask for features, ETA's, or related. Again, this is my personal kernel for my personal Rom and will be shared accordingly. That said, I do encourage healthy, friendly dialog in my threads.

    Flashing instructions
    1) Reboot to bootloader
    2) Fastboot boot 'bootimage_name'.img to make sure it boots with no issues
    3) Reboot to bootloader again
    4) Fastboot flash boot 'bootimage_name'.img
    5) Buckle up for safety - optional of course


    Changelog

    Download

    Source
    9
    New build time. I just spent the last month rebasing and rebuilding this. Everything was rethought, tested, and only kept if it objectively and subjectively improved either performance or efficiency. This is up to date with the latest AOSP and Linux kernel sources. This is built off January security but "should" work on older builds as well.

    See changelog for changes and enjoy.
    9
    New build time.....you know the drill.
    9
    Ok, v10.22 is up. This is a much improved, simplified build vs 10.21. I will continue to add, change, tweak, and experiment with things that improve this kernel but Ill never stray too far from my main principles of speed, efficiency, and stability. This is for March security only. Flash over anything else at your own risk.
    8
    New build up. See changelog.......This works on both November and December builds.