2

My server runs Ubuntu 14.04.1. I created udev rules in /etc/udev/rules.d/09-pps.rules to get GPS with PPS support work.

KERNEL=="ttyS0", SYMLINK+="gps0", MODE="0666"
KERNEL=="ttyS0", RUN+="/bin/setserial -q /dev/%k low_latency"
KERNEL=="ttyS0", RUN+="/usr/sbin/ldattach pps /dev/%k"

/dev/pps0 will appear at startup. All right. If I check _low_latency_ flag it looks like

$ sudo setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

$ sudo setserial /dev/ttyS0 low_latency
$ sudo setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test low_latency

Why is low_latency always missing after startup?

1

I use the following:

KERNEL=="ttyS0", RUN+="/bin/setserial /dev/ttyS0 low_latency"
KERNEL=="ttyS0", SYMLINK+="gps0", RUN+="/usr/sbin/ldattach pps /dev/ttyS0"
KERNEL=="pps0", OWNER="root", GROUP="dialout", MODE="0660", SYMLINK+="gpspps0"

Did you test your udev rule with udevadm:?

 # udevadm  test  /sys/class/tty/ttyS0

Update

Your setserial configuration might be a problem. Check the configuration of setserial:

 # dpkg-reconfigure -p low setserial

I selected "autosave always." Try "autosave always" and then verify the low_latency setting before rebooting. If that does not work try selecting "kernel" when you do the dpkg-reconfigure

You can verify that things match up by investigating /var/lib/setserial.

When I reboot setserial says:

 # setserial -G /dev/ttyS0
 /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test low_latency

Which matches what is found in /var/lib/setserial

 # cat /var/lib/setserial/autoserial.conf |grep -v ^\#
 /dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test low_latency

NB: Sometimes the entry in setserial will say 8250 instead of 16550A. I do not know why this happens on some machines but it has never been an issue for me when they differ.

3
  • Thanks for the test hint. There was no error in the test. ldattach was executed successful. I switched to your version but still no low_latency after startup. Which priority (filename) do you have? – wenzul Oct 19 '14 at 2:41
  • Have you checked once if the low_latency attribute is set? – wenzul Oct 19 '14 at 20:10
  • Yes this works with my servers. I have added one more thing to my answer you should check. If this answer is helpful please mark it as accepted. – dfc Oct 20 '14 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.