| View previous topic :: View next topic |
| Author |
Message |
serker n00b

Joined: 15 Aug 2008 Posts: 3
|
Posted: Thu Apr 26, 2012 7:30 am Post subject: Having some psychotic date issues [Solved] |
|
|
I've tried about seven ways from sunday to search for this problem on the forums...so I'm just going to take a whack at it.
Here's the issue as simply as I can explain it.
Running the latest emerge --sync on a HP Pavilion dv4 laptop. Still running a 3.2.1-64-bit kernel--haven't taken the time to upgrade it to current, but this problem seems to be openrc dependent, not kernel dependent anyway.
I'm using WICD since NetMan won't work properly with this chipset---the point is, I'm wifi on bootup, which creates it's own havoc.
On bootup, ntp-client and ntpd won't start, because I'm not online. WICD takes at least 20 seconds after login to connect to wifi, so---after logging into X, I usually xterm and 'rc default', right after wifi connects, and the clock is set. Annoying, yes...and perhaps I should be asking how to solve this first---but the date problem is a little bit more psychotic than just time sync, so lets just skip ahead to the big kahuna.
When I shut down...my time is correct. During shutdown, I see "syncing to hardware clock" (sp). Everything powers off, no problem. Upon reboot, when I get into X, my time is now suddenly Mar 16, 2:36 am. This is roughly the date and time that I installed this machine.
No big deal, run 'rc default', and the time is now set properly, right? Until I shutdown -h again.
Fun part is, I can boot, go into bios, and see that the time is right. I can hwclock --systohc, then --hctosys during a bootup, and see that everything is in sync. Yet, if I boot up from a power down, something 'reverts' the time to installation time on Mar 16th.
I'm pretty comfortable in saying that the answer has to be between /etc/init.d/hwclock and /etc/init.d/swclock. Perhaps I'm not doing something correctly in the kernel for this laptop. I'm all about admitting that I've missed a step, or missed a caveat in a manual line, but this is just flooring me.
Anyone have a clue? Or--is there some command I need to type to display all of this insanity for you guys to diagnose this? I'm sure that the WICD boot order fix is something that needs to be addressed, if only to get rid of the annoyance, but without figuring out the Mar 16th sticky time thing, I think fixing the boot order is just a temporary patch for a bigger problem.
Serker
Last edited by serker on Fri Apr 27, 2012 1:47 am; edited 1 time in total |
|
| Back to top |
|
 |
BillWho Veteran


Joined: 03 Mar 2012 Posts: 1576 Location: US
|
Posted: Thu Apr 26, 2012 1:43 pm Post subject: |
|
|
serker,
I had the same problem and til this day I'm not sure I have the clock/time setup the right way, but it works.
Here's how mine is setup:
| Code: | root@gentoo-gateway conf.d # cat hwclock
# Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as
# Greenwich Mean Time). If that clock is set to the local time, then
# set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local".
clock="local"
# If you want the hwclock script to set the system time (software clock)
# to match the current hardware clock during bootup, leave this
# commented out.
# However, you can set this to "NO" ifyou are running a modern kernel
# with CONFIG_RTC_HCTOSYS set to y and your hardware clock set to UTC.
#clock_hctosys="NO"
# If you do not want to set the hardware clock to the current system
# time (software clock) during shutdown, set this to no.
#clock_systohc="YES"
# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here. Alpha users may wish to use --arc or --srm here.
clock_args=""
root@gentoo-gateway conf.d # rc-update|grep -i "hwclock\|ntp"
hwclock | boot
ntp-client | default
ntpd | default
root@gentoo-gateway conf.d # |
Good luck  _________________ Good luck
Since installing gentoo, my life has become one long emerge  |
|
| Back to top |
|
 |
serker n00b

Joined: 15 Aug 2008 Posts: 3
|
Posted: Fri Apr 27, 2012 1:46 am Post subject: Well, kinda...that was rather inspiring, actually. |
|
|
Amazing how someone can post the very same config file you've been looking at, but it looks different. 8O
Started thinking about how hwclock works, and disabled the systohc and hctosys that I had enabled in that script. Rebooted...and poof...now the new date suddenly became Apr 17th 1:36am. New symptom.
So...slowly watched the shutdown, and noticed that swclock was setting shutdown time--Apr 16th, 8:36pm. Next reboot, killed off swclock, restarted ntp-client manually, and watched the time.
This time...and I guess it's the first time I noticed it...but in the dmesg "rtc-cmos setting time Apr 17th, 1:36am"....geez...
Shutdown --check cmos time...damn...the hardware clock is set to Apr 17th, 1:36am. Reset THAT. Save settings, reboot.
This time, I boot up, and now I'm suddenly 6hrs off (HOORAY! I'm finally down to a localtime problem!!!).
hwclock -r and hwclock -u are my friend, and suddenly, it's making sense and surviving reboots with the correct timezone.
Thank you so much...now I get to play WICD load order games...
Serker |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|