[SOLVED] System Time Getting not correct getting slower
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
If the time in the bios is off by that much after a shut down, you have a hardware problem IMHO. Things I would try after making absolutely sure your new battery is properly seated:
1.Resetting the bios to the defaults by using the jumper on the motherboard for that purpose. Consult your motherboard manual for specific instructions;
2. If that doesn't work, reflash the bios using the most recent bios update for your board.
To confirm that this is a hardware issue and not something in Suse resetting the system time, shut down completely, reboot and check your time in your bios setup. Insert a livecd like knoppix, ubuntu, sidux, etc, and boot the system. Run for a while and shut down. Boot up and see if the system time has been affected. If your system time has changed appreciably under a livcd, you have a hardware issue in all likelihood.
Hi people, I seem to be getting nowhere with my time problem, after following various links & trying suggested solutions I still have the problem.
It seems that the BIOS time is 1hr slow per day, I correct it each day on start up, the next day it is 1hr slow again, somebody suggested that the time zone may be wrong, there does not seem a way to set the time zone in the BIOS, how can I do this ?
The time shown in SUSE is about 24/30 hrs slow per day, but not consistant. likewise I correct it on each start up, If I have not used the box for some days the time averages out at about 24/30hrs per day slow, I can set the time zone as Europe UK in Suse.
I have tried syncing with various UK servers, configured my NTP Client & Sys Services to connect to uk.pool.ntp.org & opened port 123 in the firewall as was suggested, all to no avail, the prob persists.
Am I stuck with this ? any more ideas welcomed, thanks.
The hardware clock (BIOS time) is completely independent of the OS. However, the OS does periodically update the hardware clock. If it drifts excessively when the computer is off then as kilgoretrout stated it could be a bad i.e. low CMOS battery voltage or you might have a hardware problem. There is no BIOS timezone offset setting. If OS time drifts excessively when the system is on then its drift settings might be messed up.
If there is a problem with the hardware clock, then it could be that the motherboard battery needs to be replaced (which is a painful process usually involving soldering, so I wouldn't bother personally).
You say that you have set up NTP. To test this, You should be able to run
(as root) to set the system clock to the correct time. (By the way, port 123 is only used by an NTP server, so you shouldn't need to open it unless you intend for other machines to synchronise themselves to you machine's clock). If that doesn't work, try
If that works, a quick fix would be to use NTP to synchronise the date once at startup. Normally, the NTP daemon will only keep the clock running in time, only gradually speeding up or slowing down to correct the clock, and it can take hours to fix a large discrepancy. However, the ntpdate command can be used to set the system (software) clock directly by NTP. Simply add the same command to the end of your /etc/rc.local file.
Thanks everybody for the help.
After trying all of the suggestions and nothing solving the problem, I eventually gave up. I reset the BIOS by removing the battery for an hour & then reentering the details, I reinstalled SUSE on a spare HDD, & reconfigured. Now everything is OK, both the BIOS & the SUSE time remains stable & correct. So I suspect that a problem in SUSE was giving the trouble, so I will wipe that HDD. Rgds.
If you want better clock accuracy, use kernels that are for servers. Kernels for desktops loses clock accuracy for better performance. The reason why kernels for desktops loses clock accuracy is that most desktop kernels are preemptive which means it spends as much time on each program for the best performance. This is fine for desktops because desktops rarely require accurate clocks. For servers, preemptive type of kernels are bad. Kernels for servers uses a non-preemptive kernels. Also the RTC clock for servers are set low at around 100 Hz while desktops are set around 1000 Hz. Multimedia programs like MPlayer requires a high RTC (Real Time Clock) clock for the best performance. This comes at a cost for inaccurate clocks since the kernel is spending all of its time processing data for Mplayer and not updating the system clock. There is also a setting called voluntary preemptive which is in-between the two modes.
I suggest use non-preemptive kernels and set the RTC around 100 Hz for better system clock accuracy. Another way is turn off ACPI and/or APM. If that does not work or makes it worst, you can add clock=tsc to the kernel line in your boot loader. Also use hwclock to sync the system clock with the hardware clock. I suggest double check if the TZ environment variable is set correctly which means it is the same timezone setting that /etc/localtime. Usually the file /etc/localtime is a symbolic link to a file in /usr/share/zoneinfo.
If all else fails, the only way to get clock to have the best accuracy is to use ntp.