[Bug 815958] New: time not corrected when system is suspended during DST switch
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c0 Summary: time not corrected when system is suspended during DST switch Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Ulrich.Windl@rz.uni-regensburg.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0 When a system was suspended (to disk) before swicth to daylight-saving-time (DST), and it is resumed after DST, the clock is not corrected. (Windows/XP seems able to do that, in contrast) Reproducible: Didn't try Steps to Reproduce: 1. Suspend your system at maybe UTC+0100 2. Resume your system at maybe UTC+0200 Actual Results: Clock is one hour behind Expected Results: Clock is corrected As there's a dual-boot system with Windows/XP also, the CMOS clock is using local time. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c Xiaolong Li <xlli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xlli@suse.com AssignedTo|bnc-team-screening@forge.pr |froh@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c1 --- Comment #1 from Susanne Oberhauser <froh@suse.com> 2013-04-22 10:25:38 UTC --- What is your /etc/sysconfig/clock setting of HWCLOCK? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c2 --- Comment #2 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 2013-04-22 13:51:11 CEST --- It's (copied by typing) SYSTOHC="" TIMEZONE="Europe/Berlin" FORCE_SYSTOHC="no" BADYEAR="no" SYSTOHC_DEVICE="" USE_HWCLOCK="yes" USE_ADJUST="no" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c3 --- Comment #3 from Susanne Oberhauser <froh@suse.com> 2013-04-22 15:41:23 UTC --- hm. this is not a 12.1 system is it? according to https://www.suse.com/releasenotes/x86_64/openSUSE/12.2/ the info from HWCLOCK has moved to /etc/adjtime, as described e.g. here http://forums.opensuse.org/blogs/jdmcdaniel3/what-utc-gmt-time-possible-issu... If that file does not exist on your install, you have been hit by bug#779440 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c4 --- Comment #4 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 2013-04-23 08:17:31 CEST --- On comment #3: Actually I upgraded the system from 12.1 to 12.3 after having reported the bug (hoping for improvement). My current /etc/adjtime has: --- 0.0 0 0.0 0 LOCAL --- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c5 Susanne Oberhauser <froh@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Basesystem |Basesystem AssignedTo|froh@suse.com |bnc-team-screening@forge.pr | |ovo.novell.com Product|openSUSE 12.1 |openSUSE 12.3 --- Comment #5 from Susanne Oberhauser <froh@suse.com> 2013-04-23 12:20:52 UTC --- ok the topic is messy. the proper fix, teaching windows to take the hardware clock in utc, seems to be there but not perfect yet: http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html Vojtech, on SUSE, it looks to me, the kernel is by default storing and restoring time from hwclock at hibernate/resume. looking at the kernel source, it will do that using UTC, not some local time. https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/dr... esp. class.c and rtc-lib.c which btw also means: never ever boot windows on a hibernated machine... on the other hand, at some point preparations had been made to explicitely sync the hardware clock with the system clock at suspend/resume: https://gitorious.org/opensuse/pm-utils/blobs/master/pm/sleep.d/90clock do you think that should be the hook to use for the case hwclock is set to local time? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c Xiaolong Li <xlli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |rlcox@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c Susanne Oberhauser <froh@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |froh@suse.com AssignedTo|rlcox@novell.com |vdziewiecki@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c6 --- Comment #6 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-04-26 13:05:04 UTC --- I'm not sure, it just calls hwclock --systohc and hwclock --hctosys. This probably has the same effect as the kernel function, that's why the hook has this line: is_set "$NEED_CLOCK_SYNC" || exit $NA Which means it isn't used at all. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c7 --- Comment #7 from Susanne Oberhauser <froh@suse.com> 2013-04-29 14:38:08 UTC --- good that you came to the same conclusion that the script does nothing currently... now I think this would be the place to take corrective action if hwclock uses local time instead of utc. looking deeper into this, I suspect that with CONFIG_RTC_HCTOSYS=y, the kernel will not store the time as local time. I think the kernel actually will never care about local time. It looks to me as if local time is a userspace thing. So for hwclock in local time, I think we'd need to disable CONFIG_RTC_HCTOSYS for that case, and then we'd need to modify the sleep.d/90clock script to save and restore the system clock on suspend and on resume. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c9 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crrodriguez@opensuse.org --- Comment #9 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-04-29 15:05:40 UTC --- Well we should avoid using pm-utils and try to replace their functionality with systemd so that they can be removed later, since they are dead upstream. CC'ing Cristian, he usually knows how to do things without pm-utils. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c10 --- Comment #10 from Susanne Oberhauser <froh@suse.com> 2013-04-29 16:04:34 UTC --- systemd! duh! http://www.freedesktop.org/wiki/Software/systemd/timedated well, I think we should really do some housekeeping and remove unused cruft from pm_utils. this had never occurred to me. We really need to remove dead code like sleep.d/90clock then... anyhow: christian, do you know whether the systemd implementation will handle DST switch during suspend gracefully? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c11 --- Comment #11 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-04-29 12:30:26 CLT --- Hrmmm.. keeping the CMOS in localtime and expecting this to work is not very realistic. systemd-timedated knows when and why the next DST update will happend timedatectl Local time: lun 2013-04-29 12:19:38 CLT Universal time: lun 2013-04-29 16:19:38 UTC Timezone: America/Santiago (CLT, -0400) NTP enabled: n/a NTP synchronized: yes RTC in local TZ: no DST active: no Last DST change: DST ended at sáb 2013-04-27 23:59:59 CLST sáb 2013-04-27 23:00:00 CLT Next DST change: DST begins (the clock jumps one hour forward) at sáb 2013-09-07 23:59:59 CLT dom 2013-09-08 01:00:00 CLST Buuut, timedated is not always running, it comes up when something tries to access its dbus interface. I am not sure what to do about this, gonna ask somebody else ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c12 --- Comment #12 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 2013-04-30 09:02:11 CEST --- I know the subject is messy: IMHO the system needs to record the time when the hwclock was corrected for local time during DST change (just to avoid correcting it multiple times). Naturally the time of change should not be stored in local time for obvious reasons. To make matters worse in multi-boot environments, an other system (like Windows) can also adjust the hwclock. AFAIK, Windows/XP anly corrects the time if the system is powered on a few days after DST change; otherwise it assumes the hwclock is current. Sorry for throwing in some random thoughts. Rumors say recent Windows can work with hwclock running UTC, so there's light on the horizon... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c16 --- Comment #16 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-06-19 06:24:16 UTC --- If someone wants to take this bug and assign it to (him/her)self, it would be nice, since I can do nothing here. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=815958 https://bugzilla.novell.com/show_bug.cgi?id=815958#c18 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|vdziewiecki@suse.com |froh@suse.com --- Comment #18 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2014-07-16 15:30:39 UTC --- Susanne, I will reassign this to you, since it seems to me that you are more likely to do something about this. This has nothing to do with pm-utils anymore so I cannot help here. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com