Re: [gpm] gnome-power-manager and DPMS



On Sun, 2006-07-30 at 11:22 +0100, William Waghorn wrote:
> Richard Hughes wrote:
> > On Sun, 2006-07-30 at 10:46 +0100, William Waghorn wrote:
> >   
> >> Richard Hughes wrote:
> >>     
> >>> On Sun, 2006-07-30 at 10:39 +0100, William Waghorn wrote:
> >>>   
> >>>       
> >>>> Of course, all I really want is for the monitor to go directly to
> >>>> 'suspend' and not go onwards to 'off'.  How about a new gconf key with a
> >>>> default value which results in current behaviour, or 'standby',
> >>>> 'suspend' or 'off'?
> >>>>     
> >>>>         
> >>> In gpm-manager.c, ln~564 you should see:
> >>>
> >>> 	/* try to make up some reasonable numbers */
> >>> 	suspend = standby;
> >>> 	off     = standby * 2;
> >>>
> >>> if you change this to:
> >>>
> >>> 	/* try to make up some reasonable numbers */
> >>> 	suspend = standby;
> >>> 	off     = 0;
> >>>
> >>> Does this fix things for you?
> >>>   
> >>>       
> >> Yes, as does:
> >>
> >>     /* try to make up some reasonable numbers */
> >>     suspend = standby;
> >>     off = 0;
> >>     standby = 0;
> >>     
> >
> > Does my snippet work, i.e. without the standby = 0; line?
> >   
> 
> Ok, I see where you're going.  I had applied *exactly* the modification
> you suggest yesterday when I was investigating how best to solve this
> problem.
> 
> As far as I can tell, having standby and suspend set the same is treated
> exactly the same as having standby set to zero.

That's what I figured.

I think the best way to fix this is a boolean gconf key, (default off)
"monitor_dpms_off_broken" that just special cases:

...
manager_init()
dpms_set_off_broken (class, gconfkey ("monitor_dpms_off_broken"))
...
suspend = standby
if (dpms->priv->dpms_off_broken) then
	off = 0
else
	off = standby * 2

Then if your monitor does not support dpms off, then you switch that
gconf key and it should all work as it should, i.e. a one-time pain and
something to put in the help file.

How does that sound?

Richard.





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