Bug#845555: Time left not shown

2017-01-09 Thread Andriy Grytsenko
>Here is an example of what is shown in a tooltip:

>> Battery 0: 97% charged, 0:00 left
>>   Energy full design:   56160 mWh
>>   Energy full:  40930 mWh
>>   Energy now:   39900 mWh
>>   Power now:12804 mW
>>   Current voltage:  12.178 V

Thank you very much for providing this useful info. It appears that
'Power now' is missed in calculations. I hope to fix it soon.



Bug#845555: Time left not shown

2017-01-04 Thread Evgeny Kapun

On 04.01.2017 22:37, Andriy Grytsenko wrote:

Confirming, the fix is not complete. I wonder why it takes them so much time to 
implement such a simple calculation (they have the amount of energy remaining 
and the power consumption, dividing one by the other yields the remaining time).


Actually, I could fix it long ago if it was reproducible in my setup.
Could you provide more info, please, which meters are available and which
are not? Or even patch is more than welcome. Thank you.


Here is an example of what is shown in a tooltip:


Battery 0: 97% charged, 0:00 left
  Energy full design:   56160 mWh
  Energy full:  40930 mWh
  Energy now:   39900 mWh
  Power now:12804 mW
  Current voltage:  12.178 V


So, everything is correct except the "0:00 left" part. Also, if the remaining 
percentage, after rounding, is equal to 100%, remaining time is not shown at all, even if 
the battery is discharging (and the plugin is showing that it is discharging).

Here is the listing of /sys/class/power_supply/BAT0:


total 0
drwxr-xr-x 3 root root0 Jan  4 23:01 .
drwxr-xr-x 3 root root0 Jan  4 23:01 ..
-rw-r--r-- 1 root root 4096 Jan  4 23:01 alarm
-r--r--r-- 1 root root 4096 Jan  4 23:01 capacity
-r--r--r-- 1 root root 4096 Jan  4 23:01 capacity_level
-r--r--r-- 1 root root 4096 Jan  4 23:01 cycle_count
lrwxrwxrwx 1 root root0 Jan  4 23:01 device -> ../../../PNP0C0A:00
-r--r--r-- 1 root root 4096 Jan  4 23:01 energy_full
-r--r--r-- 1 root root 4096 Jan  4 23:01 energy_full_design
-r--r--r-- 1 root root 4096 Jan  4 23:01 energy_now
-r--r--r-- 1 root root 4096 Jan  4 23:01 manufacturer
-r--r--r-- 1 root root 4096 Jan  4 23:01 model_name
drwxr-xr-x 2 root root0 Jan  4 23:01 power
-r--r--r-- 1 root root 4096 Jan  4 23:01 power_now
-r--r--r-- 1 root root 4096 Jan  4 23:01 present
-r--r--r-- 1 root root 4096 Jan  4 23:01 serial_number
-r--r--r-- 1 root root 4096 Jan  4 23:01 status
lrwxrwxrwx 1 root root0 Jan  4 23:01 subsystem -> 
../../../../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Jan  4 23:01 technology
-r--r--r-- 1 root root 4096 Jan  4 23:01 type
-rw-r--r-- 1 root root 4096 Jan  4 23:01 uevent
-r--r--r-- 1 root root 4096 Jan  4 23:01 voltage_min_design
-r--r--r-- 1 root root 4096 Jan  4 23:01 voltage_now


From strace, I see that the plugin tries to access some files that are missing 
here.

Here is the contents of /sys/class/power_supply/BAT0/uevent:


POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=1080
POWER_SUPPLY_VOLTAGE_NOW=12097000
POWER_SUPPLY_POWER_NOW=12677000
POWER_SUPPLY_ENERGY_FULL_DESIGN=5616
POWER_SUPPLY_ENERGY_FULL=4093
POWER_SUPPLY_ENERGY_NOW=3851
POWER_SUPPLY_CAPACITY=94
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=42T4678
POWER_SUPPLY_MANUFACTURER=Panasonic
POWER_SUPPLY_SERIAL_NUMBER= 2210


Hope this helps.



Bug#845555: Time left not shown

2017-01-04 Thread Evgeny Kapun

Control: reopen -1

Confirming, the fix is not complete. I wonder why it takes them so much time to 
implement such a simple calculation (they have the amount of energy remaining 
and the power consumption, dividing one by the other yields the remaining time).



Bug#845555: Time left not shown

2017-01-04 Thread 128
Hi,

I think the bug is only partially fixed. Charged percentage is shown,
but the time left is always 0:00.

Thanks