[Gta04-owner] Qtmoko gpsd suspend whoes.
Stefan Wildemann
stefan.wildemann at metalstrolche.de
Thu Mar 14 10:14:07 CET 2013
Hello together,
since qtmoko now uses gpsd for gps reception there are some special
things to keep in mind if the device is
going to suspend. This is even more important if you use the gpsd hooks
for rfkill blocking antenna power.
GPSd keeps the gps device (/dev/ttyO1) open for 60 seconds after the
last gpsd client closed connection.
GPSd always does this. There is nothing a client can do to prevent GPSd
from doing this.
This means that with current configuration there is a high probability
to go to suspend with gps device and
antenna enabled causing a power drain.
For Example: Start NeronGps, close NeronGps, immediately suspend the
device. Then the gps device
and antenna is still enabled.
How to prevent this: There is a simple solution next to always wait for
60 seconds.
Just delete the /dev/ttyS1 device from gpsd via it's control socket
before suspend and add it back
afterwards. This will cause gpsd to run the hook script too. gpsdctl
does the trick.
I've set up this by adding "gpsdctl remove /dev/ttyO1" to
/opt/qtmoko/bin/gps-event.sh
and adding "gpsdctl add /dev/ttyO1" to /opt/qtmoko/bin/after-resume.sh
but i am unsure if these are the correct scripts to put this in.
Greetings
Stefan
More information about the Gta04-owner
mailing list