[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#524901: /usr/lib/kde4/kded_powerdevil.so: powerdevil: kcm modules refuses to start (claims other power manager is running)



Michael Biebl wrote:
> Package: kdebase-workspace-bin
> Version: 4:4.2.2-2
> Severity: normal
> File: /usr/lib/kde4/kded_powerdevil.so
> 
> Hi,
> 
> when I try to configure the power management settings within
> systemsettings, I get the following error message:
> 
> The configuration module can not be started, since there seems to be a
> problem with PowerDevil Daemon. Read below for more details
> Another power manager has been detected...
> 
> No other power manager is running though (kpowersave/powersaved are not
> installed fwiw, gnome-power-manager is not running
> 
> The process claiming org.freedesktop.PowerManagement on the session bus
> resp. org.freedesktop.Policy.Power is in both cases "kded4".
> 

More info, after looking a bit at the code:

powerdevil itself registers the org.freedesktop.Policy.Power dbus interface
in daemon/PowerDevilDaemon.cpp:161

and then has a check in

powerdevil/kcmodule/PowerDevilKCM.cpp:85
if (conn.interface()->isServiceRegistered("org.freedesktop.PowerManagement") ||

conn.interface()->isServiceRegistered("org.freedesktop.Policy.Power")) {
 ...

which subsequently fails.
Registering the org.freedesktop.Policy.Power interface only works, if a relevant
dbus config file is installed. PowerDevil does not install such a dbus config
file, bug powersaved does (/etc/dbus-1/system.d/powersave.conf).
So, indeed, after purging powersave, the kcm module successfully starts.

This of course is not the idea behind org.freedesktop.Policy.Power:
This interface was introduced to allow co-existence of powersaved (a system wide
power management daemon) with a user session power management daemon (like
gnome-power-manager, kpowersave or powerdevil).
powersaved will execute any actions if the org.freedesktop.Policy.Power
interface is grabbed by a process other then powersaved, i.e. a user is logged
into a graphical session.

My suggestion is to fix powerdevil/kcmodule/PowerDevilKCM.cpp:85 and not only
check if conn.interface()->isServiceRegistered("org.freedesktop.Policy.Power"),
but also, if the registered process does not belong to the user session.

Cheers,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: