This works for me BUT you need to make sure the three definitions are on a new line. So the file /etc/udev/rules.d/99-devterm-charging.rules should look like this. Then, after a reboot my amps went from 0,7A to almost 2A
Individual rules in udev rules files must be on a single line or they’re not parsed and applied correctly. Whatever your udev rule is doing is not what you think it’s doing.
Yeah the ATTR lines in this rule would likely be ignored in this case and the change is probably from some default value being used. We can test this two ways
Use udevadm to check the udev rules that are applied to the device
See udev - ArchWiki for usage examples
Comment out or remove the ATTR lines and see if performance changes. No change means the ATTR lines were not doing anything
Well since this is a place of learning, LETS FIND OUT WHAT WORKS!
---------Testing Methodology------------
rebooted uConsole after each change
measurement taken after reboot, uConsole power ON
fresh uConsole image (official)
in-line USB meter readings constantly change, 3 samples taken at about 10s intervals & averaged
Starting battery charge level reported by uConsole: 72%
NOTE: all tests done with same Amazon Basics 5v 2a wall wart and USB A to C cable because I dont have a C to C in-line USB tester to try a higher power TypeC charger
---------------RESULTS-------------------
Testing @supercom32’s version first
Default (no charging rules file)
4.77v 3.968w 0.80a
Empty file (no rules)
No Change 4.75v 4.101w 0.84a
Rule added KERNEL=="axp20x-battery"
No Change 4.81v 4.012w 0.85a
Rule changed: KERNEL=="axp20x-battery", ATTR{constant_charge_current_max}="2500000"
No Change 4.72v 3.877w 0.82a
Default (no charging rules file)
4.78v 4.120w 0.86a
Empty file (no rules)
No Change 4.74v 4.087w 0.81a
Rule added KERNEL=="axp20x-battery"
No Change 4.79v 4.133w 0.85a
Rule added on new line: ATTR{constant_charge_current_max}="2500000"
No Change 4.82v 4.069w 0.84a
Rule added on new line: ATTR{constant_charge_current}="2400000" 4.72v 6.701w 1.41a
NOTE: This method was consistently slightly higher while charging on my uConsole than supercom32’s method.
Testing each rule by itself
Default (no charging rules file)
4.79v 3.988w 0.79a
Empty file (no rules)
No Change 4.80v 4.010w 0.82a
Rule added KERNEL=="axp20x-battery"
No Change 4.91v 4.107w 0.87a
Removed last rule, added rule: ATTR{constant_charge_current_max}="2500000"
No Change 4.92v 4.32w 0.90a
Removed last rule, added rule: ATTR{constant_charge_current}="2400000"
No Change 4.87v 4.28w 0.84a
Looks like both ATTR are needed for this to work. Edited file like so: ATTR{constant_charge_current_max}="2500000", ATTR{constant_charge_current}="2400000" 4.71v 6.782w 1.45a
Conclusion:
Both ways work, and the uConsole takes longer to reboot than I would like. Will def just reload the udev rules for testing next time im playing with this myself, but wanted to make sure there was no interference in the testing im sharing here.
@SamusAranX you may be interested in these findings too
Just so that everyone can benefit, I just realised that while installing the black power button is ascetically pleasing, it’s really is a beginners trap! I had no idea that there were power and charging LEDs under the button (which is why they provide a clear button option). Since the manual didn’t mention anything about it, I assumed the white buttons was for the other uConsole color scheme.
So if you want to see your power status and charge status, you need to use the white button. Unfortunately, since it’s buried under the entire main-board assembly, you’ll need to take the unit completely apart to access it. So save yourself the trouble and just use it from the start if you want all your LED indicators to be visible.
If anyone is looking through this thread wondering how to just fix the charging current and speed up charging, here’s a canonical one-liner to make it happen:
Run:
echo 'KERNEL=="axp20x-battery", ATTR{constant_charge_current_max}="2200000", ATTR{constant_charge_current}="2000000"' | sudo tee /etc/udev/rules.d/99-uconsole-charging.rules
And reboot.
Note that I’ve chosen a slightly lower current to balance heat with speed. Tune as desired.
Perhaps if someone has the ability, we can simply update the core OS image to have these settings set by default to something sane. This would basically eliminate this whole topic all together.
Yes, most likely fine. The charging circuitry is embedded, so the logic for charging the battery correctly is baked in. It’s most likely just not fully complete with its cycle despite reading 100%. Most Lithium Ion chargers will switch to a constant-voltage mode to top up the battery to the right level, sometimes for a long time, before being completely finished.
by the way i was just wondering, What if we increase the value to be more than 2500000 then will it increase the charging speed or will it explode in my hand.
And if we can increase it then till what value it will be safe