[Gta04-owner] Rfkill devices needed before suspend?

NeilBrown neilb at suse.de
Sat Apr 7 22:23:01 CEST 2012


On Sat, 7 Apr 2012 15:36:40 +0000 Radek Polak <psonek2 at seznam.cz> wrote:

> At some point Neil Brown wrote:
> 
> > The only times I have seen it happen repeatedly is when the GPS is still on
> > and so repeatedly generating wakeup events.
> > Have you checked that GPS is definitely off when this happens?
> 
> Hi,
> you are right - it was really GPS. Now it happened again. I checked /dev/ttyO1 
> and NMEA was there.
> 
> So i did:
> 
> 	echo 0 >/sys/devices/virtual/gpio/gpio145/value
> 	echo 1 >/sys/devices/virtual/gpio/gpio145/value
> 
> and i could suspend again.
> 
> Interesting is that the GPS must have somehow turned on automatically. I am 
> quite sure i didnt do anything gps related. I am sometimes doing "rfkill block 
> gps" but never unblock it.

I find that GPS is sometimes on when I power-on.  Maybe something very early
is toggling the pin and sometimes it is too fast to work, but sometimes it
isn't.

I currently have this in my startup scripts.

  {
  rfkill block gps
  > /tmp/gps.trace
  gpspipe -r -o /tmp/gps.trace &
  while [ ! -s /tmp/gps.trace ]
  do
     sleep 10
  done
  kill $!
  if [ `wc -l < /tmp/gps.trace` -gt 5 ]
  then
    echo 0 > /sys/class/gpio/gpio145/value
    sleep 0.1
    echo 1 > /sys/class/gpio/gpio145/value
  fi
  } &

Obviously you need 'gpsd' running for this to work.
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120408/73039d7f/attachment.bin>


More information about the Gta04-owner mailing list