Version: 1.4 (using KDE KDE 3.2.0)
Installed from: FreeBSD Ports
Arguably this is a bug in my laptop's ACPI implementation but...
When the power is pulled APM reports the ERT (est run time) as 0sec on a 100% full battery :(
After 10 seconds or so it presumably has enough data on load and battery voltage to produce a more realistic estimate, but unfortunately this means I can use klaptop's shutdown feature otherwise my laptop gets powered off when I unplug AC :)
I attempted to work around this myself by hacking the portable.cpp file to report -1 as the ERT if the battery percentage is >10% and the ETR is exactly 0 but it doesn't appear to work, and I can't for the life of me get any debugging happening!
I am more than happy to fiddle with it myself to get it working but I can't actually get any debug output :(
I have tried kdDebug() but the output doesn't go anywhere, both cout and printf() only work for status requests done by the control panel applet, not the dock item (so it seems anyway). Does anyone have any hints?
there's a bunch of related bugs, this description really helps. You don't say what sort of laptop you are using? (Toshibas seem to have problems at the moment) - there is no longer a klaptopdaemon thread/process, it runs inside of kded, you might look inside your ~/.xsession-errors for trace output
Oops sorry, it's a Dell Inspiron 8600 running FreeBSD 5-CURRENT, I use ACPI not APM but the ACPI code provides a compatible interface.
I did look in .xsession-errors (my first guess 8-) but I couldn't see anything :(
I also tried fopen()ing (with append) a logfile, but the only appends I see to it are when I have the control panel applet open, so I came to the conclusion that even if I am fiddling with the right code (/tmp/work/usr/ports/misc/kdeutils3/work/kdeutils-3.2.0/klaptopdaemon/portable.cpp) it's either not getting installed properly, or isn't being reloaded properly.
hmmm - portable.cpp is linked into both the daemon that's run under kded (and does the heavy lifting) and the control panel - you often need to log out and log in again to get the kded daemon to get reloaded (I know it makes development a pain, but the result is much more lightweight).
I must admit I don't know much about the BSD side, someone else did that part of portable.cpp - probably your glitch is different from the ones I'm seeing from other people in the Linux space - I bet that you need to do some filtering in the APM interface code to ignore the first sample or two from the kernel after the power goes away (there's probably a layer of filtering in the kernel that's returning 0 untill it gets a few samples of the battery state)
I've the same problem on an Acer Aspire 1307LC (VT8363/8365 [KT133/KM133]) with Debian Unstable (KDE 3.2.1) with Linux 2.6.4 Vanillia (but i had this problem before with KDE 3.1.5 under Linux 2.5.x since the new ACPI Implementation in Linux)
When I unplug the cable under 3.2, KDE is logging out imediatly :-) ... I have to exit klaptop to prevent it... The Remaining time is wrong too, as reportet above.
I have slightly different problem. Occasionally (not sure under what circumstances) KLaptop reports 0% battery level and shuts down the system. This happens while the laptop is plugged into AC, the icon actually shows the AC icon (not battery) when this happens. The laptop lights also show AC plugged in and battery at full level.
It appears to happen more often when I use a PCMCIA Prism wireless card (but not always).
There is nothing in the kernel or ACPI logs that suggests anything amiss.
The laptop is Toshiba Tecra S1.
(Gentoo - self compiled) Linux 2.6.11 and 2.6.12-rc1 to rc4.
KDE 3.4.0 - up-to-date with latest patches (Gentoo style).
I think I might have solved it for my case (0% battery charge notifications even with AC plugged in). I had the laptop running for around 7 hours now without false notifications.
I noticed that /proc/acpi/event only had user (root) read permissions, adding read permissions for all users seems to have stabilized KLaptop for me... I also chmoded /proc/acpi/dsdt and /proc/acpi/fadt, just in case.
klaptopdaemon has been dropped from KDE 4.x