By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1514

Summary: tdepowersave (nee kpowersave-nohal) don't show battery level on Asus EEE
Product: TDE Reporter: Alex Couture <ac586133>
Component: tdebaseAssignee: Francois Andriot <albator78>
Status: RESOLVED FIXED    
Severity: normal CC: albator78, bugwatch, darrella, kb9vqf, slavek.banko
Priority: P5    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: tdelibs 14.0.0 : fix battery charge detection
tdelibs 14.0.0 : fix remaining time estimation

Description Alex Couture 2013-05-15 19:39:35 CDT
Hi!

On Ubuntu 13.04 with R14 nightlies of May 15,2013, if I plug or unplug my Asus EEE 2G surf, the icon changes to see if it's on AC power or on battery, but it doesn't show the battery level and it flashes to say that the battery is low. I couldn't test it on another laptop, so I can't say if it is hardware-specific.
-Alexandre
Comment 1 Francois Andriot 2013-07-07 12:09:54 CDT
same problem here on Acer Aspire V5.
On startup, kpowersave-nohal show a very low level, orange flashing, saying 1:01h remaining, whereas "acpi" command says more than 90% remaining.
Comment 2 Francois Andriot 2013-07-08 13:00:35 CDT
It looks life files located under /sys/class/power_supply/*/ have been renamed in some kernel/sysfs version.

Tdelibs expect energy_full, energy_full_design and energy_now.
See file: tdelibs/tdecore/tdehardwaredevices.cpp

But on my computer I have no such files.
Instead, I have charge_full, charge_full_design and charge_now .

I just wrote a patch and I'm trying it right now, I'll post it afterward.


For information, on my Aspire V5 running Mageia 3, I have the following files:

$ ls -l /sys/class/power_supply/BAT1/
total 0
-rw-r--r-- 1 root root 4096 juil.  8 19:37 alarm
-r--r--r-- 1 root root 4096 juil.  8 19:37 capacity
-r--r--r-- 1 root root 4096 juil.  8 19:37 charge_full
-r--r--r-- 1 root root 4096 juil.  8 19:37 charge_full_design
-r--r--r-- 1 root root 4096 juil.  8 19:37 charge_now
-r--r--r-- 1 root root 4096 juil.  8 19:37 current_now
-r--r--r-- 1 root root 4096 juil.  8 19:37 cycle_count
lrwxrwxrwx 1 root root    0 juil.  8 19:37 device -> ../../../PNP0C0A:00/
-r--r--r-- 1 root root 4096 juil.  8 19:37 manufacturer
-r--r--r-- 1 root root 4096 juil.  8 19:37 model_name
drwxr-xr-x 2 root root    0 juil.  8 19:37 power/
-r--r--r-- 1 root root 4096 juil.  8 19:37 present
-r--r--r-- 1 root root 4096 juil.  8 19:37 serial_number
-r--r--r-- 1 root root 4096 juil.  8 19:37 status
lrwxrwxrwx 1 root root    0 juil.  8 19:37 subsystem -> ../../../../../../../../class/power_supply/
-r--r--r-- 1 root root 4096 juil.  8 19:37 technology
-r--r--r-- 1 root root 4096 juil.  8 19:37 type
-rw-r--r-- 1 root root 4096 juil.  8 19:37 uevent
-r--r--r-- 1 root root 4096 juil.  8 19:37 voltage_min_design
-r--r--r-- 1 root root 4096 juil.  8 19:37 voltage_now
Comment 3 Francois Andriot 2013-07-08 13:52:22 CDT
Created attachment 1341 [details]
tdelibs 14.0.0 : fix battery charge detection
Comment 4 Slávek Banko 2013-08-01 11:11:02 CDT
Fixed in GIT hash fb86c5c8.
Thank you for the patch.
Comment 5 Francois Andriot 2013-08-15 04:51:05 CDT
This patch has solved the battery level detection, but the estimated battery time remaining still does not work on the same PC.
Comment 6 Francois Andriot 2013-08-15 04:52:32 CDT
Created attachment 1472 [details]
tdelibs 14.0.0 : fix remaining time estimation

The attached patch fixes the time estimation on some distributions.
It also changes some "if" tests in the code, to make more obvious to the developer that there are synonyms files in the SYSFS folder.
Comment 7 Darrell 2013-08-17 19:57:28 CDT
I tested the patch in attachment 1472 [details] on a Thinkpad T400. No build failures or regressions. Pushed to git in commit 52b8aef9.

I notice the tdepowersave remaining battery charge time is inconsistent with conky 1.9.0. That does not mean conky is correct, just that there is a wide gap between the charge times shown by tdepowersave and conky, 10 or more minutes. Conversely, battery discharge time between the two apps are reasonably close, within a few minutes. Is that something that can be tested more rigorously?
Comment 8 Timothy Pearson 2013-08-24 19:21:58 CDT
It looks like all issues reported are resolved in GIT.  Should this report be closed?
Comment 9 Darrell 2013-08-24 20:00:13 CDT
Seems so but probably should wait for the OP to provide feedback.
Comment 10 Darrell 2013-11-12 16:17:04 CST
Closing this report as resolved.