icon sometimes gets stuck with full battery
Hi, on my ASUS C201, the icon sometimes gets stuck displaying full battery, whilst it is actually discharging.
This is a fragment of a strace from it while that had happened:
openat(AT_FDCWD,` "/sys/class/power_supply/sbs-20-000b/present", O_RDONLY|O_LARGEFILE) = 10 fstat64(10, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 read(10, "1\n", 4096) = 2 read(10, "", 4094) = 0 close(10) = 0 openat(AT_FDCWD, "/sys/class/power_supply/sbs-20-000b/status", O_RDONLY|O_LARGEFILE) = 10 fstat64(10, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 read(10, "Discharging\n", 4096) = 12 read(10, "", 4084) = 0 close(10) = 0 openat(AT_FDCWD, "/sys/class/power_supply/sbs-20-000b/energy_full", O_RDONLY|O_LARGEFILE) = 10 fstat64(10, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 read(10, "36720000\n", 4096) = 9 read(10, "", 4087) = 0 close(10) = 0 openat(AT_FDCWD, "/sys/class/power_supply/sbs-20-000b/energy_now", O_RDONLY|O_LARGEFILE) = 10 fstat64(10, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 read(10, "35550000\n", 4096) = 9 read(10, "", 4087) = 0 close(10) = 0 openat(AT_FDCWD, "/sys/class/power_supply/sbs-20-000b/power_now", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) clock_gettime(CLOCK_MONOTONIC, {tv_sec=724873, tv_nsec=481562018}) = 0 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN}], 3, 0) = 0 (Timeout)
Based on a quick look at the code, and the "workaround: current rate is not available, estimating rate" message it gives if i run it with -d, it should not be trying to read power_now, so somehow the current rate estimation flag gets disabled when the battery is full (?).
Also: I dont think you would even need to do the estimation on this thing, both "current_now" and "time_to_empty_avg" (and "time_to_full_avg" when charging) (which is what i would like you to report, and which you dont seem to use at all) exist...