Page 1 of 1

Inhibit power daemon kde4.2 [solved]

Posted: 26 May 2009 22:22
by Nille
When i use vlc in kde4.2 i can't get the "i'm alive" function to work.
I don't want the "lock screen" or something like that to start during an movie which it does currently in kde4.
I have checked the "Inhibit the power management daemon during playback" option but it doesn't change anything when i run kde4.
Now i don't know how vlc handles this since i haven't looked in vlc code.
But i did some google to find out how kde4 handles it because i think that vlc doesn't talk to kde powerdevil in the correct way.
This is what i did find out.
Application developers, you can now easily prevent the PC from suspending. It's enough to call the method "Inhibit" on org.kde.Solid.PowerManagement.Inhibit, specifying your application name and the reason why you want to inhibit. PowerDevil will take care of the rest, including notifying the user when the system tries to suspend.

The method returns an int, that you can use as argument when calling "Uninhibit" on the same interface to get suspension back working.
Later in the same thread.
Bad advice! In fact, KDE developers shouldn't use the D-Bus interface directly
(it's very likely to change at this point, to switch to the fd.o proposal...
need to find time to push that out) but the Solid::PowerManagement namespace
which offers the same services.

@All: Please use Solid::PowerManagement::(begin|stop)SuppressingSleep. For you
the D-Bus interface used is an implementation detail. This way once we make
the switch it'll be transparent for you.
Information source kde-devel: http://lists.kde.org/?l=kde-devel&m=122281043430015

I hope this helps. Nille

Re: Inhibit power daemon kde4.2

Posted: 26 May 2009 22:40
by Jean-Baptiste Kempf
"Solid::PowerManagement::(begin|stop)SuppressingSleep"

Well, I guess this is only for KDE applications... Too bad.

Re: Inhibit power daemon kde4.2

Posted: 26 May 2009 23:03
by Nille
I sent en mail to Dario asking how it should be implemented for non kde apps.

Re: Inhibit power daemon kde4.2

Posted: 26 May 2009 23:30
by Jean-Baptiste Kempf

Re: Inhibit power daemon kde4.2

Posted: 27 May 2009 00:25
by Nille
I run the rc1 but i shall try head and see if it works.

Re: Inhibit power daemon kde4.2

Posted: 28 May 2009 13:48
by Nille
Tried vlc-1.0.0.rc2 and it's fixed in this release.

Re: Inhibit power daemon kde4.2 [solved]

Posted: 28 May 2009 14:23
by Jean-Baptiste Kempf
Great. Topic closed.