LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 11-15-2010, 06:19 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Rep: Reputation: Disabled
hwclock (BIOS): time set wrong during shutdown and also reboot.


System time was drifting ahead increasingly for several days time in the end. This is what I did with the clock about 6 hours "in the future":

Quote:
sntp -P no -r pool.ntp.org
hwclock --systohc
i.e. I got the (more or less) exact time from the time server and set the hardware / BIOS timer with this value. I renamed "/etc/adjtime" to beginn with a clean slate.

During reboot (shut down phase) I noticed a message saying something like: "hwclock set to system time". I checked in the BIOS and there was a new time about one hour early(!).

The boot phase then reset the time again, this time several hours forward (usually two to six hours).

This is an iterating process, with a net gain of several hours per boot. It is not always whole hours -- like in a time zone error but it involves also minutes. System is set to UTC as affirmed by the "date" command.

What could be the cause of this behaviour of the clock / timer?
 
Old 11-15-2010, 06:59 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Hi

May sound counter-intuitive - are you switching the system OFF between reboots?

E. g. doing complete shutdowns and restarts?

'cause I once had this due to a CMOS battery on the motherboard that was going down. Replaced the battery, and the problem stopped.

Also, I encountered clock slowdowns on older kernels (FC3 and Red Hat 9) while raytracing. Raytracing tends to up the load average to 1 quite easily, depending on how heavily those older kernels were loaded with raytracing jobs (PovRay) (at least on my system / environment) they tended to slow down the clock more and more.

Hope this helps some. If I were you first place I'd look would be the motherboard CMOS battery - IF you are shutting down your system completely between reboots.

Last edited by rylan76; 11-15-2010 at 09:12 AM.
 
Old 11-15-2010, 07:15 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
As I hinted in this post in your other thread on the same subject, the problem could be a defective real-time clock -- that's the slow-access, battery-backed clock that Linux saves the system clock time to during shutdown. Because this clock is usually incorporated in the Southbridge chip in current three-chip chipset designs and Southbridge chips are usually soldered to the motherboard and therefore are very difficult to replace, the most likely explanation of the symptoms you describe is a defective motherboard so the solution is to replace it.
 
Old 11-15-2010, 07:17 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Quote:
Originally Posted by rylan76 View Post
'cause I once had this due to a CMOS battery on the motherboard that was going down. Replaced the battery, and the problem stopped.
The clock went fast when the battery was run down?

EDIT: @JZL240I-U: if so, it's got to be worth trying a battery change first -- it's a lot cheaper and easier than replacing the motherboard -- but the very variable time change you have reported is not typical of batteries running down when they run progressively slower (AFAIK, could be wrong) until they no longer hold the time and reset to beginning of epoch or BIOS release date.

Last edited by catkin; 11-15-2010 at 07:20 AM.
 
Old 11-15-2010, 07:30 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rylan76 View Post
...are you switching the system OFF between reboots?
Not always. These symptoms also occur when I do a "shutdown -r now".

Quote:
Originally Posted by rylan76 View Post
...If I were you first place I'd look would be the motherboard CMOS battery - IF you are shutting down your system completely between reboots.
I'm not but I can try it anyhow, I'm desperate enough.

Thanks for your input.
 
Old 11-15-2010, 07:38 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
@catkin I realize that this is the same problem. In that other thread I asked the wrong question: "Clock jumps hours ahead after boot". That doesn't include the weird behaviour during shutdown, the combination of which I hoped would point the experts in the right direction. Nor can I change the title / thread name at this point, so I started an other thread, hopefully with a topic better corresponding to the problem.

BTW. when I switch the battery will the CMOS not forget everything?
 
Old 11-15-2010, 08:02 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Quote:
Originally Posted by JZL240I-U View Post
Not always. These symptoms also occur when I do a "shutdown -r now".
Then it's not the battery.
Quote:
Originally Posted by JZL240I-U View Post
@catkin I realize that this is the same problem. In that other thread I asked the wrong question: "Clock jumps hours ahead after boot". That doesn't include the weird behaviour during shutdown, the combination of which I hoped would point the experts in the right direction. Nor can I change the title / thread name at this point, so I started an other thread, hopefully with a topic better corresponding to the problem.

BTW. when I switch the battery will the CMOS not forget everything?
Sorry if I came across as critical; it wasn't intended; I just like to link these things together for the benefit of anyone who finds these posts in a netsearch. It's a good idea to start a new thread with a more appropriate title when the problem area shifts.

BIOS settings used to be lost on changing the CMOS battery but more recent BIOSes have a save and restore facility that does automatic "last known good" saves. The motherboard manual should give details or you could enter the BIOS setup and see what options are listed.
 
