Description of problem: the file /etc/acpi/actions/power.sh should be modified to check if KDE's power-management applet (plasmoid) is running. Version-Release number of selected component (if applicable): acpid-1.0.6-9.fc10 Actual results: if the power-button is pressed while running KDE's power-management applet, the system shuts down Expected results: instead of shutting down, the system should present the standard logout/poweroff/restart dialog Additional info: I don't have the skills to fix this so I changed my /etc/acpi/actions/power.sh like so, starting at line 19: # Check that there is a power manager, otherwise shut down. [ "$uid_session" ] || shutdown -h now #[ "$uid_session" ] && #ps axo uid,cmd | \ #awk ' # $1 == '$uid_session' && # ($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/) \ # { found = 1; exit } # END { exit !found } #' || # shutdown -h now In this way, if there's an X11 session running, pushing the power button does not shutdown the system and KDE's power-management plasmoid takes control. I don't have kpowersave installed as this is not the default in KDE 4.2.0.
By the way, this is similar to bug 169476
Also consider guidance-power-manager, which is the F-10/kde default.
For guidance it's easy: # ($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/ || $3 ~ /guidance-power-manager/) \ Question is how to determine PowerDevil status? It's KDED module, so does not appear in list of processes. Some distributions only tests if kded4 process is running - it should be enough assume that some power manager is running but... Another approach is to use DBUS - org.kde.powerdevilsystem.
I vote for kded4 check only. This test should be enough these days.
removing from kde42 blocker, it's not a regression or kde42 specific. the dbus idea looks sounds interesting, but checking for a KDE session, ie, not processing if "${KDE_FULL_SESSION}" == "true" is agreeable too.
I think it's KDE 4 regression - users expect dialog not direct shutdown and it's KDE 4.2 specific too - PowerDevil is new feature and we have to check if it's running. So for me it's blocker :) This check sounds pretty easy but again we have to believe that some power management is running on top of KDE, haven't we? I hope it's 99.9% sure...
It's a regression since F-8 true... :0 but blocking the 4.2 update for this? No.
Will KDE_FULL_SESSION be set at that point? It's only set for processes started from within the session.
You're right, nevermind. dbus queries may be the way to go.
The compromise idea from the kde-sig meeting earlier today was to simply add a check for a "kded4" process (which is what opensuse apparently does here too), so # ($2 ~ /gnome-power-manager/ || $2 ~ /kded4/) \ should do the trick.
I agree with rdieter.edu. I'm going to add two more checks. First one for guidance-power-manager and second one for kded4.
acpid-1.0.6-10.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
All swell now. Thanks a million!!!
As a followup, here's a quick method (Qt-way), to check for PowerDevil's presence: QDBusInterface kdedInterface("org.kde.kded", "/kded", "org.kde.kded"); QDBusReply<QStringList> reply = kdedInterface.call("loadedModules"); if (reply.isValid() && reply.value().contains("powerdevil")) { // we are alive }
But that only works within a session, as it needs to connect to the D-Bus session bus.
(In reply to comment #0) > > In this way, if there's an X11 session running, pushing the power button does > not shutdown the system and KDE's power-management plasmoid takes control. > > I don't have kpowersave installed as this is not the default in KDE 4.2.0. Hi, have you something else that substitute kpowersave , to change CPU Frequency Policy and active schema of power management ? thanks, BTW: kpowersave seems not obey to power manager profiles on system settings
Add a battery plasmoid to the panel. That plasmoid integrates with PowerDevil, which is also what the settings in System Settings are for.
Are you talking about Battery Monitor v1.0 ? Doesn't have nothing but batt status
I'm talking about the applet/widget/plasmoid which comes with KDE 4.2.