Version: (using KDE 4.2.4) Installed from: SuSE RPMs Current UPS handling software is not user friendly (nut) or not usable (knutclient). I think Powerdevil is the ideal place to handle UPS' configuration/monitoring with a good UI. Most of the settings of a battery-powered laptop can be applied to a UPS-powered desktop (notifications, shutdown/suspend on critical charge, command execution, ecc.).
I forgot: the most difficult change would be adding/configuring new UPSes (or maybe this can be done automatically).
*** This bug has been confirmed by popular vote. ***
Why is this bug not a higher priority? powerdevil definitely needs to find the UPS and manage it as a battery just like gnome-power-manager does. Right now, I don't have a way (mind you, kde way) to manage events for my UPS. Power goes, my desktop doesn't do anything.
Well, if you aren't scared by editing text files as root, you can install NUT and configure it for your UPS (editing files in /etc/ups/). You need to specify the correct driver yourself, so you'll need some trial and error. Once you have NUT up, you PC shuts down when power is down and battery goes <30% or so. You can monitor the UPS with knutclient (an old KDE3 app, unable to configure the UPS). It isn't impossible to do, but it should be way more easy (as GNOME does), it could be all automatic.
But this is basic desktop functionality. Every good DE worth its salt should be doing this before the eye candy that we have gotten used and spent so much resources on in KDE4. I mean if power goes, a good desktop should notify its user, shutdown or hibernate the machine so that nothing gets lost. GNOME does it. Even Windows does it! How shameful is that? I had nut configured and running knutclient when I was using KDE 3.5, and things worked very well. And then I moved to powerdevil with KDE4. And it worked for a while. It would find 2 batteries. One for my mouse, and second for my UPS. It would do everything that gnome-power-manager did. Somewhere along the line came 4.2, and this broke. I could get it to work sometimes by forcing redetection of the USB devices by removing ehci_hcd and uhci_hcd modules and modprobing them again. But that stopped working with 4.2.4 or may be 4.3, don't remember. I think its a bug somewhere. Something changed in the code which broke it. Don't know which part changed. Only the dev who changed the code will know. I can Autostart gnome-power-manager and it sits nicely in the system-tray and works well! But that's one gnome package pulling in tonnes of gnome packages just to get this basic functionality!
I'll just go straight to the point: I don't have an UPS, and I don't know how to handle it. If I had one, I could implement this, but since I don't, I really don't want to introduce a feature (and consequent bugs) I can't test personally. It's a forced decision on my side - just to clear the point, it's like me developing software for Mac OS without having a Mac to test it. I really can't rely on user feedback only, as it is really asking for trouble and broken software. So unless somebody with an UPS stands up and implement this, or somebody likes to donate me an UPS, this won't happen, at least from my side. About your issue from 4.2 on, now powerdevil detects only primary batteries as valid ones. So probably implementing UPS, if things worked like you said, is probably a very easy task and could be a good JJ for a newcomer with an UPS on his side to test. Although, the original bug which Marco filed is also about configuring and managing an UPS, for which the same thing I said above applies. P.S.: By the way, UPSs are NOT a basic desktop functionality. And keep saying "shameful" "oh god kde is fail because it does not support ups", more than being ridicolous, does not help your cause.
Dario, Are you the original author of powerdevil?
(In reply to comment #7) > Dario, Are you the original author of powerdevil? ok, scratch that! Sorry!
(In reply to comment #6) > I'll just go straight to the point: I don't have an UPS, and I don't know how > to handle it. If I had one, I could implement this, but since I don't, I really > don't want to introduce a feature (and consequent bugs) I can't test > personally. Hello Dario. I ma the owner of one of these UPSes. So, maybe I can help you to test the code of Powerdevil. As a start point I give it to you reports from solid-hardware command: solid-hardware query 'IS Battery' udi = '/org/freedesktop/Hal/devices/usb_device_51d_2_QB0429138064_if0_hiddev' and details: udi = '/org/freedesktop/Hal/devices/usb_device_51d_2_QB0429138064_if0_hiddev' parent = '/org/freedesktop/Hal/devices/usb_device_51d_2_QB0429138064_if0' (string) vendor = '' (string) product = 'American Power Conversion Back-UPS CS 650 FW:817.v2.I USB FW:v2' (string) Battery.plugged = true (bool) Battery.type = 'UpsBattery' (0x2) (enum) Battery.chargePercent = 100 (0x64) (int) Battery.rechargeable = true (bool) Battery.chargeState = 'NoCharge' (0x0) (enum) It will be very nice if PowerDevil can handle UPS's battery states,put the PC to Powersaving profile and initiate Suspend/Hibernate or Shutdown procedures... If GNOME has this, why KDE don't?
Huh, It seems that I made mistake ;) Powerdevil see my UPS battery (and report them as Number of Batteries 1), but Battery Monitor plasmoid do not! so, I'll report bug to Battery Monitor plasmoid. sorry....
SVN commit 1104658 by bcooksley: Apply the same restrictions in the KCM as we do in the PowerDevil daemon, to ensure that devices we don't monitor aren't shown. CCBUG: 197627 M +6 -1 CapabilitiesPage.cpp M +6 -1 GeneralPage.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1104658
@Dario Freddi: Should that patch be backported?
So, PowerDevil's daemon do not handle UPS battery? In this case, my comment #6 stands still. So, if Dario want to works on implementing UPS controlling to Powerdevil's daemon, I can help with testing with my UPS...
@Zarko: Correct, PowerDevil doesn't handle UPS batteries, it was a user interface bug....
Firstly: Sorry for my bad English. Hello Dario. I'm writing, because I'm another person, who would like to see UPS battery state in KDE SC (Battery Plasmoid). Believe me - IF I would live in your city I would borrow You my UPS for month,two,three and give You six-pack of bear. I don't push You, but please Have it in mind (in future). Thank You.
Hello Dario I would like to see UPS battery state in KDE SC (Battery Plasmoid) too. My reports from solid-hardware command: solid-hardware query 'IS Battery' udi = '/org/freedesktop/Hal/devices/usb_device_51d_2_QB0429138064_if0_hiddev' and details: udi = '/org/freedesktop/Hal/devices/usb_device_51d_2_5B1015T32856_if0_hiddev' parent = '/org/freedesktop/Hal/devices/usb_device_51d_2_5B1015T32856_if0' (string) vendor = '' (string) product = 'American Power Conversion Back-UPS BR 800 FW:9.o5 .I USB FW:o5 ' (string) Battery.plugged = true (bool) Battery.type = 'UpsBattery' (0x2) (enum) Battery.chargePercent = 96 (0x60) (int) Battery.rechargeable = true (bool) Battery.chargeState = 'Charging' (0x1) (enum) How can I help?
(In reply to comment #17) > How can I help? You can't. The owner of this software needs to have a UPS on his desktop for him to write the code. So, unless you can ship a UPS to him, there is no way you can help. Or may be you are developer. Then, you can write the code yourself...;-) If you do write the code, please post it here.
*** Bug 249753 has been marked as a duplicate of this bug. ***
SVN commit 1194864 by dafre: BUG: 197627 Make PowerDevil treat an Ups battery as if it was a standard battery. M +6 -1 powerdevilcore.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1194864
Using trunk and the same issue here
Im using an updated trunk from yesterday and AC continues not being detected, neither the battery state in powerdevil.
i was missing upower. Stil user should be warned that powerdevil requires upower to run. Maybe warn during build or in UI, and also explain it in documentation.
Erm, it does ask for the feature and warn if it isn't there.
When? Where? I never saw anything about it....
Git commit 57c4c504504f3a194a12971080e52afa9218577d by Lamarque V. Souza. Committed on 05/02/11 at 08:09. Pushed by lvsouza into branch 'master'. Treats UPS (uptype == 3) as batteries. Powerdevil still does not treats my UPS as battery but solid-hardware query 'IS Battery' works after this change. It is a start. CCBUG: 197627 M +1 -1 solid/solid/backends/upower/upowerdevice.cpp http://commits.kde.org/kdelibs/57c4c504504f3a194a12971080e52afa9218577d
Git commit 7284d452badac7bc4276842cfbade6a51442c6a6 by Lamarque V. Souza. Committed on 05/02/11 at 16:34. Pushed by lvsouza into branch 'KDE/4.6'. Backport 57c4c504504f3a194a12971080e52afa9218577d by lvsouza from master to the 4.6 branch: Treats UPS (uptype == 3) as batteries. Powerdevil still does not treats my UPS as battery but solid-hardware query 'IS Battery' works after this change. It is a start. CCBUG: 197627 M +1 -1 solid/solid/backends/upower/upowerdevice.cpp http://commits.kde.org/kdelibs/7284d452badac7bc4276842cfbade6a51442c6a6
Git commit c5721519a0ccf8a528bdb31f051509db00e98e0c by Lamarque V. Souza. Committed on 05/02/11 at 20:40. Pushed by lvsouza into branch 'master'. Add UpsBatteries to batterySources so that the Battery plasmoid can monitors them when using UPower backend. CCBUG: 197627 M +4 -2 plasma/generic/dataengines/powermanagement/powermanagementengine.cpp http://commits.kde.org/kde-workspace/c5721519a0ccf8a528bdb31f051509db00e98e0c
"RESOLVED as FIXED"? I don't think so. This is my new ippon smart power pro 2000 as it seen by Solid: $ solid-hardware query 'IS Battery' udi = '/org/freedesktop/Hal/devices/usb_device_665_5161_noserial' $ solid-hardware details '/org/freedesktop/Hal/devices/usb_device_665_5161_noserial' udi = '/org/freedesktop/Hal/devices/usb_device_665_5161_noserial' parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_1d_0' (string) vendor = 'Cypress Semiconductor' (string) product = 'USB to Serial' (string) Battery.plugged = false (bool) Battery.type = 'UpsBattery' (0x2) (enum) Battery.chargePercent = 0 (0x0) (int) Battery.rechargeable = false (bool) Battery.chargeState = 'NoCharge' (0x0) (enum) Looks like Solid was deceived by ippon's way to provide USB support for their products. Actually, UPS was plugged in, was charged to 100%, is rechargeable and was in charging state. Strange thing: "type" was detected correctly, rest parameters were not.
Note that the fixes have only been applied to KDE 4.6, and your use of HAL indicates you probably don't use it.