You are not logged in.
Pages: 1
I set the clock to the time right now, that works ok until I shutdown the computer and turn it on next day. Then the clock show wrong time. I have set the hardware clock as well, but that also go wrong next day. How can I fix it? Please help me.
Offline
Have you try NTP?
Here is some info http://wiki.archlinux.org/index.php/NTP
Sorry for my english. It's not my native language..
Offline
What timezone are you in?
Have you told your computer? (/etc/rc.conf)
Knute
Offline
http://wiki.archlinux.org/index.php/Time#Time_Skew
We need more info: is it off by an hour, a couple minutes, is your clock set to localtime, are you dualbooting with Windows?
Offline
Offline
Is your hardware clock correct?
I have set the hardware clock as well, but that also go wrong next day.
Offline
Is your hardware clock correct?
check it in BIOS
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
itsbrad212 wrote:Is your hardware clock correct?
check it in BIOS
Or 'hwclock -r' if you keep it on localtime. 'hwclock --utc' is the other choice.
Offline
It might be the cmos battery...
Offline
Try this (helps in most such cases):
- Look at the /var/lib/hwclock/adjtime file contents. The first field should contain a rather low absolute value.
- If the value apears too high, remove the /var/lib/hwclock/adjtime file and
- properly set your system system time and then
- synchronize the hardware clock to this (as root): hwclock --systohc. (See: man hwclock.)
- Then reboot your system. This restores the /var/lib/hwclock/adjtime file.
- If in doubt, check this file again (repeatedly). If the value is still high or returns to a high value after some time, you probably have a hardware or setup problem.
Last edited by bernarcher (2010-08-05 09:35:24)
To know or not to know ...
... the questions remain forever.
Offline
Try these commands (works for me). I actually put these in a script I run from time to time when this happens:
pacman -S openntpd
rm /var/lib/hwclock/adjtime
ntpd -s -d
After that runs for a while, press CTRL+C to quit and then reboot.
Offline
My timezone is CEST right now, and /etc/rc.conf are set to Europe/Stockholm right now.
Have you try NTP?
Here is some info http://wiki.archlinux.org/index.php/NTP
That is not really a solution. How about if you have to work offline?
We need more info: is it off by an hour, a couple minutes, is your clock set to localtime, are you dualbooting with Windows?
Right now it is 5 hours and some mins before the now time. No idea what the clock are set to and no, I am dualbooting, but I never run Windows.
The hwclock go 20 hours after the current time.
It might be the cmos battery...
Then BIOS should give me warnings, right?
Here is my /var/lib/hwclock/adjtime file:
-55166.954837 1280952257 0.000000
1280931635
UTC
Offline
Here's mine:
17.364907 1281024490 0.000000
1280936227
LOCAL
From the manpage:
The format of the adjtime file is, in ASCII:
Line 1: 3 numbers, separated by blanks: 1) systematic drift rate in seconds per day, floating point decimal;
2) Resulting number of seconds since 1969 UTC of most recent adjustment or calibration, decimal integer; 3)
zero (for compatibility with clock(8)) as a decimal integer.
Line 2: 1 number: Resulting number of seconds since 1969 UTC of most recent calibration. Zero if there has
been no calibration yet or it is known that any previous calibration is moot (for example, because the Hard‐
ware Clock has been found, since that calibration, not to contain a valid time). This is a decimal integer.
Line 3: "UTC" or "LOCAL". Tells whether the Hardware Clock is set to Coordinated Universal Time or local
time. You can always override this value with options on the hwclock command line.
Offline
This is what happens: when I start linux the hardware clock CHAGES. Why?
Offline
This is what happens: when I start linux the hardware clock CHAGES. Why?
You cna sync clocks both ways: system to hardware and the other way round.
Try using localtime in your rc.conf, set both clocks the way you want and remove /var/lib/hwclock/adjtime then reboot.
Offline
From the wiki (http://wiki.archlinux.org/index.php/Time)
Operating systems also have a software clock (aka the system clock) that runs independent of the hardware clock. The system clock keeps track of the time, time zone, and whether or not your location uses Daylight Savings Time (DST). The Arch Linux script (/etc/rc.sysinit) sets the system clock from the hardware clock on boot, and the script (/etc/rc.shutdown) sets the hardware clock from the system clock on shutdown. Users often use NTP to keep the system clock set to the proper time.
If you read that page it will tell you how to remedy your situation.
Offline
Here is my /var/lib/hwclock/adjtime file:
-55166.954837 1280952257 0.000000 1280931635 UTC
This -55166.954837 is a far too big value! Get rid of this file soon. It is one main cause of your time problems.
This is what I get:
0.008190 1281013888 0.000000
1281013888
UTC
Anything above |10| is suspicious (and this is a rather high value already).
To know or not to know ...
... the questions remain forever.
Offline
damdim wrote:It might be the cmos battery...
Then BIOS should give me warnings, right?
No it should not. I've never seen a mainboard that gives warnings for low CMOS battery.
Offline
You won't get warnings from the BIOS if the CMOS battery gets low. But once the timer starts to behave irregularly chances are that soon the CMOS contents will not been held anymore.
I experienced the opposite, timer running ok but my CMOS settings went astray and I was not able to boot anymore.
Yet, it is a rather unlikely scenario. I have a 15-year old PC here which still runs on its original battery. In the case of the OP I would try to get rid of adjtime first, and then install ntp or openntp to keep synchronization. Only if this fails, I would suspect the hardware.
Last edited by bernarcher (2010-08-05 21:48:18)
To know or not to know ...
... the questions remain forever.
Offline
Thank you, I think I fixed it by removing the /var/lib/hwclock/adjtime file. I will report later if the clock goes wrong again. Right now it seem to go one minute after, lol.
Offline
Pages: 1