[feat]: fast charge when connected to PC · Issue #283 · WildKernels/OnePlus_KernelSU_SUSFS · GitHub
Skip to content

[feat]: fast charge when connected to PC #283

Closed

Description

@its0ka

Prerequisites

  • I have searched existing issues and this is not a duplicate.
  • This is a kernel patch/feature request, not a request for KernelSU-Next or SUSFS.

Feature / Patch Name

fast charge when connected to PC

Description

i have op ace 6t, when connected to PC it charges at 2.5w max, but my other phone (laurel_sprout) has an option in smartpack kernel manager to enable 5w charging. i would like to request that feature here

Patch / Source Reference

patch that enables 5w charging for laurel_sprout FlopKernel-Series/flop_trinket-mi_kernel@f95286a

Suggested Implementation (optional)

No response

Additional Context

No response

Activity

  1. added
    enhancement
    on Sep 17, 2026
  2. techIndia-hacker commented on Sep 22, 2026

    @techIndia-hacker

    Also for OnePlus 13

  3. fatalcoder524 commented on Nov 10, 2026

    @fatalcoder524
    Member

    How did you measure the charing wattage? @its0ka

    So that i can replicate the exact steps to verify the changes and safety!

  4. its0ka commented on Nov 10, 2026

    @its0ka
    Author

    @fatalcoder524 accubattery app or a usb cable with power meter.
    iirc at the time of creating this issue i was using your kernel (6.12.38) and i've never seen it charge faster than 2.5w, but sometime after i've updated to the latest official oneplus kernel (6.12.58) and it's pretty strange now: right after plugging the phone to any USB port of my PC it does start charging at 5w, but then if i switch to any other app it will drop to 2w and not return to 5w until replugging. im afraid i'll get a brick if i install an older kernel version now, so i can't re check the behaviour, but i'll try to dig in it sometime later

  5. nullptr-t-oss commented on Nov 11, 2026

    @nullptr-t-oss
    Contributor

    First of all that component is not used in modern OnePlus devices
    On modern OnePlus devices oplus_charger* modules controls the charging; I achieved the same fast charging ( as a toggle ), here are the results

    USB2

    before:

    OP594DL1:/ # cat /sys/class/power_supply/usb/current_max
    900000
    OP594DL1:/ # dmesg | grep -i "set icl" | tail
    [ 6405.422833] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6405.485628] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6411.046462] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6411.108960] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6907.217617] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 6908.770195] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 6908.806167] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6908.869538] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6908.928083] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 6908.989465] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    
    

    after:

    OP594DL1:/ # dmesg | grep -i "set icl" | tail
    [  202.157150] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [  202.224667] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [  213.021496] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [  213.083994] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [  213.156250] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [  213.246472] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [  218.912382] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [  218.975751] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [  219.041787] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [  219.108811] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    OP594DL1:/ #
    
    

    USB3

    before:

    OP594DL1:/ # dmesg | grep -i "set icl" | tail
    [ 1409.270681] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 1410.788227] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 1410.829777] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 1410.893898] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 1410.953692] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 1411.021974] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    OP594DL1:/ # 
    
    
    

    after:

    OP594DL1:/ # dmesg | grep -i "set icl" | tail
    [ 1451.514818] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 1453.030546] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 1453.075195] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 1453.141166] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [ 1453.203424] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [ 1453.269399] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [ 1453.327283] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 1453.391709] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [ 1453.455475] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [ 1453.516219] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    OP594DL1:/ # 
    
    

    Power

    -0.50w to 1.2w when feature is disabled (USB2) ( while screen is on )
    -0.62w to 1.2w when feature is disabled (USB3) ( while screen is on )
    1.7w to 2.9w ( while screen is on ) on USB2
    2.9w to 3.8w ( while screen is on ) on USB3

    NOTE: data monitored using scene app

    Source code

    commit: nullptr-t-oss/android_kernel_modules_and_devicetree_oneplus_sm8550@94dcf51

    to turn on : echo 1 > /sys/module/oplus_chg/parameters/sdp_900ma
    to turn off : echo 0 > /sys/module/oplus_chg/parameters/sdp_900ma

  6. fatalcoder524 commented on Nov 11, 2026

    @fatalcoder524
    Member

    https://github.com/WildKernels/OnePlus_KernelSU_SUSFS/actions/runs/43022031695

    Anyone Intrested can test this build and if it works for you, I will merge this.

    [ 4728.471609] [OPLUS_CHG][battery_chg_update_usb_type_work]oplus_chg_wake_update_work
    [ 4728.472199] [OPLUS_CHG][oplus_chg_variables_reset]charger detect is 1
    [ 4728.492216] [OPLUS_CHG][oplus_chg_turn_on_charging]-----------
    [ 4728.511307] [OPLUS_CHG][oplus_chg_hw_init]boot_mode:0
    [ 4728.523346] [OPLUS_CHG][oplus_chg_set_input_current_with_no_aicl]set icl to 500 mA
    [ 4728.524341] [OPLUS_CHG][oplus_chg_set_float_voltage]vbat = 4164, flv = 4420, tbatt_status = 0
    [ 4728.525197] [OPLUS_CHG][oplus_chg_set_charging_current][BATTERY]LED ON, charging current: 1100
    [ 4728.525203] [OPLUS_CHG][oplus_chg_set_charging_current]set charging current = 1100
    [ 4728.526011] [OPLUS_CHG][oplus_chg_set_input_current_limit][BATTERY]LED STATUS CHANGED, IS ON
    [ 4728.532345] [OPLUS_CHG][oplus_chg_set_input_current_limit] led_on = 1,               current_limit = 900,            led_temp_status = 2,            cool_down = 0,          cool_down_force_5v = 0.
    [ 4728.532358] [OPLUS_CHG][oplus_chg_set_input_current]usb input max current limit=900 setting 00
    [ 4728.543105] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 500 mA
    [ 4728.606044] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 800 mA
    [ 4728.668910] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [ 4728.731110] [OPLUS_CHG][oplus_chg_set_input_current]set icl to 1000 mA
    [ 4728.731135] [OPLUS_CHG][oplus_chg_set_input_current]usb input max current limit aicl chg_vol=4580 j[3]=1000 sw_aicl_point:4550 aicl_end
    [ 4728.775966] [OPLUS_CHG][oplus_chg_smooth_to_soc_v2]current_time is less than update_time 2772ms
    [ 4728.776163] [OPLUS_CHG][oplus_chg_set_charging_current][BATTERY]LED ON, charging current: 1100
    [ 4728.776171] [OPLUS_CHG][oplus_chg_set_charging_current]set charging current = 1100
    
    Screenshot_2026-11-11-20-19-26-61_2826d96988d7a30af4dc0f653c151f4c
  7. its0ka commented on Nov 11, 2026

    @its0ka
    Author

    using stock kernel on op 15r 6.12.58 android 16 and i don't even have /sys/module/oplus_chg, but i do have /sys/module/oplus_chg_v2.
    cat /sys/class/power_supply/usb/current_max does report 2000000 right after plugging the cable, but randomly drops to 500000. just fyi

  8. fatalcoder524 commented on Nov 11, 2026

    @fatalcoder524
    Member

    using stock kernel on op 15r 6.12.58 android 16 and i don't even have /sys/module/oplus_chg, but i do have /sys/module/oplus_chg_v2. cat /sys/class/power_supply/usb/current_max does report 2000000 right after plugging the cable, but randomly drops to 500000. just fyi

    You can test the kernel by flashing Pad 3 or Pad 4 kernel. Since it has 6.12.58! I don't see any issues you might face!

    Also remember, the changes are for SDP only!

    Test needs to be done on normal 2.0 usb ports only!

    Also works on low battery the best.. values can vary depending on ports, cable and temperature!

  9. its0ka commented on Nov 11, 2026

    @its0ka
    Author

    pad 4 version installed. but the module my phone uses is oplus_chg_v2, not oplus_chg

  10. fatalcoder524 commented on Nov 12, 2026

    @fatalcoder524
    Member

    pad 4 version installed. but the module my phone uses is oplus_chg_v2, not oplus_chg

    1. Can you share the dmesg logs! /data/adb/ksu/logs
    2. Can you test with the normal usb port and during test take the log and share it! dmesg -w | grep oplus_chg > /sdcard/Download/oplus_chg.log

    I think it will support both! Just need to verify!

  11. fatalcoder524 commented on Nov 12, 2026

    @fatalcoder524
    Member

    https://github.com/WildKernels/OnePlus_KernelSU_SUSFS/actions/runs/43251941792

    Can you test this and share the logs as before!

    During plugin-out and charging test!
    dmesg -w | grep oplus_chg > /sdcard/Download/oplus_chg.log

    and /data/adb/ksu/logs

    Also share the contents of /proc/sdp900ma

    Edit: Tested on v1 -> works as expected!

  12. fatalcoder524 commented on Nov 13, 2026

    @fatalcoder524
    Member
    130|:/ # cat /proc/sdp900ma
    V2 /soc/oplus,wired: oplus_spec,input-power-mw[1] = 4500 mW = 900 mA at 5000 mV  [OK]
    enabled=1 target=900 mA
    

    dmesg_grep.txt usb was connected at ~17:26:45 and disconnected at ~17:26:55

    /data/adb/ksu/log dmesg.log logcat.log

    so it does say 900ma instead of 500ma now, but in accubattery and on a usb tester i don't see any current increase

    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_set_input_current][8104]): usb input max current limit=900 setting 00
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_set_aicl_point][10496]): curr_aicl = 4100 new aicl 4600
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 100 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 200 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 300 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 400 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 500 mA
    [Fri Nov 13 17:26:46 2026] [ERROR]: OPLUS_CHG[TRACK]([oplus_chg_track_err_subs_callback][13460]): err msg id:20
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 600 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 700 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 800 mA
    [Fri Nov 13 17:26:46 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8037]): set icl to 900 mA
    [Fri Nov 13 17:26:47 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_usb_set_input_current][8069]): usb input max current limit aicl chg_vol=4886 j[9]=900 sw_aicl_point:4620 aicl_end
    [Fri Nov 13 17:26:47 2026] [INFO]: OPLUS_CHG[ADSP]([oplus_chg_8350_set_icl][8457]): set icl to 900 mA
    

    It's working as expected!

    Also remember, the host must be ready to provide 900ma also! Since it's a 2 way communication!

    Edit: USB 3.0 ports can only provide 900ma. USB 2.0 can only provide 500ma as per protocols. But there are some Apple products which don't follow this rule itseems!

    Also OnePlus still limits current in some cases for safety based on temperature, phone usage condition like camera, call etc. Also the updates on non root apps are inaccurate and try to check it using kernel parameters directly. Use an app like Battery Monitor which I used.
    https://f-droid.org/en/packages/codes.swistak.batterymonitor/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions