LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-16-2010, 06:34 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
System sets wrong values for time at boot and to hwclock during shutdown.


Booting from a correct time value set in the BIOS the system gets the correct time via "rtc_cmos" as shown by "dmesg". "date" and the KDE clock show only minutes later a jump of usually (but not always) about six hours. Shutting down the machine writes "saving system time to hardware clock" (or a message of this gist). The BIOS then can have values of plus or minus(!) several hours around the true time. If I don't correct it, the next jump into the future will be larger.

I renamed "/etc/adjtime".

The specs of my homebuilt machine: Gigabyte GA-890GPA-UD3H (with integrated Radeon HD 4290), Phenom II X6, Seagate ST31000520AS (1 TB), Sapphire ATI Radeon HD5450.

At first I believed this to be boot-related only. Then I thought it is hardware. Now I know it is software: I booted openSuSE 11.2 without any problems on the same machine in a dual boot where openSuSE 11.3 stumbles: must be software in 11.3.

Any suggestions of what I should do? What governs the system timer? Can it be configured? I can do a "hwclock --hctosys" from a script / cron but that is just fighting symptoms. Same with a re-install (Windows anybody? ) since at first this didn't happen. But I'd like to understand this.

Can it be related to the dynamic frequency adjustments ("Turbo Core") of the Phenom CPUs? If so, what to do?

<edit> In fulfillment of unSpawn's wishes as expressed here:
http://www.linuxquestions.org/questi...5/#post4181264

This is what I asked first (wrong question #1):
http://www.linuxquestions.org/questi...r-boot-844173/

This is what I asked next (wrong question #2):
http://www.linuxquestions.org/questi...reboot-844338/

The solution is in this very thread. </edit>

Last edited by JZL240I-U; 12-06-2010 at 02:29 AM.
 
Old 11-16-2010, 09:48 AM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Wonderful, you've discovered time travel....

It's odd that you didn't see the problem with Suse 11.2, but you do see it with 11.3. So, I guess there is some timing issue with 11.3, but I'm not seeing it on my system. I use Intel CPUs, so it may be a problem with your combination.

You could set up ntpd to adjust the time frequently. A simple matter to do, but it isn't telling you anything about WHY the problem exists. You might try searching, or submitting, a bug report.
http://en.opensuse.org/Bugs

I hope you get it figured out.
 
Old 11-16-2010, 10:14 AM   #3
fbianconi
Member
 
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
look in here:
http://forums.opensuse.org/english/g...ezone-set.html

Most OSes use UTC (the one and only universal and coordinate) on hardware, and it convert to local time when needed, windows uses local time (meaning that windows still suffers jet-lag and from that you get ugly interactions, you have some options here:

*make windows use UTC
http://weblogs.asp.net/dfindley/arch...Pro_2900_.aspx
*make linux use localtime (this depends on how your distribution launches hwclock to set the system time from the hardware clock)
on suse you should be able to set that up with yast (I'm just guessing)

Quote:
Can it be related to the dynamic frequency adjustments ("Turbo Core") of the Phenom CPUs? If so, what to do?
Not a matter of hours, more like a few minutes a week, but if it happens it's probably a hardware malfunction. When I had that i did set up a NTPD. It can learn about this systematic error after a while.
 
Old 11-17-2010, 01:14 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by udaman View Post
Wonderful, you've discovered time travel....
Hah, now you crack jokes after fiddling with the knobs in your menuconfig prior to bake an arcane version of a kernel which can even reach into the future. I suspect it changes time settings all over the multiverse, I just can't prove it .

Quote:
Originally Posted by udaman View Post
...but I'm not seeing it on my system. I use Intel CPUs, so it may be a problem with your combination.
And this is the answer for the question I would have asked next. Now I think it is your uncanny temporal abilities which stained the poor kernel during its creation .

Quote:
Originally Posted by udaman View Post
...You could set up ntpd to adjust the time frequently. A simple matter to do, but it isn't telling you anything about WHY the problem exists. You might try searching, or submitting, a bug report.
http://en.opensuse.org/Bugs...
Exactly. I want to know the workings of this thing. Okay, it might still be out of my reach (this time. I don't forget something like this and will keep my eyes open).

If I understood correctly you produced a custom kernel with your own modifications of the configuration. SuSE will most probably decline to accept this as their bug (if bug it is). No, the easiest way out is to install their kernel-desktop from the Novell repository (keeping yours as well) -- which I can do anytime I need to, thanks to your gracious gift of copies of your kernel and initrd .

Last edited by JZL240I-U; 11-17-2010 at 08:33 AM.
 
Old 11-17-2010, 01:31 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fbianconi View Post
look in here:..
Thanks for these hints, fbianconi, but I don't have any Windows on my box , I dual boot with linux (and FreeBSD). The hardware clock is set to UTC.


Quote:
Originally Posted by fbianconi View Post
...{Turbo-Core}...Not a matter of hours, more like a few minutes a week, but if it happens it's probably a hardware malfunction. When I had that i did set up a NTPD. It can learn about this systematic error after a while.
How so "a few minutes a week" when the frequency jumps from 2.8 GHz to 3.2 GHz? I'd have guessed at a ~10 % difference it would be more.

I could of course use ntpd. Problem is, the error is not systematic, that's why I wrote the time jumps: It really gains and loses in steps, not as a smooth function. And since this error does not occur with SuSE 11.2_32 on the same machine it must be caused by 11.3_64 since the hardware didn't change.

Thanks for your input .
 
Old 11-17-2010, 08:27 AM   #6
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Quote:
Originally Posted by JZL240I-U View Post
If I understood correctly you produced a custom kernel with your own modifications of the configuration. SuSE will most probably decline to accept this as their bug (if bug it is). No, the easiest way out is to install their kernel-desktop from the Novell repository (keeping yours as well) -- which I can do anytime I need to, thanks to your gracious gift of copies of your kernel and initrd .
Got ya!! No, the kernel I mailed you is the stock kernel from Suse. The initrd I sent was built for my system, based on the kernel. You could easily build your own initrd and replace the one I sent. In fact, you should do so, and see if THAT solves your time traveling issue.

Back to the future?
 
1 members found this post helpful.
Old 11-17-2010, 08:41 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by udaman View Post
Got ya!! No, the kernel I mailed you is the stock kernel from Suse. The initrd I sent was built for my system, based on the kernel.
Even more sinister, an innocent looking initrd with a timed payload. Devastating. Erm.

Quote:
Originally Posted by udaman View Post
You could easily build your own initrd and replace the one I sent. In fact, you should do so, and see if THAT solves your time traveling issue.
Reading up on mkinitrd it is, then... Uargh, that means I have to download the sources. So it's not nonight .

Quote:
Originally Posted by udaman View Post
Back to the future?
Not yet, I'm shipwrecked here.
 
Old 11-17-2010, 08:53 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Hmm.

Quote:
Synopsis
mkinitrd [--version] [-v] [-f] [--preload=module] [--omit-scsi-modules] [--omit-raid-modules] [--omit-lvm-modules] [--with=module] [--image-version] [--fstab=fstab] [--nocompress] [--builtin=module] [--nopivot] image kernel-version
What modules need to be preloaded? Which ones to add [--with=module]? What is "image" and the syntax of "kernel-version"?

That means more reading than just the man page...

Last edited by JZL240I-U; 11-17-2010 at 08:59 AM.
 
Old 11-17-2010, 09:09 AM   #9
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Matthias,

You're over thinking this. It's not as complex as you suggest.

Code:
cd /boot
mkinitrd -c -k 2.6.33.4 -m ext4 -o initrd-huge-2.6.33.4.gz
Those are the exact commands I used when I made mine.

You should rename your current initrd, or save it to another location, the command above will overwrite it. Change the ext4 in my command to meet your file system. If you choose another name for the new initrd, than don't forget to change it in menu.lst and re-run grub.

This should be all you need to do for initrd. Let me know.
 
Old 11-17-2010, 09:11 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Thank you for the above command. I'll report as soon as I have results. Please be patient.
 
Old 11-17-2010, 09:20 AM   #11
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
My daughter has some work for me to do today, so I'll be away from the keyboard. I'll check back later this evening.

If you need to install kernel sources, it should be simple to do through Yast.
 
Old 11-18-2010, 01:19 AM   #12
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by udaman View Post
...I'll check back later this evening...
Good morning udaman . You'll see from the time stamps I'll post below <edit> no, you won't, "ls -la" left out the timestamp </edit>, that you probably came back when I was fast asleep -- you know, all these time lags .

First things first: SUCCESS

Now, I didn't really believe in this and I actually didn't dare to substitute my newly created initrd for some time, since my wife needed the computer and I was not sure I wanted to do repairs late in the evening with her hovering angrily in the background. All unnecessary. Worked like a charm .

This is what I used:

Code:
mkinitrd -k /boot/vmlinuz-2.6.34.7-0.5-desktop -m ext4 -i initrd-2.6.34.7-0.5-desktop
For anyone trying this, udaman's "-c" was unknown to my system and it also needed "-i" instead of "-o". After that all was well. I didn't even need the sources.

This is the content of my /boot:

Quote:

total 43863
-rw------- 1 root root 50 Nov 4 19:50 .directory
-rw-r--r-- 1 root root 1996824 Nov 4 19:47 System.map-2.6.34-12-desktop
-rwxr-xr-x 1 root root 1998345 Nov 5 09:02 System.map-2.6.34.7-0.5-desktop
-rw------- 1 root root 512 Nov 3 20:09 backup_mbr
lrwxrwxrwx 1 root root 1 Nov 3 20:02 boot -> .
-rw-r--r-- 1 root root 1236 Jul 1 17:00 boot.readme
-rw-r--r-- 1 root root 115858 Jul 5 15:24 config-2.6.34-12-default
-rw-r--r-- 1 root root 111090 Nov 4 19:47 config-2.6.34-12-desktop
-rwxr-xr-x 1 root root 111193 Nov 5 09:02 config-2.6.34.7-0.5-desktop
drwxr-xr-x 2 root root 1024 Nov 11 07:09 grub
lrwxrwxrwx 1 root root 24 Nov 3 20:09 initrd -> initrd-2.6.34-12-default
-rw-r--r-- 1 root root 9757567 Nov 3 20:09 initrd-2.6.34-12-default
-rw-r--r-- 1 root root 10264724 Nov 17 2010 {about 21:35 } initrd-2.6.34.7-0.5-desktop
-rwxr-xr-x 1 root root 6901292 Nov 5 14:51 initrd-2.6.34.7-0.5-desktop-udaman

drwx------ 2 root root 12288 Nov 3 20:02 lost+found
-rw-r--r-- 1 root root 160280 Jul 6 00:17 memtest.bin
-rw-r--r-- 1 root root 424448 Nov 3 20:09 message
-rw-r--r-- 1 root root 189981 Jul 5 15:25 symvers-2.6.34-12-default.gz
-rw-r--r-- 1 root root 187496 Nov 4 19:47 symvers-2.6.34-12-desktop.gz
-rw-r--r-- 1 root root 4782992 Jul 5 15:23 vmlinux-2.6.34-12-default.gz
lrwxrwxrwx 1 root root 25 Nov 3 20:02 vmlinuz -> vmlinuz-2.6.34-12-default
-rw-r--r-- 1 root root 3787008 Jul 5 15:12 vmlinuz-2.6.34-12-default
-rwxr-xr-x 1 root root 4100480 Nov 5 09:02 vmlinuz-2.6.34.7-0.5-desktop

As you can see the new initrd is about 4 MB larger than what you sent me. Can you recall what modules you left out? I'd dearly love to know, since there are even more funny effects besides "temporal jumping", e.g. the very unobtrusive background picture behind the messages during boot and shutdown are back...

All in all an instructive episode even if I still don't grasp the details of the systems workings.

I do deeply appreciate your help and support, udaman. Thank you and all the best at all times .

Last edited by JZL240I-U; 11-30-2010 at 03:35 AM.
 
Old 11-18-2010, 02:21 AM   #13
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Very pleased that you solved it and thanks for updating all the threads, cross-referencing them and marking them SOLVED
 
Old 11-18-2010, 08:01 AM   #14
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
Well, it's just before 9am here in New England, and I'm still shaking the sleep from my eyes. Yes, retirement is wonderful, in that I can stay up late and get up late.

Glad for you JZL! It's a real feeling of accomplishment when we try something new and scarey, and it is a success.

After reading your report, and seeing the differences in the command, I realized I wasn't making the initrd for my Suse system, but for my Slackware system. I do apologize for any confusion I cause you, but I see you handled things just fine.

Now let's see if that clears up your timing issue.
 
Old 11-18-2010, 08:06 AM   #15
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by udaman View Post
Well, it's just before 9am here in New England, and I'm still shaking the sleep from my eyes. Yes, retirement is wonderful, in that I can stay up late and get up late.
That's what I dream of on a daily basis.

Quote:
Originally Posted by udaman View Post
...Now let's see if that clears up your timing issue.
It did. At least a brief test yesterday night (my night ) showed no more confusion in the time values. I'd rate the probability of a relapse quite low. Be sure that I'll be back if it is not so .
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] hwclock (BIOS): time set wrong during shutdown and also reboot. JZL240I-U Linux - Hardware 14 11-18-2010 01:57 AM
ntpdate sets the wrong time [fixed] xnomad Linux - Software 5 01-22-2010 03:09 PM
one time password wrong,system goes to shutdown srinivasmiriyalu Linux - General 5 06-26-2009 10:59 AM
ntpd sets time wrong jimjones Linux - Software 1 02-19-2009 08:45 PM
Tried to set time with hwclock and entered something wrong! Rhiaanon Linux - Newbie 8 05-21-2007 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:04 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