View previous topic :: View next topic |
Author |
Message |
Keffin Apprentice
Joined: 14 Feb 2004 Posts: 202 Location: England
|
Posted: Sun Feb 15, 2004 5:28 pm Post subject: System time wrong |
|
|
I noticed last night that the time on my system is wrong, 22 minutes slow in fact. I have set the time to both UTC (I live in England) and local in rc.conf but it makes no difference, and it can't be a timezone issue if it's out by 22 minutes. Anyone know how to fix this? I also tried a quick-fix by trying to just change the clock in Gnome. It tells me I don't have an app to do it with. What would I need to emerge to do that?
Thanks. _________________ Always cut the deck if it ups your odds. |
|
Back to top |
|
|
madtinkerer Tux's lil' helper
Joined: 14 Nov 2002 Posts: 122 Location: London Ontario Canada
|
Posted: Sun Feb 15, 2004 5:46 pm Post subject: |
|
|
emerge ntpdate and read the man page. if it is consistently 22 minutes out though, there may be another problem. Sometimes if you dualboot with windows, time slipping can occur, although I'm not sure of the cause. You can use ntpdate in a cron job, so it should work well for you. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Feb 15, 2004 5:56 pm Post subject: |
|
|
Keffin,
This happens if the battery on your motherboard is dying. It provides power to the clock when you system if off.
Set the time in the BIOS net time you boot. Linux reads BISO time at start-up then keeps track of time using kernel jiffies, which can be traced back to your hardware clock.
Installing ntpdate will cause linux time to be synched to a ntp server. At shutdown linux will update the BIOS clock.
Both the CPU and BIOS clock crystals are low accuracy devices (as crystals go) so the timekeeping of the system, left to its own devices is poor to start with. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Keffin Apprentice
Joined: 14 Feb 2004 Posts: 202 Location: England
|
Posted: Sun Feb 15, 2004 6:04 pm Post subject: |
|
|
Even after a fresh emerge sync and ACCEPT_KEYWORDS="~x86" I get no results for ntpdate and searching emerge for "date" or "time" gave me nothing that looks too useful. _________________ Always cut the deck if it ups your odds. |
|
Back to top |
|
|
madtinkerer Tux's lil' helper
Joined: 14 Nov 2002 Posts: 122 Location: London Ontario Canada
|
Posted: Sun Feb 15, 2004 6:16 pm Post subject: |
|
|
sorry. the package is ntp the command to run it is ntpdate. I always get those confused. |
|
Back to top |
|
|
Keffin Apprentice
Joined: 14 Feb 2004 Posts: 202 Location: England
|
Posted: Sun Feb 15, 2004 6:22 pm Post subject: |
|
|
I posted that other reply before I read yours Neddy, it would seem you're bang on. I booted into my other linux partition and the clock was also running slow, I guess this has been happening for ages without me knowing. I booted into windows and it would seem that that set the BIOS straight for me, my time is now fine.
Should I be worried that my motherboard battery is dying? Does it do more than just take care of the clock when the system is off?
Also, a google led me to an ntpdate howto that told me that I want to use "emerge ntp" to get the ntpdate program.
Thanks a lot. _________________ Always cut the deck if it ups your odds. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Sun Feb 15, 2004 6:35 pm Post subject: |
|
|
Keffin,
The battery also keeps the CMOS settings alive but it usually does that when its too dead to run the clock at all. I have run PCs with no battery - you have to set the CMOS by hand at evey start up. More modern systems may use FLASH memory in place of CMOS, so it wont be an issue.
I'm somewhat suspitious of Windows getting the time right if the BIOS clock is slow. Maybe it stores an offset every time you put Windows time right ?
The right thing to do is put the BIOS time right, then pick up the pieces. You can get a free ntp for Windows, so it sounds like ntp all round, timesync on startup and ignore the battery.
If you are really curious, note all the BIOS settings, power off then remove the battery. What happens at the next power up?
Fix the BIOS settings as required. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Keffin Apprentice
Joined: 14 Feb 2004 Posts: 202 Location: England
|
Posted: Sun Feb 15, 2004 6:47 pm Post subject: |
|
|
I don't fancy digging around inside a laptop, but thanks for the info . I assumed from the fact that windows fixed the time that it was running some sort of ntpdate type thing at boot-up just like this is now doing. It is windows XP Pro, maybe that's one of their "Pro" features . _________________ Always cut the deck if it ups your odds. |
|
Back to top |
|
|
ian! Bodhisattva
Joined: 25 Feb 2003 Posts: 3829 Location: Essen, Germany
|
Posted: Sun Feb 15, 2004 7:01 pm Post subject: |
|
|
Moved to 'Duplicate Threads' in favor of this one:
https://forums.gentoo.org/viewtopic.php?t=56121
--ian! _________________ "To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins |
|
Back to top |
|
|
|