Frame drop on Fedora Linux due to Dual System

Recently installed Fedora Linux on my laptop as a second system after Windows.

Every time when the laptop woke up from the sleeping mode, the frame rate dropped significantly, along with incorrect time display (+10 hours). CPU and GPU uses remained normal, but the animation on GNOME was laggy all the time.

Thought it could be driver’s problem or performance reduce due to battery usage, but it turned out to be the TIMING.

RTC is a hardware component on the PC that stores and tracks date and time even when time is turned off. Unfortunately Windows and Linux used different standard on which time to store inside this chip. Windows stores local time into the chip, while Linux stores UTC0 time into the chip, and then calculate the time shifting manually.

As mentioned before, the laptop was running on Due Systems, which means when Windows was started, RTC time got changed from UTC time into local time. When the system was then switched back to Linux, shifting was added to the local time, causing incorrect timing display.

But how did this shifting of time affected frame rate? When the time shifted for 10 hours, Chrony tried to correct it back. However, Chrony corrects time gradually, not immediately. As Chrony changed software time gradually, Mutter – default window manager for the GNOME desktop environment – started to use wrong timestamp as well, causing wrong prediction on frames, which eventually caused lagging.

To fix this, simply fix the timing.

sudo chronyc makestep
sudo timedatectl set-local-rtc 0

And the frame rates returned to normal 🙂

发表回复