[Pkg-lxde-maintainers] Bug#845555: Time left not shown

Evgeny Kapun abacabadabacaba at gmail.com
Wed Jan 4 20:21:01 UTC 2017


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 root    0 Jan  4 23:01 .
> drwxr-xr-x 3 root root    0 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 root    0 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 root    0 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 root    0 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=10800000
> POWER_SUPPLY_VOLTAGE_NOW=12097000
> POWER_SUPPLY_POWER_NOW=12677000
> POWER_SUPPLY_ENERGY_FULL_DESIGN=56160000
> POWER_SUPPLY_ENERGY_FULL=40930000
> POWER_SUPPLY_ENERGY_NOW=38510000
> 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.



More information about the Pkg-lxde-maintainers mailing list