ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Setting Permanent Clock

    VOXL 2
    2
    4
    326
    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
      mrawding
      last edited by

      I'm trying to debug a kernel issue that seems like it is rebooting on kernel panic. I see that the parameter is set to -1 (reboot immediately) , which I changed to 0 (disable). But viewing the journalctl logs is quite annoying. Especially since the date is always set to Dec 15 2021.

      I see there might be RTC support in the kernel setting the /dev/rtc0 clock to beginning of UTC time.

      Dec 10 09:15:49 voxl kernel: rtc-pm8xxx c440000.qcom,spmi:qcom,pm8150@0:qcom,pm8150_rtc: rtc core: registered pm8xxx_rtc as rtc0
      Dec 10 09:15:49 voxl kernel: rtc-pm8xxx c440000.qcom,spmi:qcom,pm8150@0:qcom,pm8150_rtc: setting system clock to 1970-01-01 00:00:05 UTC (5)
      

      So couple questions

      1. Is that actually a RTC or is it virtual?
      2. Where is Dec 15 2021 set? Is it in the BIOS? I can't find it anywhere.
      3. timedatectl set-time does not stick after reboot, guessing date is defaulting to BIOS
      4. How can I modify BIOS either pre/post firmware flash to update the time I want?
      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @mrawding
        last edited by

        @mrawding There is no RTC. If you have an Internet connection it will use NTP to set the time and it will save that time. If you start again but do not have an Internet connection it will use that saved time. It will not update that saved time until NTP is available again.

        M 1 Reply Last reply Reply Quote 0
        • M
          mrawding @Eric Katzfey
          last edited by mrawding

          @Eric-Katzfey Thanks for the response. Chrony is our timesync service we use, but it doesn't stick after reboot. I'll have to look into mimicking the NTP sync in a different service. Thanks!

          M 1 Reply Last reply Reply Quote 0
          • M
            mrawding @mrawding
            last edited by

            @mrawding Just answering my own forum for those who don't have access to internet based NTP server. A few solutions to stop it being synced back to Dec 15 2021

            1. Run a local NTP server on the groundstation

            2. If running a timesync service like chrony - write a system service to detect a difference between the system time and the last modification time of /var/lib/systemd/timesync/clock and then running touch /var/lib/systemd/timesync/clock to reset this time - probably 1-5s daemon rate would make sense.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB | Contributors