All times are UTC-06:00




Post new topic  Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Problems setting time
PostPosted: Tue Jul 03, 2007 2:05 am 
Offline

Joined: Tue Oct 10, 2006 2:15 am
Posts: 35
Hi,

I recently moved house and find myself in a new timezone.
I went into YAST and set my time to UTC+9. It seems that
every time I boot the clock is different.

This is really annoying as ext2 partitions keep getting
verified as the clock thinks it's 2012 or 2000 or something.

If I set the time from MorphOS, the clock is stable for
MOS so I don't think it is a problem with the on board
battery. (This isn't a solution because SUSE shows some weird
time and I need my file datestamps to be sensible).

I've got no idea where the problem might lie;
OF ? HAL ? SUSE ?

thanks!

(By the way, I'm running OpenSUSE 10.2)


Top
   
 Post subject:
PostPosted: Tue Jul 03, 2007 4:01 am 
Offline

Joined: Thu Jul 28, 2005 12:41 am
Posts: 1066
I had similar problems only with earlier kernels. Did you remove the battery for any reason? Because in that case you need to re-initialize the real-time clock at OF level. There is a forth script floating around somewhere to fix it, hopefully still available...

_________________
CzP
http://czanik.blogs.balabit.com/


Top
   
 Post subject:
PostPosted: Tue Jul 03, 2007 7:02 am 
Offline

Joined: Wed Oct 25, 2006 7:18 pm
Posts: 42
Quote:
I had similar problems only with earlier kernels. Did you remove the battery for any reason? Because in that case you need to re-initialize the real-time clock at OF level. There is a forth script floating around somewhere to fix it, hopefully still available...
I had simular problems on Efika when battery power went low. Replacing by a new battery causes simular problems, as the clock was floating around.

Beside the clock at least on Efika the mac address is also changing to an alternative value.

This is how I fixed it:

1. Remove battery
2. power on and try to set clock.
3. read clock and compare if it's still correct.
4. If the time is now correct, then put (carefully) the battery without shutting down the system. Now problem is solved.
5. if the time is still incorrect, then power down, wait a few minutes, power up and restart with step 2.

This worked for me. Using the system over a month now and the problems are gone and never returned.

Geit


Top
   
 Post subject:
PostPosted: Wed Jul 04, 2007 1:40 am 
Offline

Joined: Tue Oct 10, 2006 2:15 am
Posts: 35
I didn't remove the battery, but my Peg was in transit for 2 months.

I don't like the idea of fiddling with the motherboard while powered up and I can't imagine how this procedure would be successful (OF resets itself when it doesn't find the battery ?)

The weird thing is that MOS is happy with the time. It's only SUSE that has problems.

The OF script sounds better. Any chance you remember some key words so I can search for it ?


Top
   
 Post subject:
PostPosted: Wed Jul 04, 2007 4:25 am 
Offline

Joined: Thu Jul 28, 2005 12:41 am
Posts: 1066
It was rtc, as far as I can remember. It fall victim of a regular clean up of my /dev/hda1, so I don't have it any more...

_________________
CzP
http://czanik.blogs.balabit.com/


Top
   
 Post subject:
PostPosted: Wed Jul 04, 2007 7:30 pm 
Offline

Joined: Tue Oct 10, 2006 2:15 am
Posts: 35
Do you think this might be it ?

(From http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml)
Code:
# decimal dev rtc sec min hour day month year set-time
# The example below sets the clock to 1:23:45 June, 7th, 2000
ok
0 > decimal dev rtc 45 23 1 6 7 2000 set-time
ok
1 >
By the way, scratch all that stuff about time being OK on MOS; it's also broken.


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 2:28 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Do you think this might be it ?
It's not.

http://www.powerdeveloper.org/platforms/pegasos/rtc

Here it is! Download it to a bootable place, and do this;

ok boot hd:0 rtc.forth
ok rtc.reset

There are further instructions inside the script. It basically manually edits the real-time clock's nvram.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Thu Jul 05, 2007 10:44 pm 
Offline

Joined: Tue Oct 10, 2006 2:15 am
Posts: 35
Thanks Matt.


Top
   
 Post subject: It wasn't enough
PostPosted: Wed Jul 11, 2007 1:15 am 
Offline

Joined: Tue Oct 10, 2006 2:15 am
Posts: 35
I tried the rtc script and it reset the clock. I set the time in MorphOS and booted OpenSUSE and checked it again.

After another boot, SUSE changed the time. During the shutdown SUSE saves the time to the hardware clock.

I think SUSE must have some problems with timezones or something. It doesn't seem to be reading the real time clock correctly.


Top
   
 Post subject:
PostPosted: Wed Jul 11, 2007 1:35 am 
Offline

Joined: Thu Jul 28, 2005 12:41 am
Posts: 1066
If you start /sbin/yast2 timezone, what do you see at the lower left part of the screen? 'localtime' or 'UTC'? If you leave it at UTC and then set the correct time, it won't work for MorphOS, which uses 'localtime' for storing the time, or for most of the Linux distributions. So, please set it to 'localtime', and your problems will most probably go away...

_________________
CzP
http://czanik.blogs.balabit.com/


Top
   
 Post subject: Re: It wasn't enough
PostPosted: Wed Jul 11, 2007 8:06 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
I tried the rtc script and it reset the clock. I set the time in MorphOS and booted OpenSUSE and checked it again.

After another boot, SUSE changed the time. During the shutdown SUSE saves the time to the hardware clock.

I think SUSE must have some problems with timezones or something. It doesn't seem to be reading the real time clock correctly.
hwclock has never worked properly on Pegasos. It assumes too much (yucky ISA clocks..), and it should be using RTAS, which should be encapsulated in the /dev/rtc interface. For some reason, on some systems, if you build in ISA style clocks, the RTAS interface through /dev/rtc stops working (wtf..?).

If you want to set your time, please use /proc/rtas/ interface for the most reliable way. It accepts a standard 32-bit value for seconds since 1970 (time_t). Passing in dates and parsing should be done by some other app.

What I would do anyway is remove the hwclock setting from the shutdown procedure. All SuSE needs to do is know the time. Also disable any NTP if you can.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Wed Jul 11, 2007 8:22 am 
Offline

Joined: Thu Jul 28, 2005 12:41 am
Posts: 1066
I hope, my Peg does not now about this problem, as hwclock and ntpdate works here correctly from openSUSE 10.1 :) They also worked fine for 10.0, just booting 10.1 after 10.0 (or vice versa, I don't remember any more) messed up the clock a bit...

_________________
CzP
http://czanik.blogs.balabit.com/


Top
   
 Post subject: Bad RTC
PostPosted: Thu Jul 12, 2007 8:25 pm 
Offline

Joined: Tue Dec 05, 2006 6:26 am
Posts: 34
Location: Santiago, Chile
Koan,

I had a similar issue recently and it worked out to be the power supply that was not fully ATX-compliant (it was an old unit and I suspect the permanent 5V was missing or something).

My cent worth ;-)
Cheers
Olivier


Top
   
 Post subject:
PostPosted: Wed Jul 18, 2007 5:54 pm 
Offline

Joined: Tue Oct 10, 2006 2:15 am
Posts: 35
Thanks for the advice guys.

I tried everything you mentioned, unfortunately nothing worked. I don't know enough about hacking /proc to affect rtas but that is the next thing to look into.

I recently bought a new power supply so I don't think that is the problem. YaST thinks I'm on localtime, not UTC.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 14 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group