nintendo-switch-ubuntu-builder icon indicating copy to clipboard operation
nintendo-switch-ubuntu-builder copied to clipboard

Investigate USB charging power

Open cmsj opened this issue 6 years ago • 3 comments

14:23:56 <@SwtcR> tardyp_: you can change the charge current to 1.5A to actually have it charge while in linux 14:24:08 <@SwtcR> echo 1500000 > /sys/somethingorother, don't remember off the top of my head 14:24:17 <@SwtcR> the battery fuel gauge and USB charge controller are supported 14:24:21 <@SwtcR> just not USB-PD for higher power mode 14:24:46 <tardyp_> cool. I'll try that and note it in wiki 14:24:58 <@SwtcR> note that it does not stick across reboots or even just USB reconnects 14:25:04 <@SwtcR> quick hack would be to stick it in a cronjob or something New messages since you tabbed out 14:25:43 <@SwtcR> linux and switchos shouldn't have any issues with battery state 14:25:49 <@SwtcR> there's a dedicated chip for that 14:25:53 <@SwtcR> it doesn't care what the OS is 14:26:05 <@SwtcR> if the battery is being drained without it being reflected, that means it's self-discharging 14:26:20 <@SwtcR> (since the chip measures current, it can't easily tell when the battery self discharges) 14:27:35 <tardyp_> does /sys/class/power_supply/bq24190-charger/charge_term_current rings a bell?

cmsj avatar May 01 '18 13:05 cmsj

14:31:35 <tardyp_> input_current_limit ? 14:31:39 <@SwtcR> yeah that sounds right 14:31:45 <@SwtcR> is it 500mA? 14:31:49 <tardyp_> yes 14:31:51 <@SwtcR> yeah, that

cmsj avatar May 01 '18 13:05 cmsj

Confirmed with a type-c power monitor. Running the following as root will cause the switch to pull 1.5A instead of 0.5A. Tested up to 2.3A

echo 1500000 > /sys/class/power_supply/bq24190-charger/input_current_limit

The downside is you need to run this every time you connect the charger.

It also seems to work with the original switch charger while doing USB-PD at 15v. Starts at 0.5A until the command above is run then goes up to 0.9A.

Ubuntu detects the charging and gives a time estimate without any modifications :)

alistairmackenzie avatar May 06 '18 08:05 alistairmackenzie

We might be able to automate it with a udev rule

cmsj avatar May 06 '18 08:05 cmsj