[Linux-aus] Ubuntu 20.04 resume time problem

Glenn McIntosh neonsignal-linux at meme.net.au
Tue Jun 28 20:50:44 AEST 2022


On 28/6/22 12:15, Russell Coker via linux-aus wrote:
> I've configured it
> for "RTC in local TZ" with timedatectl so it can have the same time as
Windows
> The problem is that I resume from suspend and the system immediately
treats the
> RTC as if it was in UTC thus being out by 10 hours (time zone +1000).
> How does Ubuntu get the time from the RTC on resume?

Wasn't able to replicate on Debian, but from what I understand the
system clock can get set from RTC in two places

1) if CONFIG_RTC_HCTOSYS is enabled in the kernel, then the RTC will be
read on boot when the RTC driver is initialized; I think it is assumed
the RTC is in UTC, as the kernel cannot know the timezone

2) systemd will later set the clock (using /etc/adjtime to determine if
it is UTC or local time)

I imagine if the systemd one doesn't trigger on resume for some reason,
you would get the symptoms you are experiencing.

Glenn
-- 
pgp: 833A 67F6 1966 EF5F 7AF1  DFF6 75B7 5621 6D65 6D65


More information about the linux-aus mailing list