LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-08-2010, 05:41 AM   #1
Neon20_180
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 0
I loose an hour every time I reboot my PC


Hello there,

I was wondering if any one came across that issue before. Everytime I reboot my PC something (I assume GNOME) reset my system clock to an hour behind what is was the last time. So if a reboot twice in a row that'll be two hours behind and so on. It used to work fine until I had to change my system time backward temporally to overcome and issue with GPG. Since I put it back I get that phenomena. It's like it's adjusting it for the Day light saving everytime a boot. Problem is Japan does not have any day light saving.
I run OpenSuse 11.2 with Gnome 2.28.2 as my interface.
I'm currently located in Japan GMT+9 not DST.
/etc/localtime -> /usr/share/zoneinfo/Asia/Tokyo

I suspect a bug in Gnome or Yast. It's not user specific because the time is already altered even before I log it.

Now If anyone has a clue about how to fix that, I'll be much grateful.

Thank you
 
Old 08-08-2010, 07:18 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I don't have a clue about fixing it (BIOS, hwclock, env TZ, init scripts) but how about countering it by using NTP?
 
Old 08-08-2010, 03:04 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,998

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I would normally say a ntp issue. Not sure how a reboot could do that more than once.


The only other thought is using USA devices on 50Hz Japan power. Can't say how that would do it, normally the time is at wrong speed.

Try to boot with all network access off, remove ethernet.

Simply boot to bios and check time a few times. Be sure to do a cold boot. I mean cold. Remove ac plug and press power a few times, then return plug and boot to bios. Does it keep changing?
 
Old 08-08-2010, 04:57 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
You don't say if you are "dual-booting" with windows.

Win handles time very differently from linux, and this can lead to (stupid, but fixable) problems.

Some more information, please.

And welcome to LQ!
 
Old 08-09-2010, 07:01 PM   #5
Neon20_180
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you all for taking time to reply to my post.
It is a weird bug, it must be Gnome. It only started recently after I moved the clock backward temporarily. I should reboot the system at init 3 and see if that occur. Even if I can blame it on Gnome that won't help me though but that's a lead.

In the mean time I am going to play with hwclock and have a read about NTP.

Quote:
You don't say if you are "dual-booting" with windows.
I am running Windows XP but virtually so that can't be the cause.
 
Old 08-09-2010, 10:08 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,998

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Try to boot with all network access off, remove ethernet.

Simply boot to bios and check time a few times. Be sure to do a cold boot. I mean cold. Remove ac plug and press power a few times, then return plug and boot to bios. Does it keep changing?
 
Old 08-10-2010, 09:50 AM   #7
Neon20_180
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
I did try a cold boot but it doesn't make a difference.

Cold or warm if I get into the BIOS the time is the same as the last time I shut down the PC. It's later on during boot time that the clock gets modified.
That's a weird one.
I ran some tests by loading Linux at different run level.
The first time I boot Linux under level 1 the clock changes back an hour. The next consecutive time at level 1 the clock remains the same.
Alternatively the first time I boot the system from level 1 to level [2 or 3 or 5] the clock don't change, but the next time the clock will change back an hour.
That's beyond my understanding, my last hope is NTP or a kernel update.
 
Old 08-10-2010, 10:07 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Cold or warm if I get into the BIOS the time is the same as the last time I shut down the PC.
This would imply that your CMOS clock hardware is broken, or the battery is flat, but perhaps I misunderstand you, and you mean the time error (if any) is the same as it was when you last shot down (in which case the HWclock is OK).

My guess is that when your PC boots, and the network is up, ntp is setting the time for you. I don't understand why ntp is out by an hour though.
Anything interesting in one of your environment variables?

Quote:
I am running Windows XP but virtually so that can't be the cause.
I don't run anything in a VM, so it is difficult to offer advice here, but maybe you should double-check that windows (even in a VM) isn't the cause. I suspect it might be.
 
Old 08-10-2010, 10:09 AM   #9
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
This is a weird situation indeed.


Here's a couple more ideas:

See if you have `zic` on your system. zic is the 'timezone compiler' and the manpage may give you some clue or hint about something else to investigate. If you don't have the manpage for zic, then your system doesn't use it so don't worry about that.

Second: if it were me, I'd be having a good look at my init and shutdown scripts, and examine any code having to do with reading or setting or saving the time during boot or shutdown. I don't know how something like this weird situation would start pretty much by itself (or how an init script would get altered without the admin altering it), but it'd be worth a look anyhow.

Good luck - keep us posted.
 
Old 08-10-2010, 01:53 PM   #10
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Don't what the cause might be, but a workaround might (might) be to put this line in /etc/init.d/halt.local

Code:
/sbin/hwclock --systohc
Which will set the hardware clock to whatever Linux currently thinks the time is. Obviously you need to make sure Linux knows the correct time before you try this.
 
Old 08-10-2010, 04:04 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,998

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
When you boot to a live cd does it work correctly?
 
Old 08-10-2010, 09:21 PM   #12
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
I also have to venture that this is probably an error somewhere in the configuration scripts for the time. Possibly something with gnomes time management or what not. I would rule out any hardware issues since time was unaffected when you prevented the system from booting into the OS. One thing to note is you can set your bios to UTC and then setup your time stuff to give you the time based on your time zone. If you don't do this the time zone information is ignored and time is retrieved from the bios.
 
Old 08-12-2010, 07:21 PM   #13
Neon20_180
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks you all for your help. I'm going to try your suggestions to night, I'll keep you posted.

Cheers,
 
Old 08-12-2010, 07:39 PM   #14
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,462
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Funny... I lose entire evenings when I turn on my PC...
 
  


Reply

Tags
clock



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntp time off by 1 hour schneidz Linux - Software 8 03-16-2008 10:30 PM
Why do I loose Linux when I shutdown or reboot ? wertaylors Linux - General 4 04-06-2007 02:52 AM
linux time changes 1 hour -- after reboot mrconover Linux - Software 4 10-07-2004 05:13 PM
Why is the time always an hour behind? aaa LQ Suggestions & Feedback 6 07-23-2003 12:34 PM
clock keeps going forward one hour every reboot. Frustin Linux - General 2 08-08-2002 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration