Bug 444821 - Enabling "set date and time automatically" stops "ntpd.service" rather than starting it
Summary: Enabling "set date and time automatically" stops "ntpd.service" rather than s...
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Unclassified
Component: kcm_clock (show other bugs)
Version: 5.22.5
Platform: Manjaro Linux
: HI normal (vote)
Target Milestone: ---
Assignee: Paul Campbell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-02 12:05 UTC by Alberto Salvia Novella
Modified: 2021-11-09 18:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Salvia Novella 2021-11-02 12:05:52 UTC
STEPS TO REPRODUCE:
1. sudo systemctl start ntpd
2. systemctl status ntpd
3. Date & Time -> "Set date and time automatically"
4. systemctl status ntpd

RESULT:
"ntpd.service" has been deactivated.

ADDITIONAL INFO:
Same the other way around: activating "ntpd.service" disables the box "set date and time automatically".

ROOT CAUSE:
In reality the box is only intended to sync the time once. But that's not what the wording suggests, neither it's the most functional thing to do. It should instead enable ntpd.
Comment 1 Nate Graham 2021-11-08 17:53:22 UTC
lol can confirm!
Comment 2 Nicolas Fella 2021-11-08 21:28:07 UTC
What that checkbox does is control systemd-timesyncd (if available). Presumably systemd-timesyncd disables ntpd when activated since it would be a competing service
Comment 3 Nicolas Fella 2021-11-08 23:26:38 UTC
Sorry, slight correction to the above:

The checkbox uses the org.freedesktop.timedate1 interface (systemd-timedated) to control the NTP settings. This then activates the configured NTP implementation, which on Manjaro is systemd-timesyncd. So ntpd is still getting replaced in favor of systemd-timesyncd since that's what the system is configured to do
Comment 4 Nicolas Fella 2021-11-08 23:28:53 UTC
See https://www.freedesktop.org/software/systemd/man/systemd-timedated.service.html for details on timedated and how to configure which NTP daemon is used
Comment 5 Alberto Salvia Novella 2021-11-09 18:16:22 UTC
Thanks for the info. Very valuable.