UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How To Alter the timesyncd.conf File

    Scheduled Pinned Locked Moved Unsolved Support
    9 Posts 3 Posters 853 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • M Offline
        Muffinman
        last edited by

        Hi There. I would like to alter the timesyncd.conf file so I can add an NTP server address. The path of the file is /etc/systemd/timesyncd.conf. In a Linux desktop OS such as Ubuntu I can easily do this from the terminal by using Nano to alter this using the following command (sudo nano /etc/systemd/timesyncd.conf). I can still run the command within the terminal of Ubuntu Touch & open the same & alter it however I'm unable to save it... I'm assuming it's a permissions issue but I wondering if anyone can assist in how I can alter this I'd be very grateful. The device I'm using is a Nexus 7 WiFi only. Also thank you to UBports for all the work you do on this OS!!!

        KenedaK 1 Reply Last reply Reply Quote 1
        • KenedaK Offline
          Keneda @Muffinman
          last edited by Keneda

          @muffinman
          Indeed it's a permission issue.

          uTouch is, by design, read only for important system files.

          You can easily make them read/write, but be aware that's not endorsed by ubports nor recommanded, wich mean you'll be the only one responsible of any issue that could lead to, by modifying such files.

          That said, you can either use Ubuntu Touch Tweak Tool from open store, system options, and enable read/write from there, or you can use command line terminal app and enter : sudo mount -o remount,rw /.

          Once you finished you can use UTTT again to go back read only, or enter : sudo mount -o remount,ro /.

          After that, reboot.

          Be aware tha any OTA update can revert your tweaks to default as it can overwrite files you edited.

          2015-2023 : Meizu MX4 ☠️⚰️✝️
          2023-2024 : Nexus 5 ☠️⚰️✝️
          2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
          🇲🇫🇬🇧

          M 1 Reply Last reply Reply Quote 2
          • M Offline
            Muffinman @Keneda
            last edited by

            @keneda
            Hi Keneda.
            Thank you for your reply! I do have the tweak tool installed & followed your suggestions which I was able to successfully able to alter the file to include an NTP server & then change it back to being read only so again thank you for your information.

            The only thing unfortunately for me is the reason I wanted to do was to have my Nexus 7 to time sync with either an external or internal NTP server. After making the changes when I tried to restart the service to apply the changes, it comes up with the error Failed to restart systemd-timesyncd.service: No such method 'RestartUnit'.

            I also tried rebooting the device & made sure the date & time is set to automatically update.
            I also have a Nexus 4 device which experiences the same problems.
            Am I possibly missing something here or does Ubuntu Touch behaves different to date / time sync? For what I do having an accurate time is fairly important.

            I was thinking of waiting until the transition to the 20.04 kernel work has completed & thought that might fix the issue but I thought rather than waiting I'd like to learn how to the date time sync works in Ubuntu Touch as it does appear to behave differently from say your Ubuntu desktop OS.

            Cheers

            flohackF KenedaK 2 Replies Last reply Reply Quote 1
            • flohackF Offline
              flohack @Muffinman
              last edited by

              @muffinman Well we do not use systemd still, probably you need to find the appropriate upstart job and restart it with service <name> restart

              My languages: 🇦🇹 🇩🇪 🇬🇧 🇺🇸

              M 1 Reply Last reply Reply Quote 1
              • KenedaK Offline
                Keneda @Muffinman
                last edited by

                @muffinman
                Unfortunatly i don't have skill to help with time sync, so i'll let @Flohack and other more skilled help you ^^

                2015-2023 : Meizu MX4 ☠️⚰️✝️
                2023-2024 : Nexus 5 ☠️⚰️✝️
                2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                🇲🇫🇬🇧

                M 1 Reply Last reply Reply Quote 1
                • M Offline
                  Muffinman @Keneda
                  last edited by

                  @keneda Thanks for your assistance Keneda 👍

                  1 Reply Last reply Reply Quote 1
                  • M Offline
                    Muffinman @flohack
                    last edited by

                    @flohack HI Flohack. Okay so it doesn't use systemd or it doesn't have an NTP client then what does it use?
                    How do I go about finding out what upstart job it uses? What does UT do within the Date and Time setting when you change from manually to automatically? Is there any documentation to steer me in the right direction? Or when you migrate over to the 20.04 kernel, will this change things / will you use systemd? Thank you!

                    1 Reply Last reply Reply Quote 1
                    • flohackF Offline
                      flohack
                      last edited by

                      @muffinman I am sorry, there is no good documentation for those details. I just saw that ntp is not running on my device either and let you know whats going on there.

                      My languages: 🇦🇹 🇩🇪 🇬🇧 🇺🇸

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        Muffinman @flohack
                        last edited by

                        @flohack Thank you for your time looking into this & if you do come across anything if you could please share. Cheers.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post