Old 11-15-2010, 08:06 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by catkin View Post
...more recent BIOSes have a save and restore facility that does automatic "last known good" saves. The motherboard manual should give details or you could enter the BIOS setup and see what options are listed.
Good idea . It is a fairly modern Gigabyte board (see my "sig). On the other hand, since you think it's not the battery at all... Phew, and now?
 
Old 11-15-2010, 08:20 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Quote:
Originally Posted by JZL240I-U View Post
Good idea . It is a fairly modern Gigabyte board (see my "sig). On the other hand, since you think it's not the battery at all... Phew, and now?
Nice boards, Gigabyte. I'm using a GA-MA770-DS3 which is one of the very few which support ECC memory (so it will be nice when the EDAC project supports Athlon64 processors!).

It has the BIOS save and restore facility but it is not documented in the manual.

Now? If I were you I'd be looking to beg, borrow or ... a known good similar motherboard (or just any motherboard that will accept your devices that plug into the motherboard -- Linux is pretty good at adapting as long as you don't have a customised kernel that only supports the actual hardware). If I couldn't find one I'd just get a new one -- they're not so expensive and I'm 95% sure that's where the problem lies.
 
Old 11-15-2010, 08:45 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
If necessary I still have warranty on that board. I'll give it another try tonight, after that I'll have to contact my dealer. Thanks for your input catkin.

On the other hand ... I'll do a long term test (overnight is enough) and have a look whether the hardware clock runs stable. If so, it must be some service during boot and shut down what is causing this...

Last edited by JZL240I-U; 11-15-2010 at 08:47 AM.
 
Old 11-15-2010, 09:17 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Quote:
Originally Posted by JZL240I-U View Post
On the other hand ... I'll do a long term test (overnight is enough) and have a look whether the hardware clock runs stable. If so, it must be some service during boot and shut down what is causing this...
That will not test the real-time clock (RTC) -- that's the slow-access, coarse-resolution, battery-backed clock -- because the system will be running on one or more of the system clocks -- the fast-access, fine resolution, non-battery-backed clocks (such as the HPET clocks) which are read so frequently that they are built into the CPU chip itself for performance reasons.
 
Old 11-16-2010, 02:19 AM   #12
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by catkin View Post
That will not test the real-time clock (RTC) -- that's the slow-access, coarse-resolution, battery-backed clock -- because the system will be running on one or more of the system clocks...
Indeed. But I could access the hardware clock with

Code:
hwclock --show
But that was not necessary after all. I booted into my old SuSE 11.2 and did some work there -- with no adverse effects on the time whatsoever. Next I booted 11.3 and *blam* all that hassle began again at once: proof that it is a software effect after all, the clock is not lagging but jumping. I then rebooted without correcting the time and it jumped an additional whole day (24 hours).

I then did a

Code:
hwclock --hctosys
To get time back to reality. And the BIOS time was still fine What's next?

I guess I could re-install but I'd hate to do that without understanding the cause of the current problem...

Last edited by JZL240I-U; 11-16-2010 at 02:20 AM.
 
Old 11-16-2010, 02:30 AM   #13
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,512
Blog Entries: 27

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
SuSE 11.2 was a good test and suggests that the truth is my 5% uncertainty

I empathise with your desire to understand the cause of the current problem but don't know how you can dig deeper ... there are probably ways, I just don't know them.
 
Old 11-16-2010, 02:40 AM   #14
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by catkin View Post
SuSE 11.2 was a good test and suggests that the truth is my 5% uncertainty
No reason to blush, I only had the idea late yesterday evening after now several days of delving into the problem.

Quote:
Originally Posted by catkin View Post
I empathise with your desire to understand the cause of the current problem but don't know how you can dig deeper ... there are probably ways, I just don't know them.
Well, I'll probably open yet another thread, probably in the "kernel" forum, I'll just have to think on a good title to get the knowledgeable people attracted.

Btw., I followed your HPET-link and compared it to the German version, where it says
Quote:
Bei vielen Mainboards kann diese Funktion im BIOS deaktiviert werden. Die Einstellung muss dazu bei ACPI HPET Table auf DISABLE gesetzt werden.

Which roughly translates to

This function can be disabled on many mainboards. Change the entry of ACPI HPET Table to Disabled.
Tonight I'll have a look whether my board offers this choice...
 
Old 11-18-2010, 01:57 AM   #15
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 12.04, Fedora 17, Mint 16, Chakra
Posts: 3,618

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by JZL240I-U View Post
...I followed your HPET-link and compared it to the German version, where it says "This function can be disabled on many mainboards. Change the entry of ACPI HPET Table to Disabled."Tonight I'll have a look whether my board offers this choice...
It doesn't.

The solution to the problem is described here:

http://www.linuxquestions.org/questi...hutdown-844592

For those in a hurry: I had a custom initrd not of my making, which lacked some ingredients. Read all about it in the linked thread .

Thanks for your efforts and input catkin .

Last edited by JZL240I-U; 11-18-2010 at 01:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 9: time always wrong after reboot Dims Linux - Newbie 7 07-15-2009 11:49 PM
one time password wrong,system goes to shutdown srinivasmiriyalu Linux - General 5 06-26-2009 10:59 AM
how to set a service to start any time the system reboot phongly2000 Linux - Newbie 3 01-16-2009 11:48 AM
Tried to set time with hwclock and entered something wrong! Rhiaanon Linux - Newbie 8 05-21-2007 04:52 PM
Sys time and hwclock time hallamigo Mandriva 2 05-24-2004 09:57 PM


All times are GMT -5. The time now is 05:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration