Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntp tweaks #379

Open
parazyd opened this issue Jun 4, 2020 · 5 comments
Open

ntp tweaks #379

parazyd opened this issue Jun 4, 2020 · 5 comments

Comments

@parazyd
Copy link
Member

parazyd commented Jun 4, 2020

To save battery, we shouldn't run an ntp daemon all the time. Rather look into setting time once and quitting.

Currently this is solved with ntpsec-ntpdate, which tries to set the time once upon an Internet connection is established.

We might want to look into a daemon that will keep trying until the time is actually set in case ntpsec-ntpdate fails.

@clort81
Copy link

clort81 commented Jul 7, 2020

Works okay for me as-is.

@petterreinholdtsen
Copy link

ntpsec-ntpdate call ntpdate, which fail when either ipv4 or ipv6 addresses behind the dns names given on the command line is unavailable, for example when the unit do not have ipv6 routing. look like https://bugs.debian.org/293793 returned since 2005.

@petterreinholdtsen
Copy link

I worked around the broken ntpdate behaviour by patching /usr/sbin/ntpdate-debian, and doing two separate calls, one for IPv4 and one for IPv6. One of them might fail, but the other will most likely work. The new script end like this:

# shellcheck disable=SC2086
/usr/sbin/ntpdate -6 $NTPOPTIONS "$@" $NTPSERVERS
exec /usr/sbin/ntpdate -4 $NTPOPTIONS "$@" $NTPSERVERS

@petterreinholdtsen
Copy link

petterreinholdtsen commented Oct 1, 2020

I discovered that the problem only exist with the ntpsec-ntpdate package used by Maemo, while the ntpdate package do not have this problem. Perhaps change the underlying implementation?

The issue with ntpsec-ntpdate is reported to https://bugs.debian.org/971523 .

@sicelo
Copy link
Collaborator

sicelo commented Jan 4, 2023

chrony is an alternative ntp daemon that promises battery friendliness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants