Description of problem: After boot the time is shifted 2 hours ahead on my system which is exactly my timezone EET (GMT+2). If I reboot again the diff is 2 more hours ahead and so on... Version-Release number of selected component (if applicable): initscripts-9.02-1.i686 Additional info: Kernel is vanilla 2.6.31.6 (not Fedora kernel) if it does matter. I've put some debug in /etc/rc.d/rc.sysinit and /etc/rc.d/init.d/halt and saw that the time is changed somewhere before them, which means somewhere in udev. I've tested with renaming of hwclock, ntpdate, ntpd (they are not used - chkconfig is off) and the time is advancing again after reboot. I've looked into other bugs for initscripts and the changelog and it appears that there is a change in the invocation of the hwclock in udev rules between F11 and F12 from: hwclock --hctosys to: hwclock --systz this is the diff between 88-clock.rules for F11 (8.95) and F12 (9.02): --- /lib/udev/rules.d/88-clock.rules-F11 2009-05-01 23:35:11.000000000 +0300 +++ /lib/udev/rules.d/88-clock.rules-F12 2009-10-27 22:11:39.000000000 +0200 @@ -1,2 +1,4 @@ -ACTION=="add", SUBSYSTEM=="rtc", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k" -ACTION=="add", ENV{MAJOR}=="10", ENV{MINOR}=="135", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k" +ACTION=="add", SUBSYSTEM=="rtc", SYSFS{hctosys}=="1", RUN+="/sbin/hwclock --systz --rtc=/dev/%k" +ACTION=="add", ENV{MAJOR}=="10", SYSFS{hctosys}=="1", ENV{MINOR}=="135", RUN+="/sbin/hwclock --systz --rtc=/dev/%k" +ACTION=="add", SUBSYSTEM=="rtc", SYSFS{hctosys}=="0", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k" +ACTION=="add", ENV{MAJOR}=="10", SYSFS{hctosys}=="0", ENV{MINOR}=="135", RUN+="/sbin/hwclock --hctosys --rtc=/dev/%k" I don't understand when the rules are used, but issuing the command hwclock --systz on my system does this: # hwclock -r; date; hwclock --systz; hwclock -r; date Sat 14 Nov 2009 10:16:42 PM EET -0.157733 seconds Sat Nov 14 22:16:42 EET 2009 Sat 14 Nov 2009 10:16:43 PM EET -0.992920 seconds Sat Nov 14 20:16:43 EET 2009 System time is changed 2 hours back. Maybe it is failing to be executed on my system/kernel? The other option (after I've set the time with ntpdate): # hwclock -r;date; hwclock --hctosys;hwclock -r;date Sat 14 Nov 2009 10:18:09 PM EET -0.488568 seconds Sat Nov 14 22:18:09 EET 2009 Sat 14 Nov 2009 10:18:11 PM EET -0.998102 seconds Sat Nov 14 22:18:11 EET 2009 no change after --hctosys, which I think is the correct behavior. Some more info: # cat /etc/adjtime 0.000000 1258215126 0.000000 1258215126 LOCAL # cat /sys/class/rtc/rtc0/uevent cat: /sys/class/rtc/rtc0/uevent: No such file or directory # cat /sys/class/misc/rtc/uevent MAJOR=10 MINOR=135 DEVNAME=rtc
Did you build with CONFIG_RTC_HCTOSYS=y?
No, I don't have this option in my config. Anyway, I thought I'll report this as it might hit other people with custom kernels. It would be good if old behavior before F12 works too...
Does your rtc device have a 'hctosys' file in sysfs?
Created attachment 369912 [details] patch for the udev rules Never mind - the attached should work for old-style RTC devices. Does it work for you?
I don't have file named 'hctosys' in sysfs. The attached patch works for me. Thanks!
Thanks - the fix is pushed to git, and will go out as an update at some point. http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=751df4e901aec320bf219592123d962f2a862b5d
initscripts-9.02.1-1 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/initscripts-9.02.1-1
initscripts-9.02.1-1 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update initscripts'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12797
initscripts-9.02.1-1 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.