0

As the title says, my system clock is not synchronized. This is problematic since I need to update my software, and I continue to receive errors such as "Release file ... is not valid yet." I have tried multiple fixes throughout this website but none have resolved my issue. Does anyone have any other ideas?

Some additional information:

  • I am running Ubuntu 22.04 LTS (no Windows in dualboot).

  • When I run sudo systemctl restart systemd-timesyncd,I get Failed to restart systemd-timesyncd.service: Unit systemd-timesyncd.service is masked.

  • When I run timedatectl, I get

            Local time: Wed 2022-06-08 03:33:34 CDT
        Universal time: Wed 2022-06-08 08:33:34 UTC
              RTC time: Wed 2022-06-08 08:33:34
             Time zone: America/Chicago (CDT, -0500)
    

    System clock synchronized: no

           NTP service: n/a
       RTC in local TZ: no
    
  • Also, because I tried some of those previous solutions, I lost the ability to automatically set date and time, as suggested by the first answer to this post.

Settings's GUI:

enter image description here

UPDATES (thanks to user68186)

  1. I have the following in my /etc/systemd/timesyncd.conf file:
[Time] 
NTP=ntp.ubuntu.com 
FallbackNTP=pool.ntp.org       
#RootDistanceMaxSec=5 
#PollIntervalMinSec=32 
#PollIntervalMaxSec=2048
  1. MY NTP service is now active again, and the "Automatic Date & Time" switch is once again available in my Settings GUI. This progress was made by referencing this post, since NTP was not supported on my device.

  2. I still am not having my time synchronized on my device.

  3. Ran the following commands, which did not return errors!

sudo systemctl enable systemd-timesyncd.service

sudo systemctl start systemd-timesyncd.service

user68186
  • 33,360

1 Answers1

0

Command line steps (Work in progress)

First, unmask the service by:

sudo systemctl unmask systemd-timesyncd

Then install the service again

sudo apt install systemd-timesyncd

Activate NTP:

sudo timedatectl set-ntp true

At this point your NTP service should be active again, and the "Automatic Date & Time" switch is once again available in your Settings GUI.

If that does not help, try these two commands again:

sudo systemctl enable systemd-timesyncd.service
sudo systemctl start systemd-timesyncd.service

I checked two of my computers both has the following lines in their /etc/systemd/timesyncd.conf:

[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

From the man timesyncd.conf command:

The default configuration is defined during compilation, so a configuration file is only needed when it is necessary to deviate from those defaults. By default, the configuration file in /etc/systemd/ contains commented out entries showing the defaults as a guide to the administrator. This file can be edited to create local overrides.

So, it seems editing this file was not needed.

Reboot the computer to make sure the services are initialized at boot time:

sudo reboot

After rebooot, check again:

timedatectl status

Hope this helps

user68186
  • 33,360
  • I had that selected initially, and that didn't solve the issue. After going through several other solutions (the linked posts in the answer), I lost access to that option altogether. See the attached picture in the post for evidence. Are there any other ideas you have? – MRSchwob Jun 08 '22 at 22:00
  • Automatic time zone, date, and time are all enabled in the GUI – MRSchwob Jun 09 '22 at 22:04
  • 1
    I swear I restarted it before that comment and received the same error. Just tried again, and now the time is synced. I cannot express enough how much I appreciate your help and patience. You have been so incredibly helpful. Note to everyone: do NOT manually change the time in the Settings GUI. Instead, just enable location services and let the computer automatically update everything. – MRSchwob Jun 10 '22 at 00:07