If you dual-boot Fedora Linux and Windows, you might have run into a bizarre and frustrating issue: you wake your laptop from sleep, and suddenly your mouse cursor is lagging severely, frames are dropping, and your system time is hours in the future.

Oddly enough, opening GNOME Settings and toggling the Automatic Date & Time switch off and on instantly cures the mouse lag.

But what exactly is happening behind the scenes, and how do you fix it permanently without manually toggling settings every time you open your laptop lid?

The Root Cause: A Tale of Two Clocks

This issue is the perfect storm of hardware clocks, dual-boot configurations, and Wayland compositor mechanics.

  1. The Time Zone Tug-of-War: By default, Windows stores your system's hardware clock (RTC / BIOS time) in Local Time. Linux, however, expects the hardware clock to be stored in UTC.
  2. The Suspend/Resume Cycle: When you suspend your laptop, the OS relies on the hardware clock to keep track of time. If you live in a UTC+5:30 time zone (like Sri Lanka), Windows sets your hardware clock 5.5 hours ahead of UTC. When Fedora wakes up, it reads that hardware clock, incorrectly assumes it is reading UTC, and adds another 5.5 hours to it to get to your local time.
  3. Mutter's Math Breaks: GNOME's Wayland compositor (Mutter) relies heavily on precise timestamps for its internal frame-pacing loops. When the system wakes up to an instantaneous, massive time jump into the future, Mutter's frame-timing calculations completely break. This results in dropped frames and severe mouse lag.

When you toggle the Automatic Date & Time switch in settings, you restart the chronyd NTP service. Chrony realizes the system time is massively wrong, does a hard "step" backward to the correct internet time, and immediately fixes Mutter's math, curing the lag.

Diagnosing the Issue

To verify this is happening to you, check your chronyd logs right after waking your laptop:

journalctl -u chronyd -b 

If you see something like this, you have the bug:

Forward time jump detected! System clock wrong by -19799.938 seconds 

(Note: 19,800 seconds is exactly 5.5 hours).

You can also check your current clock configuration by running:

timedatectl 

If Universal time and RTC time do not match, your hardware clock is holding Local Time, which will cause this bug.

The Permanent Fix

To solve this, we need to force both operating systems to agree on a standard. The best approach is to make both OSs use UTC for the hardware clock.

Step 1: Fix the Linux Side

First, ensure your internet time is currently correct. Then, open your terminal and run these commands to write the exact UTC time into your hardware clock:

# Temporarily disable NTP so it doesn't lock the clock sudo timedatectl set-ntp false # Tell Fedora the hardware clock is NOT in local time timedatectl set-local-rtc 0 # Write the correct system time to the hardware clock in UTC sudo hwclock --systohc --utc # Re-enable NTP sudo timedatectl set-ntp true 

Run timedatectl again. Universal time and RTC time should now match perfectly.

Step 2: Fix the Windows Side

If you stop here, Windows will just overwrite your hardware clock back to Local Time the next time you boot into it. We need to tell Windows to use UTC as well.

  1. Boot into Windows.
  2. Open the Command Prompt as an Administrator.
  3. Paste and run the following command to update the Windows Registry:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f 
  1. Reboot.