Clock losing time on Qubes 4.1.2 with MSI laptop

Hello,

I’m new to Qubes and Linux in general and am having an issue with my clock losing the correct time on my Qubes 4.1.2 installation.

My hardware is a MSI Stealth 15m gaming laptop with 16GB RAM and Nvidia RTX3060 if that helps in some way…

What happens is after a while the clock starts drifting and will be days ahead or behind. I tried installing NTP to sync with pool servers but it doesn’t seem to work.

When I run ntpq or chrony commands I see large offsets. Even using ntpdate to set the time manually doesn’t fix it permanently.

After doing some searching, I found out the hardware clock can’t be accessed on my system:

hwclock: Cannot access the Hardware Clock via any known method.

Apparently the kernel module “rtc” also isn’t loading with modprobe.

I’m on kernel 5.15.94-1.qubes.fc32 if that matters. How can I get the hardware clock working properly? Is there something special needed for MSI laptops or Nvidia GPUs?

I’m pretty lost on how to debug kernel modules and such. Any help or pointers on how I can get reliable time syncing on my Qubes setup would be greatly appreciated! Let me know if any other details about my system would help.

Thank you for your time!

Well for one, Qubes OS hardware requirements are strict, and having a discrete GPU will work against you unless you want to do significant troubleshooting.

If you just want to skip to the good part, get yourself one of the community-recommended computers on the list below instead.

In Qubes OS, unlike most linux distributions, only ClockVM (sys-net by default) synchronizes its time via the Internet. Other qubes use the qvm-sync-clock command at startup to query ClockVM for time synchronization, so they do not synchronize time via the Internet. (except whonix qube)

In this case, it is better to run timedatectl status and/or timedatectl timesync-status in the ClockVM terminal to check the status of time synchronization.

If you run the hwclock command in a qube other than dom0 it is normal.

1 Like

synchronization was off even when it did worked in my case so I don’t see any directions i can use based on that… hwclock was my next guess, but no, even dom0 can’t access.

You need root privileges (sudo hwclock).
Works in dom0 and sys-net.

You didn’t mention if you have search on the forum:
https://forum.qubes-os.org/search?q=time
https://forum.qubes-os.org/search?q=time%20sync
Maybe these related topics will help you:
https://forum.qubes-os.org/t/qubes-users-problems-with-timesynchronization/12730
https://forum.qubes-os.org/t/definitive-guide-to-time-setting-sync-in-qubes-os/17641

1 Like