LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   System Time Getting not correct getting slower (https://www.linuxquestions.org/questions/linux-hardware-18/system-time-getting-not-correct-getting-slower-749102/)

kilgoretrout 09-02-2009 08:32 PM

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.

flatstan 09-21-2009 10:43 AM

System Time slow
 
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.

michaelk 09-21-2009 12:00 PM

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.

rjlee 09-22-2009 04:42 PM

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
Code:

ntpdate
(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
Code:

ntpdate uk.pool.ntp.org
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.

Hope that helps,

–Robert J Lee

flatstan 10-23-2009 02:29 PM

Time getting slower
 
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.

Electro 10-27-2009 12:30 AM

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.


All times are GMT -5. The time now is 04:03 AM.