[SOLVED] Clock lags even with NPT installed

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

[SOLVED] Clock lags even with NPT installed

Unread post by mirix » Thu Aug 22, 2013 7:42 pm

Hello,

I have just installed this thing:

http://sourceforge.net/projects/linuxbb ... o/download

carried out a full d-u and fed it with some stuff such as xfce4-goodies, xscreensaver, ntpdate and other superfluous items.

$uname -a
Linux roxal 3.7-5.towo-siduction-amd64 #1 SMP PREEMPT Mon Jan 28 11:31:41 UTC 2013 x86_64 GNU/Linux

I have noticed that the clock lags quite substantially (like half and hour every few hours or so). Maybe it happens when the screensaver is running, but I am not sure.

I googled this weird problem and the solution seems to be installing NTP. So, I reinstalled NTP, checked the configuration files and rebooted. To no avail, this thing keeps having its own slow notion of time...

Attached is my ntp.conf file.

Cheers,

Miro
Attachments
ntp.conf.txt
(1.94 KiB) Downloaded 152 times
Last edited by mirix on Fri Aug 23, 2013 12:52 pm, edited 1 time in total.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Clock lags even with NPT installed

Unread post by wuxmedia » Thu Aug 22, 2013 8:30 pm

this interesting link might be of some help.
https://wiki.archlinux.org/index.php/Time
try this verify your servers;

Code: Select all

$ ntpdq -np
should spit a bunch of IPs out.
maybe your /var/lib/ntp/ntp.drift file is cuckoo?

otherwise stick

Code: Select all

ntpd -q
in a cron job.
apparently ntpd checks time every 11mins.
good luck Miro, Y U no make intro thread???

ps I take it as red you have no other time problems? CMOS battery failing, dual boot with windows?
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Clock lags even with NPT installed

Unread post by machinebacon » Thu Aug 22, 2013 8:51 pm

Hi,

as root (sudo) run

ntpdate 0.nl.pool.ntp.org

Disable DPMS and the X screen saver, as root

moviemode

And finally disable xscreensaver for a test.

Let the computer run for an hour, then repeat the first command and check how much it has to catch up.
If it's a few seconds, we're safe. If not, we find the culprit, as wux mentioned, could be a few things.
..gnutella..

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: Clock lags even with NPT installed

Unread post by mirix » Thu Aug 22, 2013 9:51 pm

OK. It seems to be reporting the right time now... Fingers crossed ;-)

One problem I found was that the list of servers was defined both in:

/etc/default/ntpdate

and

/etc/ntp.conf

Apparently, one should use either one file or the other but not both at the same time.

But I did not do any manual configuration, so I guess we can call it a bug ;-)

Other than that, the system is running very well this far.

Well, this is a less-than-24-hour test and so... But, anyway, I am so happy with my configuration that I am very tempted to roast my own distro and called Linux Churrascada! No, not really. I am just configuring my old laptop for my mother. She is not going to update it (hopefully), but at least it will be current for the whole first day.

I tried Siduction and Semplice first, but I found them too bloated for my particular taste ;-) LinuxBBQ comes with some bloat as well, but now I have finished removing that bloat and adding more bloat, which may seem a bit pointless and, certainly, it is.

Ah, wait, there is one thing: Synaptic freezes sometimes when selecting packages or rearranging the GUI. Not too often. But Sid people really hate Synaptic, don't we? So why should we give a fiddler's fart about it freezing or boiling or dancing a tango?

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Clock lags even with NPT installed

Unread post by machinebacon » Thu Aug 22, 2013 10:31 pm

The BBQ bloated? Well, you downloaded XFCE, you wanted it this way ;) Seriously: that's the 'old' XFCE4 base - old as in not yet gotten rid of what has caused breakages a few weeks after the release: the freezes you find in Synaptic are side effects of libgtk-3, so the best way to get around it is:

- remove libgtk-3-0 and all the sh*t like LightDM and Synaptic (basically all the gtk3 crap)
- set up an auto-login if the computer is used by Mama and nobody else
- take Hubby/Wifey as replacement if you run into problems. These releases are free of the sh*t that broke previous versions

About the network time, I can't tell you anything about this issue. Definitely not related to BBQ (I didn't touch that part)

