Network Time not working in Cinnamon System Settings

Whenever I try to enable Network Time in Cinnamon System Settings/Date & Time, it just gives the following error:

gi.repository.GLib.GError: g-io-error-quark: GDBus.Error:org.cinnamon.SettingsDaemon.DateTimeMechanism.GeneralError: Error enabling NTP: OS variant not supported (36)

Any help would be much appreciated. Thank you.

The most simple method is from a terminal

systemctl enable --now systemd-timesyncd

Or

timedatectl set-ntp true

Thanks for the reply. I tried both of those but still got the same thing. Here is the output:

Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 194, in _on_proxy_ready
    self.proxy_ready_callback()
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 79, in _on_proxy_ready
    can_use_ntp, is_using_ntp = self.proxy_handler.get_ntp()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 200, in get_ntp
    return self._proxy.GetUsingNtp()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gi/overrides/Gio.py", line 349, in __call__
    result = self.dbus_proxy.call_sync(self.method_name, arg_variant,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-io-error-quark: GDBus.Error:org.cinnamon.SettingsDaemon.DateTimeMechanism.GeneralError: Error enabling NTP: OS variant not supported (36)

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

[SOLVED] Cinnamon network time setting won't stay "on". / Applications & Desktop Environments / Arch Linux Forums - seems to be about the same thing, but I’m not quite sure I understand what it means.

What’s the output of:

systemctl status systemd-timesyncd.service

Does the output of timedatectl appear correct?

Please format the output properly as seen above:

Your question is kind of xyproblem - you ask about an error generated by an app when you want to set network time.

I know - instead of going rabbithole on some thirdparty code - my suggestion was to solve the real problem - setting the network time sync.

I know it won’t fix the Cinnamon applet - but it solves the real issue - setting the network time.

The cinnamon applet is coded by Mint developers - and they apparently look for a debian based environment - which uses something called set-alternatives

I just use /etc/NetworkManager/dispatcher.d/09-timezone

#!/bin/sh
case "$2" in
    connectivity-change)
        timedatectl set-timezone "$(curl --fail https://ipapi.co/timezone)"
    ;;
esac

( of course you can use your own preferred API for getting the timezone )
(( using connectivity-change instead of up here should mean it gets the timezone on new network connection … but does not change when, for example, you enable a VPN for a different region ))
((( and of course its needs to be executable )))

1 Like

UPDATE: I tried reinstalling and restarting various things last night, but seemingly to no avail. However, this morning I booted up my PC and now Cinnamon is auto-correcting to the right time! Weird. None of this is reflected in System Settings, however, where Network Time is always turned off or gives an error if I try to enable it. Presumably this is the aspect that only works properly in Debian-based distros?

put simply - cinnamon network time applet is hardcoded to support

  • Fedora
  • Debian
  • Suse

If the OS is not any of the above the applet throws the error.

        if (g_file_test ("/etc/redhat-release", G_FILE_TEST_EXISTS)) /* Fedora */
                ret = _set_using_ntp_fedora (invocation, using_ntp);
        else if (g_file_test ("/usr/sbin/update-rc.d", G_FILE_TEST_EXISTS)) /* Debian */
                ret = _set_using_ntp_debian (invocation, using_ntp);
        else if (g_file_test ("/etc/SuSE-release", G_FILE_TEST_EXISTS)) /* SUSE variant */
                ret = _set_using_ntp_suse (invocation, using_ntp);
        else {
                error = g_error_new (CSD_DATETIME_MECHANISM_ERROR,
                                     CSD_DATETIME_MECHANISM_ERROR_GENERAL,
                                     "Error enabling NTP: OS variant not supported");
                g_dbus_method_invocation_return_gerror (invocation, error);
                g_error_free (error);
                return FALSE;
        }

To have the correct time in Manjaro

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.