How to fix the time

Hello, I having hard time to fixt the time in QubesOS v4.3. But i do not wish to used the terminal to do it.

Without the terminal … interesting challenge

Either the UEFI provided time must be wrong or Qubes uses a NTP service that provides a wrong time.

To eliminate some possibilities:

Can you describe what is wrong with the time, that you want to “fix”?

Does it show the wrong time?
In every qube?
Is it wrong by: a few seconds? some minutes? some whole hours?
Does the error change?

2 Likes

Best for checking is just run timedatectl in dom0.

RTC (the clock in your computers BIOS) is supposed to be set to UTC.

Then RTC and UTC show the same value.

Set timezone accordingly and everything shoud be fine.

Can you describe what is wrong with the time, that you want to “fix”?
I do not know how to fix after using the properties.

Does it show the wrong time?
all parts of time are wrong.

**every qube?
v4.3

Is it wrong by: a few seconds? some minutes? some whole hours?
All parts.

Does the error change? I do try to fix it.

For me, the first thing is to restart the computer and change the time in BIOS/Setup. I think it must be UTC (someone can confirm that dom0 needs it like that?) UTC can be found from an online time website.

Then see what happens after boot.

( If you run Windows on the computer, then it makes it wrong. It can be configured to work around it.)

I got the StarBook Horizon laptop.

wrong comment

I also have a different time than what it should be. the timedatectl gives my timezone but the time itself shows 5 min more than the real time.
How do I fix that?

Please help me with which Terminal to use to fixes the time?

Sorry this is late, but maybe some simple instructions can help others. I think it is all correct…

With coreboot, so no BIOS? I think it makes no difference, but please tell is if you see errors.

There is some quite explanation: here but it is maybe too much detail.

If most normal things are correct, then maybe it is only that clockvm does not get the correct time from the internet, and tell it to dom0 and other qubes.

First steps, if it is OK for you to use synchronisation by network:

  1. We will verify which qube you use for ClockVM…
  2. Open dom0 terminal.
  3. Run qubes-prefs clockvm
  4. Does it say the name of the qube you use for internet? Normally it is “sys-net” qube.
  5. If you use a different qube for network:
    1. change the pref: run qubes-prefs clockvm NNNNN but put the new name in place of NNNNN.
  6. Open settings for your clockvm qube - maybe it is sys-net, or maybe you changed it. Go to “Services”, and enable the service called “clocksync”. It must have a tick next to it.
    1. This is also possible with the terminal qvm-service command.
  7. Shutdown and restart your clockvm/network qube. This requires shutdown of any qubes that use it for network.
    1. After restart, if there is network, then the time in this qube should be synchronized. You can run timedatectrl to verify.
  8. In dom0, run sudo qvm-sync-clock
    1. now the correct time is saved to the hardware clock, so it should be almost correct even if you start your computer with no network.
  9. your other qubes will take a long time to learn the correct time. You can restart them, or run qvm-sync-clock in each one.

Some other verifications:

If timezone is wrong in dom0, simplest is to use a gui tool. I think it will work. If you want to use terminal:

  1. Get a piece of paper to record what you see. Write down if there are mistakes in my instructions.
  2. Open dom0 terminal.
  3. Every command must have sudo before it. I do not write it every time… but do not forget.
  4. Verify the timezone.
    1. Run timedatectl
    2. If the timezone is wrong, run timedatectl list-timezones, then
    3. Choose the best timezone for you, then
    4. run timedatectl set-timezone XXXXX - you must replace XXXXX with the one you chose.
    5. run sudo qvm-sync-clock. Verify that Local time and UTC time are both correct.

If you get errors exactly equal to your timezone offset, after you restart:

  1. Set the RTC offset.
    1. This will tell Qubes if the hardware clock is saved as your local country time, or as UTC time…
    2. If you boot the computer sometimes to Windows, run timedatectl set-local-rtc 1
    3. If you only use Qubes, run timedatectl set-local-rtc 0
    4. It is best for Qubes to use UTC, which means local-rtc is zero.
  2. Set the system time in dom0: run sudo qvm-sync-clock.
    1. Verify that Local time and UTC time are both correct.
    2. This is the time Qubes uses right now. It will be saved in hardware

If you get crazy values after restarting your computer, then maybe the small internal battery is defective, so the computer cannot keep the time when there is no power. Normally the network time should correct it.

If there are errors, post them here.

1 Like

I able fix, the problem was the Time Zone that i need to put manually, the options is now show so friendly at all in Xfce.

2 Likes

It is good if it is fixed.

Can you tell us what method you used?

1 Like

It was the Time Zone was the problem. I manually write the correct Time Zone. Not in the BIOS.