Why the bloated dickfaced (gtk3) Synaptic is not popular amongst Sid'ers? Because it is - in its default state - not optimized or designed for Unstable/Experimental sources. The GUI hides more than the command line, and adds no functionality. And most important of all: it doesn't have apt-listbugs -- but APT does. Synaptic has caused bigger borkage than anything else in Sid. It was included because some 'people' (not the real BBQers) were whining - there's no Update Manager and no Synaptic. So, in recent releases I simply made a dead .desktop entry pointing at Update Manager (does nothing, but 'people' stopped whining), and removed Synaptic anyway because of gtk3.
..gnutella..

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: Clock lags even with NPT installed

Unread post by mirix » Fri Aug 23, 2013 8:19 am

OK. I hate to say this: Except for the "technical" parts, my comments are humorous. You should not take them seriously. Of course, BBQ is not bloated and of course GTK3 s*cks. That everybody knows.

However, I find Synaptic useful for certain things. Certainly, not for updating the system. One possible scenario would be when you do not know what you want and you search using keywords. Of course, you can do that from the command line, you can do everything from the console, except maybe watching videos... ;-) but it is nice being able to have a look to the description of each package just by clicking it and thus finding out if that is what you were looking for. If the options are few, the command line can be just as good, but when the options are many, for me at least, Synaptics is more advantageous. Another possible scenario would be packages for which (numerous) other packages provide additional functionality. Typical examples would be LibreOffice and The Gimp, which, in Debian, are "split" in many "subpackages" (including those for localization).

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Clock lags even with NPT installed

Unread post by wuxmedia » Fri Aug 23, 2013 11:32 am

cool, so tentatively solved?
BTW movies from the command line, no probs mplayer2 - full screen - yup, controls (skip 5secs, pause, etc) - yup Framebuffer? -yup!
In fact, sure it's normally easier to double click on VLC/whatever to get a movie open 8)
"Seek, and Ye shall find"
"Github | Chooons | Site"

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: Clock lags even with NPT installed

Unread post by mirix » Fri Aug 23, 2013 11:51 am

Last time I checked, mplayer still required X.

In any case, the duplicity of the ntp servers list was not the culprit. Getting rid of it did not solve the issue.

However, I noticed an approximate 40 minutes discrepancy between date and hwclock. I went to check the BIOS to find that, indeed, that discrepancy came from there. Setting the right UTC time in the BIOS seems to solve the problem this far. But I will wait a few hours before marking the thread as solved.

I bought that laptop in 2007 and it is the first time that the clock gets astray. Maybe I need to replace the battery or maybe it is a side effect of flashing the BIOS last week.

Kind regards,

Miro

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: Clock lags even with NPT installed

Unread post by DebianJoe » Fri Aug 23, 2013 11:53 am

mirix wrote:Last time I checked, mplayer still required X.
Incorrect sir. Mplayer has compatibility with fbdev, so it doesn't require X to work. X is bloat.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

User avatar
RandomCharacter
Gangbanger
Posts: 323
Joined: Thu Aug 15, 2013 5:25 pm

Re: Clock lags even with NPT installed

Unread post by RandomCharacter » Fri Aug 23, 2013 12:46 pm

@mirix - Yes, it is a fact that ntp will not correct the time if it is off by more than a certain amount. Offhand, I cannot remember what that amount is. I believe that you have now fixed your problem.

Here is how I start running ntp on a system that has not been running it:

1) stop ntp
2) Using a list of valid ntp server ip's, run "ntpdate <an ip>" several times to several different ntp servers
3) start ntp

Tim

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by mirix » Fri Aug 23, 2013 3:56 pm

To make this thread more useful, I will try to summarize it and add some additional information I have come across with during my problem-solving research:

1.- When having clock issues, one should probably look first at the output of "hwclock" and "date", respectively. If hwclock gives a significantly wrong value, probably the first thing to do is to adjust the BIOS time. If hwclock keeps lagging anyway after rebooting, it may be a symptom that something is wrong with our CMOS battery.

2.- NTP and ntpdate should not coexist in the same system. In fact, ntpdate should not be installed at all, for it seems to be deprecated.

3.- The Fedora wiki explains that Chrony showcases some advantages over classic NTP. It seems to be more full-featured and easy to configure and to have a lower memory footprint (6 MB NTP vs 1.3 MB Chrony). I have replaced NTP with Chorny and... so far so good.
Last edited by mirix on Fri Aug 23, 2013 4:37 pm, edited 2 times in total.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: [SOLVED] Clock lags even with NPT installed

Unread post by wuxmedia » Fri Aug 23, 2013 4:22 pm

