Author Topic: Clock not keeping correct time between reboots  (Read 4652 times)

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: Clock not keeping correct time between reboots
« Reply #45 on: April 18, 2010, 04:52:34 PM »
contents of adjtime:
-0.047190 1271626785 0.000000
1271626785
LOCAL

contents of /etc/sysconfig/clock
UTC=false
ARC=false
ZONE=America/Chicago

when i tried hwclock -w --localtime --directisa
the error message "elect() to /dev/rtc to wait for clock tick timed out"  DID NOT show up.  it looked like it worked, but when i rebooted, still 5 hours back.

Galaxar

I'll have a look at the documentation. In the meantime, try adding the line
Code: [Select]
CLOCKFLAGS=--directisato /etc/sysconfig/clock.

Edit:

It seems that in some distributions the line should be
Code: [Select]
CLOCK_OPTS=--directisa
I don't know whether PCLinuxOS accepts both lines or neither. After looking at some config files I think the first one might work. I doubt that the second one will.
« Last Edit: April 19, 2010, 06:20:30 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Galaxar

  • Full Member
  • ***
  • Posts: 121
Re: Clock not keeping correct time between reboots
« Reply #46 on: April 18, 2010, 05:25:00 PM »
tried both, but neither worked.

Galaxar

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: Clock not keeping correct time between reboots
« Reply #47 on: April 18, 2010, 11:37:39 PM »
Galaxar,

The strange thing is that the symptoms you've reported seem to arise from, not one, but two problems:

1. Obviously your error message indicates that hwclock has difficulties setting your hardware clock to system time -- at least if it's run without the --directisa option.

2. But even if we manage to fix that -- even when the hardware clock is set correctly -- your system time jumps back five hours at boot. This seems to be a different problem, where the hardware clock is treated as if it were set to UTC when in fact it is set to local time.

But why? After you corrected /etc/adjtime and /etc/sysconfig/clock the system should know better....

I have to think.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Galaxar

  • Full Member
  • ***
  • Posts: 121
Re: Clock not keeping correct time between reboots
« Reply #48 on: April 19, 2010, 08:36:13 AM »
First off, thank you, Blackbird, for sticking with me through this. Really do appreciate it.

Second, I have mentioned this before, but would my error message indicating that hwclock having difficulties setting your hardware clock to system time have anything to do with ACPI?  ACPI is a little funny on this machine I'm having trouble with.  I got the laptop 6 months ago brand new.  The best I can do with it is using acpi=ht or acpi=off.  I currently use acpi=ht.  if I try acpi=on or acpi=force, it looks up at bootup of pclos.  Again, thanks for all the help so far.


Galaxar

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: Clock not keeping correct time between reboots
« Reply #49 on: April 19, 2010, 09:31:17 AM »
First off, thank you, Blackbird, for sticking with me through this. Really do appreciate it.

Second, I have mentioned this before, but would my error message indicating that hwclock having difficulties setting your hardware clock to system time have anything to do with ACPI?

I really can't say. It seems strange that a power management system would impede the setting of a clock, but I know very little about ACPI.

Quote
ACPI is a little funny on this machine I'm having trouble with.  I got the laptop 6 months ago brand new.  The best I can do with it is using acpi=ht or acpi=off.  I currently use acpi=ht.  if I try acpi=on or acpi=force, it looks up at bootup of pclos.  Again, thanks for all the help so far.

I vaguely seem to remember that Linus Torvalds called ACPI "a design disaster". (It might even have been "a veritable design disaster" or "a total design disaster". But then Microsoft was somehow involved in the creation of it....)
« Last Edit: April 19, 2010, 09:52:21 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: Clock not keeping correct time between reboots
« Reply #50 on: April 21, 2010, 05:22:09 AM »
Galaxar,

So far I have not found an explanation for your main problem: the system time jumping back at boot.

But why not simply configure the clocks the way your system seems to want them -- with the BIOS clock set to UTC? It won't be confusing when the system is running, because then the only time you see will be local time anyway.

To do it you'd just have to do the opposite of what I recommended earlier:

change LOCAL to UTC in /etc/adjtime;

change UTC=false to UTC=true in /etc/sysconfig/clock;

run
Code: [Select]
hwclock -w --utc --directisa as root;

in this case too add the line
Code: [Select]
CLOCKFLAGS=--directisa to /etc/sysconfig/clock;

reboot;

and if the system time is still wrong after the reboot, set the hardware clock manually to GMT/UTC in the BIOS settings.

Of course this would be admitting defeat, but your system time should stay correct.
« Last Edit: April 21, 2010, 03:48:32 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Galaxar

  • Full Member
  • ***
  • Posts: 121
Re: Clock not keeping correct time between reboots
« Reply #51 on: April 21, 2010, 02:45:49 PM »
Ok, tried everything you suggested, in the order you did.  Nothing.  So I admitted defeat and set my bios clock 5 hours ahead and now I have correct time for the system.  hopefully this problem will get fixed in a future update.

Blackbird, THANK YOU SO MUCH!  This is what I imagine the open source community should be like when helping one another.  You are a scholar and a gentleman.


Galaxar

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6380
  • I'm going South
Re: Clock not keeping correct time between reboots
« Reply #52 on: April 21, 2010, 03:57:54 PM »
Ok, tried everything you suggested, in the order you did.  Nothing.  So I admitted defeat and set my bios clock 5 hours ahead and now I have correct time for the system.

In a way that is a solution. It will be interesting to see what happens when Daylight-Saving Time is over. My bet is that you will still have the correct time, at least if you use NTP.

Quote
hopefully this problem will get fixed in a future update.

Indeed. Although I must say it's not a common one.

Quote
Blackbird, THANK YOU SO MUCH!  This is what I imagine the open source community should be like when helping one another.  You are a scholar and a gentleman.

Thank you for your kind words.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D