Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save 00xBAD/d2ff01a5f694c4ffe362301afe8fb1c6 to your computer and use it in GitHub Desktop.
Save 00xBAD/d2ff01a5f694c4ffe362301afe8fb1c6 to your computer and use it in GitHub Desktop.
Perform a complete and controlled calibration of the internal battery on the Anbernic RG353V running Rocknix OS.

πŸ“˜ Rocknix Battery Calibration Guide (Anbernic RG353V)

βœ… Objective

Perform a complete and controlled calibration of the internal battery on the Anbernic RG353V running Rocknix OS.


πŸš€ Step-by-Step Guide (Beginner-Friendly)

1. Preparation

  • Fully charge the console if not already done.
  • Ensure SSH access is available.
  • Optionally, use a USB tester to monitor charging current.

2. Set High-Performance Mode (During Drain)

Change these settings via GUI:

  • Start screensaver after: 0 min (disabled)
  • Scaling governor: performance
  • GPU performance profile: best performance
  • Power saving mode: disabled
  • Display brightness: 100% (⚠️ Increases LCD wear, but ensures a fast and clean full-power drain)

πŸ›ˆ Note: Even when the screen is blacked out by the screensaver, the LCD backlight stays on. Use full brightness to force higher drain speed.

3. Start Active Drain

Via SSH:

for i in $(seq 1 4); do while :; do :; done & done

4. Monitor Battery in Real-Time

watch -n 60 'echo -n "⏱  "; date "+%H:%M:%S"; echo -n "πŸ”‹  "; cat /sys/class/power_supply/battery/{capacity,status}; echo -n "⚑  charge_now: "; cat /sys/class/power_supply/battery/charge_now; echo "-------------------------------"'

Wait until the console powers off on its own (0% battery).

5. Cooldown (~15 min)

Let the console cool down before reconnecting to power.

6. Start Charging

Plug the device into power and boot Rocknix. Immediately apply these settings:

  • Display brightness: 5% (black screen still keeps backlight active β€” lowers wear during charge)

  • Restore all other settings to default or:

    • Start screensaver after: 1 min
    • Scaling governor: ondemand
    • GPU performance profile: balanced
    • Power saving mode: default

Monitor battery status as above until:

  • capacity = 100%
  • charge_now β‰ˆ 3,151,000

Then leave the console plugged in for 30 additional minutes (trickle phase).

7. Done!

Unplug the device. Battery is now calibrated and reporting correctly.


πŸ“† Key Timestamps (Example Session)

Phase Time Details
Drain start 08:52 CPU 100% loop started via SSH
50% discharged 10:17:27 charge_now: 1,571,908
23% discharged 11:04:31 charge_now: 724,808
10% discharged 11:27:03 charge_now: 308,224
0% / Shutdown 11:45:35 charge_now: 0
Charging start ~13:30 Boot from 0%
50% charged 15:01:39 charge_now: 1,573,284
100% charged 16:44:41 charge_now: 3,150,868
Trickle end 17:15:42 charge_now: 3,150,696

🧠 Technical Appendix (Power Users)

Commands

Drain CPU fully:

for i in $(seq 1 4); do while :; do :; done & done

Monitor battery:

watch -n 60 'echo -n "⏱  "; date "+%H:%M:%S"; echo -n "πŸ”‹  "; cat /sys/class/power_supply/battery/{capacity,status}; echo -n "⚑  charge_now: "; cat /sys/class/power_supply/battery/charge_now; echo "-------------------------------"'

Check CPU load:

htop

Post-charge current (USB tester reference)

  • Active charge: ~1.2A
  • Pre-trickle: ~0.3A
  • Trickle phase: <0.1A, slowly dropping

System Notes

  • charge_full_design: 3,151,000 Β΅Ah
  • Calibration successful with <0.01% deviation
  • yes command not available on Rocknix base system
  • Commands executed via SSH as root
  • No sleep/suspend active during process
  • Final cable removal done manually

Common Notes & Observations

  • πŸ’‘ LCD stays backlit even during blank screensaver β€” only the content is blacked out.

  • πŸ” After reaching 100%, battery status may toggle to Discharging. This is expected: the PMIC disables active charge once full.

  • πŸ“ You can manually calculate % with:

    ( charge_now / charge_full_design ) * 100

🧩 System Info

  • Device: Anbernic RG353V
  • OS: Rocknix build 20250517 (Official)
  • Tools used: SSH, USB tester (optional)

πŸ”š Outcome

Battery is fully calibrated. Charge level reporting is now accurate and matched to the hardware spec.

You can share this guide as a GitHub repo or Gist β€” it may help other Rocknix/Anbernic users.

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