* [gentoo-user] System date/time goes to GMT when PC wakes from hibernate
@ 2015-04-06 21:03 Walter Dnes
2015-04-06 22:13 ` Fernando Rodriguez
0 siblings, 1 reply; 4+ messages in thread
From: Walter Dnes @ 2015-04-06 21:03 UTC (permalink / raw
To: Gentoo Users List
I have a bunch of spreadsheets, browser tabs, etc, open all the time,
scattered over various work areas. Rather than re-open them every day,
I simply hibernate, using suspend-to-disk. This way, things are where I
left them.
The past couple of months, when the machine comes up from hibernation,
the clock is a few hours ahead. Now it's 4 hours ahead. It was 5 hours
ahead before the switch to daylight savings time. This looks
suspiciously like GMT. GMT is 5 hours ahead of EST, and 4 hours ahead
of EDT.
I dug deeper. Apparently, it's just the "kernel system time" that
gets bumped forward when it wakes up from hibernation. The BIOS clock
is OK. As a heavy-handed hack, I've inserted the line...
OnResume 01 hwclock --hctosys
...into my /etc/hibernate/hibernate.conf. This copies over the BIOS
time to the kernel system date. It works, but I'd really like to know
why it's necessary in the first place.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] System date/time goes to GMT when PC wakes from hibernate
2015-04-06 21:03 [gentoo-user] System date/time goes to GMT when PC wakes from hibernate Walter Dnes
@ 2015-04-06 22:13 ` Fernando Rodriguez
2015-04-06 22:26 ` Matti Nykyri
2015-04-07 18:26 ` [gentoo-user] [SOLVED] " Walter Dnes
0 siblings, 2 replies; 4+ messages in thread
From: Fernando Rodriguez @ 2015-04-06 22:13 UTC (permalink / raw
To: gentoo-user
On Monday, April 06, 2015 5:03:11 PM Walter Dnes wrote:
> I have a bunch of spreadsheets, browser tabs, etc, open all the time,
> scattered over various work areas. Rather than re-open them every day,
> I simply hibernate, using suspend-to-disk. This way, things are where I
> left them.
>
> The past couple of months, when the machine comes up from hibernation,
> the clock is a few hours ahead. Now it's 4 hours ahead. It was 5 hours
> ahead before the switch to daylight savings time. This looks
> suspiciously like GMT. GMT is 5 hours ahead of EST, and 4 hours ahead
> of EDT.
>
> I dug deeper. Apparently, it's just the "kernel system time" that
> gets bumped forward when it wakes up from hibernation. The BIOS clock
> is OK. As a heavy-handed hack, I've inserted the line...
>
> OnResume 01 hwclock --hctosys
>
> ...into my /etc/hibernate/hibernate.conf. This copies over the BIOS
> time to the kernel system date. It works, but I'd really like to know
> why it's necessary in the first place.
>
There's an option CONFIG_RTC_HCTOSYS on the kernel to do it automatically. I
think it uses utc so if you use localtime it may mess it up. This also came up
recently on this list but I can't remember what the problem was so you may
want to look there.
--
Fernando Rodriguez
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] System date/time goes to GMT when PC wakes from hibernate
2015-04-06 22:13 ` Fernando Rodriguez
@ 2015-04-06 22:26 ` Matti Nykyri
2015-04-07 18:26 ` [gentoo-user] [SOLVED] " Walter Dnes
1 sibling, 0 replies; 4+ messages in thread
From: Matti Nykyri @ 2015-04-06 22:26 UTC (permalink / raw
To: gentoo-user
On Mon, Apr 06, 2015 at 06:13:41PM -0400, Fernando Rodriguez wrote:
> >
> > ...into my /etc/hibernate/hibernate.conf. This copies over the BIOS
> > time to the kernel system date. It works, but I'd really like to know
> > why it's necessary in the first place.
> >
>
> There's an option CONFIG_RTC_HCTOSYS on the kernel to do it automatically. I
> think it uses utc so if you use localtime it may mess it up. This also came up
> recently on this list but I can't remember what the problem was so you may
> want to look there.
Don't store hwclock in localtime. It is a hack and you are asking for trouble.
Just store it in UTC. That way the worst mishap is that it gets 1 second to
a wrong direction if you happen to hit a leap second. With localtime you will
always have a change for worse 2 times a year when summer time kicks in.
--
-Matti
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-user] [SOLVED] System date/time goes to GMT when PC wakes from hibernate
2015-04-06 22:13 ` Fernando Rodriguez
2015-04-06 22:26 ` Matti Nykyri
@ 2015-04-07 18:26 ` Walter Dnes
1 sibling, 0 replies; 4+ messages in thread
From: Walter Dnes @ 2015-04-07 18:26 UTC (permalink / raw
To: gentoo-user
On Mon, Apr 06, 2015 at 06:13:41PM -0400, Fernando Rodriguez wrote
> There's an option CONFIG_RTC_HCTOSYS on the kernel to do it
> automatically. I think it uses utc so if you use localtime it may
> mess it up. This also came up recently on this list but I can't
> remember what the problem was so you may want to look there.
Thanks, I think that's the problem.
# CONFIG_RTC_HCTOSYS is not set
...on both my desktop, and on the netbook. The only difference is that
the netbook's Poulsbo chipset (bleagh) doesn't play nice with hibernate,
so I do a full shutdown, and the startup is from the text console login
prompt. The problem didn't show up when I was re-installing (32 -> 64
bit upgrade) on my desktop, and doing full shutdowns and rebooting. So
this seems
I seem to remember this popping up as a new option recently during a
kernel upgrade...
Device Drivers > Real Time Clock
[ ] Set system time from RTC on startup and resume
This appears to do automatically what I do with the hwclock command in
the OnResume option. Like 99% of all new stuff on "make oldconfig", I
said "No". This time, it came back to bite me. Next kernel upgrade,
I'll have to set that option on.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-07 18:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-06 21:03 [gentoo-user] System date/time goes to GMT when PC wakes from hibernate Walter Dnes
2015-04-06 22:13 ` Fernando Rodriguez
2015-04-06 22:26 ` Matti Nykyri
2015-04-07 18:26 ` [gentoo-user] [SOLVED] " Walter Dnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox