No Branch/Tag Specified
r14.1.x
master
feat/kate/php-syntax-heredoc-ident
fix/tde-75
issue/270/tdelibs-V4
feat/new_hwcontrol
feat/tdeio-xattr-support
fix/api-for-python
r14.0.x
v3.5.13-sru
feat/tdehtml+svg
other/string-fixes
feat/fix-suspend-code
r14.1.2
r14.1.1
r14.1.0
r14.0.13
r14.0.12
r14.0.11
r14.0.10
r14.0.9
r14.0.8
r14.0.7
r14.0.6
r14.0.5
r14.0.4
r14.0.3
r14.0.2
r14.0.1
r14.0.0
v3.5.13.2
v3.5.13.1
v3.5.13
Labels
General - need additional info from contributor PR/keep-branch
Pull request - do not delete branch after merging PR/not-ok
Pull request - need fixing PR/rfc
Pull request - request for comments PR/update-trans
Pull request - update to translation files needed PR/wip
Pull request - work in progress RS/R14.0.x
Related to R14.0.x series RS/R14.1.x
Related to R14.1.x series SL/critical
Severity level - critical SL/major
Severity level - major SL/minor
Severity level - minor SL/normal
Severity level - normal SL/regression
Severity level - regression from previous version SL/trivial
Severity level - trivial SL/wishlist
Severity level - wishlist request ST/duplicate
Status - duplicate of another issue ST/invalid
Status - invalid report ST/notourproblem
Status - not our problem ST/rejected
Status - rejected ST/wontfix
Status - won't fix ST/worksforme
Status - works for me, unable to reproduce
Apply labels
Clear labels
GE/need-info
General - need additional info from contributor PR/keep-branch
Pull request - do not delete branch after merging PR/not-ok
Pull request - need fixing PR/rfc
Pull request - request for comments PR/update-trans
Pull request - update to translation files needed PR/wip
Pull request - work in progress RS/R14.0.x
Related to R14.0.x series RS/R14.1.x
Related to R14.1.x series SL/critical
Severity level - critical SL/major
Severity level - major SL/minor
Severity level - minor SL/normal
Severity level - normal SL/regression
Severity level - regression from previous version SL/trivial
Severity level - trivial SL/wishlist
Severity level - wishlist request ST/duplicate
Status - duplicate of another issue ST/invalid
Status - invalid report ST/notourproblem
Status - not our problem ST/rejected
Status - rejected ST/wontfix
Status - won't fix ST/worksforme
Status - works for me, unable to reproduce
No Label
GE/need-info
PR/keep-branch
PR/not-ok
PR/rfc
PR/update-trans
PR/wip
RS/R14.0.x
RS/R14.1.x
SL/critical
SL/major
SL/minor
SL/normal
SL/regression
SL/trivial
SL/wishlist
ST/duplicate
ST/invalid
ST/notourproblem
ST/rejected
ST/wontfix
ST/worksforme
Milestone
Set milestone
Clear milestone
No items
No Milestone
Assignees
Assign users
Clear assignees
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Depends on
#74 tdehwlib: Unify units of battery values.
TDE/tdelibs
#5 Fix units of current consumption value.
TDE/tdepowersave
Reference: TDE/tdelibs#68
Reference in new issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Basic information
Description
According to the Linux power supply class documentation, there are two sets of values –
charge_*
andenergy_*
, the first in µAh and the second in µWh. Thecurrent_now
value is in µA.But in the tdehwlib code we read "some" values and store them in variables, from which we cannot subsequently determine in which units the value was stored there. For example:
In Device Manager at the Trinity Control Center, we state that this is Wh. But on the notebooks I saw, these are the values read from
charge_*
, so they are actually Ah. I have no idea that some batteries actually provideenergy_*
values and do not providecharge_*
values.In addition, when counting the estimated remaining time / time to charge, we count on the value of
current_now
, which is in A. So that would represent a further mixing of units – Wh/A.Similarly, tdepowersave shows a value of
current_now
but states that it is consumption in W.Proposed steps to fix it
charge_*
values, and whether we can omit readingenergy_*
values.current_now
in A.current_now
in A by value ofvoltage_now
in V to present the consumption in W.So some reporting from me related to that topic, as promised:
After I tested two different machines here:
The first is having charge_ but no energy_ entries.
The second is having energy_ but no charge_ entries.
Hope that helps you. 😄
I've got "charge_full" in /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/CMB1
Laptop: Fujitsu P702
Battery: Fujitsu CP671400-01
I think we should choose one unit of measure (for example Ah) and convert to it in case we are reading the other value. For example if we read energy_, we should also read the battery voltage and use that to convert the read value to Ah. This should solve the problem regardless of the case the battery provides charge_ or energy_* values.
Yes, that is exactly what I intend. For now, Ah, A, V seem more suitable for base units. So to solve the problem, Wh and W will be converted to Ah and A.
All related parts have been resolved. Thank you for your comments and testing.