You are not logged in.

#1 2009-07-10 07:40:12

Nevon
Member
From: Sweden
Registered: 2009-07-10
Posts: 2
Website

Disabling DPMS

Hello,

My name is Tommy and I'm one of the authors of an application called Caffeine. If you are not familiar with the Mac application Caffeine, here's a brief description. Basically it's an applet that allows you to temporarily disable the screen saver and sleep mode, simply by clicking on it. You can also set it to be active for a set period of time, if you for example, are going to watch a movie and don't want to forget re-enabling the screen saver / sleep mode once you're done. I and a man named Brad Smith have created a free Linux port of this application, and we've just hit the 0.2 mark (kind of).

I'm currently working on making the application work with as many different desktop environments and screensaver applications as possible. When version 0.1 was released, a user of the Ubuntu forums requested that we make Caffeine work on systems without any screensaver system - just DPMS.

Disabling DPMS is very easy. The hard part is knowing whether or not we need to disable dpms. One way would be to run xset -q and check for the line "DPMS is" and then check if it's enabled or disabled. But if the system is using the gnome screensaver and power management, then that handles DPMS - and we don't have to touch it.

Another way would of course be to simply check for the presense of all other screensavers and power managers that we support, and as a last resort check if DPMS is enabled and then disable it - but that could give the user a false indication that it's working, as power management might be off, but the screensaver could still be enabled.

Do you have any idea on how to handle this? If you want to check out how we're doing things right now, you can go here (http://bazaar.launchpad.net/~bnsmith/ca … affeine.py) and check out the function attemptToToggleSleepPrevention().

Offline

#2 2009-07-11 10:25:04

csstaub
Member
From: Switzerland
Registered: 2009-02-09
Posts: 37

Re: Disabling DPMS

What happens if DPMS is being taken care of by a screensaver but you disable it anyway?
Another idea would be that you could just make it a configurable option.

Offline

#3 2009-07-11 12:58:29

Nevon
Member
From: Sweden
Registered: 2009-07-10
Posts: 2
Website

Re: Disabling DPMS

csstaub wrote:

What happens if DPMS is being taken care of by a screensaver but you disable it anyway?

That's what I'm saying. We don't want to touch DPMS is another screensaver is taking care of it. We can't really throw it in as a sort of last resort either ("if it's not gnome-screensaver or xscreensaver, check if dpms is enabled and disable it"), since there's always a chance that a screensaver that we don't recognize is being used.

csstaub wrote:

Another idea would be that you could just make it a configurable option.

Sure. That could be an option. We're trying to minimize the need for the user to configure the application, but if the user isn't using one of the screensavers we recognize - chances are that they don't mind having to click a checkbox for it to work.

Offline

#4 2009-07-11 14:10:30

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Disabling DPMS

i guess the best way is to have a config file and let the user fill it in.

Offline

Board footer

Powered by FluxBB