Recently there has been a period of where gnome-power-manager wasn’t quite as stable and bug free as I would like. The reasons basically boil down to:
- Rewriting the engine to support DeviceKit-power rather than HAL
- Switching to using xbacklight rather than HAL to change the backlight (but falling back to HAL if xbacklight is not available)
- Rewriting the idle interactions to not rely on gnome-screensaver, but instead using gnome-session and X idletime
- Supporting HAL buttons and X buttons, and trying to filter out the duplicates
- Working around the fact that switching the monitor off using DPMS resets the IDLETIME…. urgh.
- Switching to using DeviceKit-power to do the suspend and hibernate, instead of using HAL
So, for the last few months I’ve been essentially trying to do the software equivalent of underpinning a house. I’ve spent the last couple of days adding more self check code, and fixing up the bugs that the new tests have found. Specifically, if your machine randomly switched off your display when you’re working, or when switching sessions didn’t restore your brightness correctly then git master probably might work for you.
Could people that have had problems, please try git master and give me success/failure as comments to the blog comment please. If the idletime and dimming stuff is 100% fixed now, then I’ll backport the fixes to stable and do a new release. Thanks.
p.s. If you change the value of GPM_USE_COMPOSITE in src/gpm-engine.c to 1 and recompile, then multiple batteries might work correctly too. Untested (still waiting for my ultra-bay battery to be delivered), so no promises.
The only problem with 2.26.1 I experience is that I want to have set “Put display to sleep when inactive for” to (for example 1 hour), but when I lock the screen (I don’t use screensaver themes, just a black screen) I want to see the monitor switched off using DPMS immediately, which does not happen. I have to set the above setting to the lowest value (11 minutes) everytime before I want to lock the screen as a workaround.
Ugh, I was just going to mail you asking what was up with my laptop turning its screen off every minute or so ;)
Will try to give git master a try.
I have a question: does every software needs to change the way they keep the session alive to support the new g-p-m? when I play a film in totem my screen goes black after the minutes I set up in g-p-m, and this should not happen
Nicolò: See http://blogs.gnome.org/hughsie/2009/01/28/inhibits-and-the-new-world-order/
Where these changes necessary to land in 2.26? Couldn’t you have waited till they were major enough, like other projects do? I’m sorry to be harsh, but the 2.26 series is totally fucked up! This whole change to DeviceKit-power should have happened slower, like in 2.25 + 2.27 or so. You released a totally buggy software in a branch that’s supposed to be “stable” (whatever that means)…
1. http://en.wikipedia.org/wiki/Overengineering
2. GNOME release policy does not exist anymore
Richard:
It seems current g-p-m git master depends on devkit-power git master but it does not check it in configure stage. The offending bit seems to be dkp_client_lid_is_closed().
Brave testers can work around the unreleased devkit-power by backporting the following 2 patches:
http://cgit.freedesktop.org/DeviceKit/DeviceKit-power/commit/?id=7bd2dfefcb88d2e40402f4e1272dd70255d34b87
http://cgit.freedesktop.org/DeviceKit/DeviceKit-power/commit/?id=0b269ba6e817b17f300ef99239dcc81d4fc61181
I have the same issue as Patryk.
Patryk, the offending commit is this one:
http://git.gnome.org/cgit/gnome-power-manager/commit/?id=90000eb88dbc4ef404f6be0940a0b64572c588ff
for a quick hack, grab that diff and apply it as a reverse patch to your build. (there’s probably a ‘proper’ way to do this with git’s awesomeness, I dunno what it is though ;>)
for anyone on Fedora 11 (or, probably, 12…), here’s some packages:
http://adamwill.fedorapeople.org/gnome-power-manager/gnome-power-manager-2.27.1-0.4.20090529git.fc11.i586.rpm
http://adamwill.fedorapeople.org/gnome-power-manager/gnome-power-manager-2.27.1-0.4.20090529git.fc11.x86_64.rpm
http://adamwill.fedorapeople.org/gnome-power-manager/gnome-power-manager-2.27.1-0.4.20090529git.fc11.src.rpm (just the source in case anyone wants it)
Adam:
I’ve got it to work just after posting the first comment. I’ve tried to post the the links two commits to devkit-power that are enough to make g-p-m fully build and work but it seems the spam filter ate them.
Richard:
I can confirm git master fixed the blackouts for me. Feel free to mail me if you need any harware info.
I don’t know if it’s useful information to you since you’ve probably figured this out by now, but if you look at the source for the xprintidle command, you’ll find their workaround for the DPMS bug. I’ve also written a python extension to get the correct idle time using that code if you’re interested.
_J
@James, thanks for that — the bug is in the xserver and we currently work around it in gnome-power-manager by setting a very small idletime alarm after a dpms state change. Hopefully it can be fixed in the X server without too many problems.
@Michael: We did merge DeviceKit-power support in 2-25. And a lot of those changes happened only in 2-27, not stable branches,
Richard – I take it you’ve seen the several responses on the fedora-test-list thread and in the bug report saying the git build I did hasn’t fixed the problem for them?
Adam, even with the 2.26.2 build from koji?
Glad I stumbled into this article! Finally, got what I was looking for to put on my school report