thanks for summarising your findings, mirix
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: [SOLVED] Clock lags even with NPT installed

Unread post by machinebacon » Fri Aug 23, 2013 5:06 pm

ntpdate is perfectly fine if you want to sync your clock once. it's anyway not the same thing like a network time daemon. there's generally no need for a network time daemon ticking in the background - I mean, it's just a freaking desktop PC ;) except if you like shit like GNOME3.x or NT-based windows systems, then of course thou shallst install a daemon for everything :D
..gnutella..

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by mirix » Fri Aug 23, 2013 5:35 pm

I see you have degraded me from Troll to Virgin. Both are inaccurate but Virgin is entirely inaccurate whereas Troll is only partially inaccurate XD

User avatar
Sector11
Sperminator
Posts: 193
Joined: Mon Aug 19, 2013 4:15 am

Re: [SOLVED] Clock lags even with NPT installed

Unread post by Sector11 » Fri Aug 23, 2013 6:06 pm

mirix wrote:I see you have degraded me from Troll to Virgin. Both are inaccurate but Virgin is entirely inaccurate whereas Troll is only partially inaccurate XD
hahahahah better than my "Oyster-Slurper" - BTW, super with Lemon!
I am THE resident noob, hands down no discussion. ... and
I wear my soap on a rope.

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by mirix » Sat Aug 24, 2013 10:20 pm

Hello,

I am back to regain the lost status of Troll!

In fact, none of the above solutions solved the problem.

I also tried adding all kind of kernel parameters such as, but not limited to; clock, clocksource, notsc, etc.

To no avail. I also upgraded from towo kernel 3.7 to towo kernel 3.8 (latest revision). Nothing.

Finally, I upgraded the kernel to the 3.10 Sid kernel (not the towo one, the pure Sid kernel).

In order to follow the evolution of time more precisely, I restarted ntp and syncronised both the hardware and the software clocks (hwclock --systohc).

Now "hwclock && date" shows exactly the same values for both clocks (and those are also the very same values reported by my workstation; not surprisingly for both machines are using the same ntp pools).

So it seems that the towo kernel does not like that old laptop.

This make sense because, using stock Debian kernels, I had never had clock issues in any of my computers (and those of the people I have converted to the True Faith).

For more info, available clock sources are hpet and acpi_pm and current clock source is hpet.

Kind regards,

Miro

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by pidsley » Sat Aug 24, 2013 10:29 pm

Have you tried a stock Debian kernel on this machine? If not, please install one. They are available in your sources. Let us know if that fixes the problem.

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by mirix » Sat Aug 24, 2013 10:31 pm

pidsley wrote:Have you tried a stock Debian kernel on this machine? If not, please install one. They are available in your sources. Let us know if that fixes the problem.
Yep, if you reread my previous message, you will notice that is exactly what I did and that seems to solve the problem.

As I said, I had never experienced clock lags with any operating system. It seems to be a specific problem of recent towo kernels with that particular laptop...

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by pidsley » Sat Aug 24, 2013 10:38 pm

Good. Thank you for marking the topic [solved]. It might be interesting to try a Liquorix kernel or go back to a towo kernel just to make sure that's the problem, and I would not bet that this problem won't return, but that's just my opinion.

mirix
Oyster-Slurper
Posts: 20
Joined: Thu Aug 22, 2013 7:27 pm

Re: [SOLVED] Clock lags even with NPT installed

Unread post by mirix » Sat Aug 24, 2013 10:47 pm

pidsley wrote:Good. Thank you for marking the topic [solved]. It might be interesting to try a Liquorix kernel or go back to a towo kernel just to make sure that's the problem, and I would not bet that this problem won't return, but that's just my opinion.
I have tried Liquorix kernels recently with this laptop (running plain Sid) and they make the system almost unusable: all kind of boot warnings and errors, several minutes to boot (and I need to press Enter several times), etc.

The towo kernel may not like the clock but the Liquorix kernel hates machine as a whole.

All Linux kernels in general, at least those newer than 2.6.32, hate the sound card and the graphics card. And these are Linux-specific problems, both FreeBSD and OpenSolaris run smoothly on this system.

Concerning the reappearance of the clock issues, I honestly hope you are wrong. Before trying BBQ, that machine run (for a long while) stock Lenny, Squeeze, Wheezy, and Sid and, as I mentioned before, I had never experienced such a problem. I will tell you tomorrow...

Post Reply