gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Fwd: Re: gpsd for time sync on Ubuntu remix too hard for


From: Lisandro Damián Nicanor Pérez Meyer
Subject: Re: [gpsd-dev] Fwd: Re: gpsd for time sync on Ubuntu remix too hard for normals - how to improve?
Date: Sun, 05 May 2019 22:04:35 -0300

Hi! for the sake of completeness I'll try to write down the Debian (and 
possibly Ubuntu) state of this. I think it's worth to understand it and have 
it at hand for future readers. Note that while I am a Debian Developer I do 
*not* maintain gpsd.


El domingo, 5 de mayo de 2019 19:21:46 -03 Adam Serbinski escribió:
[snip]

> Now the problem with the -n parameter, is that it causes the gps device to
> activate, and activating it means increased power consumption. Setting the
> defaults to increase power consumption is probably not the ideal default
> configuration.
> 
> Which is why its a nice thing that most distro packaged gpsd will have a
> file in which you can specify the parameters to use. Fedora, for example,
> has a configuration file at /etc/sysconfig/gpsd

Debian has the same feature in /etc/default/gpsd. And I'm pretty sure that any
more or less experienced admin will search for it right there.

[snip]
 
> Systemd actually has a really... interesting... ability to start a service
> upon a socket connection. So when gpsd is not running, but something seems
> to be listening on its port, that is actually "gpsd.socket". When
> gpsd.socket has a connection, it starts up gpsd and switches the socket
> over to gpsd.
> 
> So the way that the distro default is going to work has it that gpsd.socket
> runs by default, but gpsd itself does not. So obviously that isn't going to
> work for ntp. But if, on the other hand, you start up xgps, then gpsd will
> start up on demand.
> 
> Doing this is not in any way wrong, for their objectives. Unfortunately for
> you, this objective is not consistent with YOUR objective.
> 
> BUT, you can get to your objective fairly easily from the distro defaults.
> 
> Now I don't use Ubuntu. I use Fedora.
> In Fedora, getting to where you want to get can be done like this;
> 1) dnf install gpsd (which, BTW, comes in with 3.18.1)
> -- that will install gpsd, and enable gpsd.socket, BUT NOT gpsd.service.
> 2) systemctl enable gpsd.service
> -- you don't have to disable gpsd.socket, since it is meaningless if gpsd
> is actually running.
> 3) edit /etc/sysconfig/gpsd to add the specific parameters you need, like
> "-n /dev/ttyACM0".
> 4) Add this line to /etc/chronyd.conf:
> refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
> 
> And that's all that is needed to have chronyd fed by gpsd automatically on
> system boot.

On Debian it's almost the same: in (1) switch to use apt, in (3) edit /etc/
default/gpsd.


And while I'm not gpsd's maintainer, I'll be happy to see if we can improve 
stuff in any way. So far it has been working as expected, from a distro point 
of view.

-- 
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]