shm refclock

dropkick23 at dropkick23 at
Wed Apr 10 21:03:26 UTC 2019

On Sat, 6 Apr 2019 16:21:50 -0700
Paul Theodoropoulos <paul at> wrote:

> gpsd needs to start before ntpd when using shm refclock.

That is completely opposite from my experience.  I have two systemd service
files one to start gpsd and one to start ntpd.  the ntpd service file is
from ntpsec distribution. gpsd service file is from gpsd distribution and
edited to remove reference to gpsd.socket and change After=chronyd.service
to ntpd.service.

If gpsd.service is started by hand first followed ntpd.service the
following error is in ntpd.log,   REFCLOCK: SHM shmget (unit 1): Permission
denied for both unit 1 and 0, and shm is not in ntpq -p.   If I start in
reverse order no error message and ntpq -p show shm.

If both services are enabled and the system rebooted gpsd starts before
ntpd, as indicated by process ids and error message in ntpd.log.  The after
statement in gpsd has no effect.

New system fresh install of Arch Linux ARM, GPSD and NTPD.
System is raspi 3+
Linux tock2 4.19.34-1-ARCH #1 SMP PREEMPT Wed Apr 10 00:14:00 UTC 2019
armv7l GNU/Linux

tock2 ntpsec]# git rev-parse HEAD

tock2 gpsd]# git rev-parse HEAD

When I come up with a solution I'll post the ans. Now the fun begins

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list