Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch try to detect automatically broken batteries which tell that they
charge a primary (Laptop) battery with a chargerate higher than 50 W
(50.000 mW), which is IMO in 100% of the cases wrong for Laptop batteries.
Maybe we can also assume a much lower level as criterion.
To get valid remaining time values this patch set in such cases
battery.remaining_time.calculate_per_time=true and calculate the remaining
time based on time and the chargelevel.
|
|
|
|
Fixed device_pm_abstract_props() to set also battery.charge_level.design
since the key is mandatory.
|
|
With commit d7144f2aa1b59f9a0acfa0daada69e2a4ffd54d8 the handling of empty
batteries changed, which cause massive problems with multi battery machines.
In the past the battery.charge_level.percentage key was removed if there where
any problems with calculate the remaining percentage of a battery. This
include the case where the current charge level was 0, which was/is IMO also
wrong, since 0 is a correct value for a percentage.
With the current HAL the battery get set in such cases to 100% which cause
e.g. KPowersave to assume the battery is full and not empty, which also lead
to wrong overall remaining percentage calculation (never reach critical
battery levels, always over 50%) in multi battery systems, which can lead
to crash the complete system if both batteries get empty!
This patch change the code to remove the key again on problems. IMO we
should think about change the behavior if the current charge level is really
0 to set the percentage also to 0. The userspace tools should be able to
handle this!
|
|
This fixes problems with machines which report not the correct charging
state in some cases (e.g. battery report 'charged' if on battery). With this
patch normalised_rate get set only to 0 if:
* the battery is not a primary (ACPI) battery
* the machines is on AC or
* there is in a multi battery system an other primary (ACPI) battery is
discharging
This should fix: https://bugzilla.novell.com/show_bug.cgi?id=258755
|
|
Fix a couple of warnings for unused variables, and include all the correct headers.
No code changes.
|
|
This can't just be put into util_pm as it relies on HalDevice, which we
can't use in addons and probers. It's also needed for other cleanup
patches I'll need for power_supply device class device.
|