Comment 1 for bug 1872178

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Mark,
Disclaimer: my gps device has no PPS so I'm stabbing a bit in the dark here. I beg your pardon for that in advance.

By default devices are hot-added as they are detected e.g. via udev.
But for PPS there is a permission issue if you have it set up like it.

From [1]: "In order to present the smallest possible attack surface to privilege-escalation attempts, gpsd, if run as root, drops its root privileges very soon after startup - just after it has opened any serial device paths passed on the command line.
Thus, KPPS can only be used with devices passed that way, not with GPSes that are later presented to gpsd by the hotplug system. Those hotplug devices may, however, be able to use plain, non-kernel PPS. gpsd tries to automatically fall back to this when absence of root permissions makes KPPS unavailable."

I assume it is ok for your setup, but just to be sure you have set $DEVICES to include, maybe even both of them?
The hot adding is rather new and has other known bugs (e.g. 1873415) anyway and since your gpsd debug output lists the device you should be ok on that, but I wanted to ask to be sure.

How does "systemctl status gpsd.service" look like, does it have e.g.:
● gpsd.service - GPS (Global Positioning System) Daemon
...
             └─1085 /usr/sbin/gpsd /dev/ttyUSB0 /dev/pps0

I guess for debugging you might already run it directly with something like:
  $ sudo gpsd -D 5 -N /dev/ttyS0 /dev/pps0
Is that assumption right?

The error message that you see "kernel PPS unavailable, PPS accuracy will suffer" has a comment referencing to those potential permissions issues as well.
1263 /* some operations in init_kernel_pps() require root privs */
1264 (void)init_kernel_pps(&inner_context);
1265 if ( 0 <= inner_context.kernelpps_handle ) {

We might want/need to debug the details of that init_kernel_pps function if it returns an RC.
Any chance to log onto your system?

Also maybe anything in dmesg for apparmor denies?

[1]: https://gpsd.gitlab.io/gpsd/gpsd-time-service-howto.html#_gps_time