Dasharo / dasharo-issues

The Dasharo issue tracker
https://dasharo.com/
24 stars 0 forks source link

battery bypass mode #843

Closed baptx closed 2 months ago

baptx commented 4 months ago

The problem you're addressing (if any)

On https://www.quora.com/How-often-should-I-charge-my-laptops-battery-to-prolong-its-lifespan/answer/Minhaz-Mahmud, I read "Most laptops now should be smart enough to bypass the battery once it hits 100% and just power the laptop directly." I was told this is not the case currently, that there is no battery bypass mode on my NovaCustom NV41 Series laptop.

Describe the solution you'd like

All computers using Dasharo / coreboot should stop charging / using the battery when it is charged at 100% and the charger is plugged in. This should be the case both for USB and DC charging. There also should be a reliable way to check that the battery is bypassed.

Where is the value to a user, and who might that user be?

Improve battery life of laptop users by not doing unnecessary charge / discharge.

Describe alternatives you've considered

Until there is a battery bypass mode when the battery is charged at 100%, it looks like there is a workaround by plugging out the charger and plugging it back in when the battery is charged above the minimum charge threshold (95% by default : https://docs.dasharo.com/unified/novacustom/features/#charge-thresholds). I was able to keep the battery always at 96% when plugged in (with the message "fully charged" on Debian LXQt), so I guess it means the battery is successfully bypassed if the charge percentage does not change. Maybe this workaround is not needed but it is easier to verify the battery bypass when it is not 100% charged.

Additional context

No response

pietrushnic commented 4 months ago

@baptx thank you for the report. @wessel-novacustom cc

wessel-novacustom commented 4 months ago

@baptx thank you for the report. @wessel-novacustom cc

It has been discussed already and it's planned for a next release, if I'm not wrong.

@macpijan cc

mkopec commented 4 months ago

The NovaCustom laptops have charging circuits that already implement the requested feature. Only very space constrained devices like smartphones do not bypass the battery once it's fully charged. All NovaCustom laptops bypass the battery when it is not charging.

There is one exception, if you have a weak USB-C charger and try to stress the laptop so that it tries to draw more than the charger can provide, the battery will then come online to suply additional power (and turn off immediately when you don't need it anymore). This is a safety feature to prevent overdrawing power from chargers.

wessel-novacustom commented 4 months ago

@mkopec Can you confirm that this is the case for the current firmware versions already?

If so, can we check it with a Linux command that it is not actually charging?

mkopec commented 4 months ago

cat /sys/class/power_supply/BAT0/current_now displays how much current (in microamps) is going through the battery (charging or discharging). When fully charged, the indicator should show 0.

@mkopec Can you confirm that this is the case for the current firmware versions already?

Yes, this is true for current firmware versions

baptx commented 4 months ago

@mkopec So the "battery bypass mode" that was planned for the next firmware release is cancelled since it is already built-in in the hardware?

macpijan commented 3 months ago

@mkopec @wessel-novacustom Can we clarify here and close it? Do you think that we need some documentation update?

wessel-novacustom commented 3 months ago

@macpijan I suggest to explain the battery behaviour when fully charged here.

philipandag commented 2 months ago

Addressing the issue here: https://github.com/Dasharo/docs/pull/864, https://github.com/Dasharo/edk2/pull/155

philipandag commented 2 months ago

The documentation was updated to explain the battery behavior better. Documentation

Additionally some information about setting optimal charge thresholds was be added to the help message in the setup menu and will probably be included in the next release.

You can check the Pull requests for details: https://github.com/Dasharo/docs/pull/864, https://github.com/Dasharo/edk2/pull/155