yaml rule to stop suspending when using gps

William Kenworthy billk at iinet.net.au
Wed Feb 25 11:40:18 CET 2009


On Wed, 2009-02-25 at 11:19 +0100, Helge Hafting wrote:
> Johny Tenfinger wrote:
> > So simply use script wrapper to tangoGPS:
> > 
> > #!/bin/sh
> > mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage
> > org.shr.ophonekitd.Usage.RequestResource 'CPU'
> > mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage
> > org.shr.ophonekitd.Usage.RequestResource 'Display'
> > /usr/bin/tangogps
> > mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage
> > org.shr.ophonekitd.Usage.ReleaseResource 'CPU'
> > mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage
> > org.shr.ophonekitd.Usage.ReleaseResource 'Display'
> > 
> > I believe using dbus-send would be faster, if you think mdbus is too
> > slow, please look at it. You also can try to run all of mdbus calls in
> > background by adding "&" on end of each line.
> 
> I tried this, and I put the mdbus calls in the background. (tangogps was
> not in the background, of course.)
> 
> This did not work. Tangogps appeared, but the display turned off
> anyway.
> 
> I have already turned off power management in illume, so it shouldn't
> be doubly managed.
> 
> At first, I guessed that when such a request is put in the background,
> the 'Display' resource might get claimed by the short-lived background 
> process. And then released as this process quits.
> 
> So I removed the & signs, and tried again. And again the backlight was 
> turned off. So no lasting map display. Of course, even a script without 
> "&" will use short-lived processes, it will merely wait on them before 
> executing the next line.
> 
> Then I tried running the commands by hand, and got this:
> $ mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage 
> org.shr.ophonekitd.Usage.ReleaseResource 'Display'
> 
> Service name not found
> 
> 
> Is there a typo in the example, or does shr unstable move things around
> a bit?
> 
> Helge Hafting

Works for me on shr-unstable - however the interactions between illume,
the shr settings app and external dbus calls seems to make suspend and
dim actions ambiguous at times.  Just got to hit on the right
combination ...

BillK







More information about the community mailing list