# Computer clock  / System speed [SOLVED]

## pbardet

My computer loses 10s per minute, even more if it compiles stuff.

The worst I've seen was during CD burning. Burning a CD took about 8 minutes, but the clock advanced only by 2 minutes. K3B was even screwed up as it reported burning speeds of about 120x while my burner is supposed to be 40x.

I tried to install NTP to fix the problem, but it seems that much difference screws it up. NTP always crashes after a few minutes.

Computer is a Dual Athlon MP 2GHz and seems slow and sluggish compared to my old Dual Athlon 1GHz. I can't listen to music while compiling for example while I've never had this problem on the old computer. Something seems definitely wrong with this new computer but I can't figure what.

New computer is running on Tyan Tiger MPX while the old one is running on Tyan Tiger MP.Last edited by pbardet on Fri Apr 22, 2005 12:37 pm; edited 2 times in total

----------

## pbardet

Here is dmesg output. This may help

```
natasha root # dmesg

Linux version 2.6.11-gentoo-r4 (root@natasha) (gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)) #1 SMP Thu Mar 17 21:40:52 CST 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)

 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000ca000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000003fef0000 (usable)

 BIOS-e820: 000000003fef0000 - 000000003feff000 (ACPI data)

 BIOS-e820: 000000003feff000 - 000000003ff00000 (ACPI NVS)

 BIOS-e820: 000000003ff00000 - 000000003ff80000 (usable)

 BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved)

 BIOS-e820: 00000000fec00000 - 00000000fec04000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

Warning only 896MB will be used.

Use a HIGHMEM enabled kernel.

896MB LOWMEM available.

found SMP MP-table at 000f7170

On node 0 totalpages: 229376

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 225280 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 PTLTD                                 ) @ 0x000f7100

ACPI: RSDT (v001 PTLTD    RSDT   0x06040000  LTP 0x00000000) @ 0x3fefcf28

ACPI: FADT (v001 AMD    TECATE   0x06040000 PTL  0x000f4240) @ 0x3fefef2e

ACPI: MADT (v001 PTLTD           APIC   0x06040000  LTP 0x00000000) @ 0x3fefefa2

ACPI: DSDT (v001    AMD  AMDACPI 0x06040000 MSFT 0x0100000d) @ 0x00000000

ACPI: Local APIC address 0xfee00000

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x01] enabled)

Processor #1 6:6 APIC version 16

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)

Processor #0 6:6 APIC version 16

ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])

ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)

ACPI: IRQ0 used by override.

ACPI: IRQ2 used by override.

ACPI: IRQ9 used by override.

Enabling APIC mode:  Flat.  Using 1 I/O APICs

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 40000000 (gap: 40000000:bec00000)

Built 1 zonelists

Kernel command line: root=/dev/hda3 vga=0x31B

mapped APIC to ffffd000 (fee00000)

mapped IOAPIC to ffffc000 (fec00000)

Initializing CPU#0

CPU 0 irqstacks, hard=c05cc000 soft=c05ca000

PID hash table entries: 4096 (order: 12, 65536 bytes)

Detected 1667.062 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 903752k/917504k available (3342k kernel code, 13240k reserved, 1281k data, 256k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 3276.80 BogoMIPS (lpj=1638400)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU: After generic identify, caps: 0383fbff c1cbfbff 00000000 00000000 00000000 00000000 00000000

CPU: After vendor identify, caps: 0383fbff c1cbfbff 00000000 00000000 00000000 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

CPU: After all inits, caps: 0383fbff c1cbfbff 00000000 00000020 00000000 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

CPU0: AMD Athlon(tm) MP 2000+ stepping 02

per-CPU timeslice cutoff: 731.01 usecs.

task migration cache decay timeout: 1 msecs.

Booting processor 1/0 eip 3000

CPU 1 irqstacks, hard=c05cd000 soft=c05cb000

Initializing CPU#1

Calibrating delay loop... 3325.95 BogoMIPS (lpj=1662976)

CPU: After generic identify, caps: 0383fbff c1cbfbff 00000000 00000000 00000000 00000000 00000000

CPU: After vendor identify, caps: 0383fbff c1cbfbff 00000000 00000000 00000000 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

CPU: After all inits, caps: 0383fbff c1cbfbff 00000000 00000020 00000000 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#1.

CPU1: AMD Athlon(tm) Processor stepping 02

Total of 2 processors activated (6602.75 BogoMIPS).

ENABLING IO-APIC IRQs

..TIMER: vector=0x31 pin1=2 pin2=-1

checking TSC synchronization across 2 CPUs: passed.

Brought up 2 CPUs

CPU0 attaching sched-domain:

 domain 0: span 1

  groups: 1

  domain 1: span 3

   groups: 1 2

CPU1 attaching sched-domain:

 domain 0: span 2

  groups: 2

  domain 1: span 3

   groups: 2 1

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfd7d0, last bus=2

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

mtrr: your CPUs had inconsistent fixed MTRR settings

mtrr: probably your BIOS does not setup all CPUs.

mtrr: corrected configuration.

ACPI: Subsystem revision 20050211

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.OP2P._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 *5 10 11)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 5 10 11) *0, disabled.

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 5 10 *11)

ACPI: PCI Interrupt Link [LNKD] (IRQs 3 5 *10 11)

Linux Plug and Play Support v0.97 (c) Adam Belay

pnp: PnP ACPI init

pnp: PnP ACPI: found 13 devices

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

** PCI interrupts are no longer routed automatically.  If this

** causes a device to stop working, it is probably because the

** driver failed to call pci_enable_device().  As a temporary

** workaround, the "pci=routeirq" argument restores the old

** behavior.  If this argument makes the device work again,

** please email the output of "lspci" to bjorn.helgaas@hp.com

** so I can fix the driver.

pnp: 00:05: ioport range 0x4d0-0x4d1 has been reserved

Machine check exception polling timer started.

apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)

apm: disabled - APM is not SMP safe.

audit: initializing netlink socket (disabled)

audit(1113164836.904:0): initialized

inotify device minor=63

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

BIOS failed to enable PCI standards compliance, fixing this error.

lp: driver loaded but no devices found

Linux agpgart interface v0.100 (c) Dave Jones

[drm] Initialized drm 1.0.0 20040925

ACPI: PCI interrupt 0000:01:05.0[A] -> GSI 18 (level, low) -> IRQ 18

matroxfb: Matrox G450 detected

matroxfb: MTRR's turned on

matroxfb: 640x480x8bpp (virtual: 640x26214)

matroxfb: framebuffer at 0xF6000000, mapped to 0xf8880000, size 33554432

Console: switching to colour frame buffer device 80x30

fb0: MATROX frame buffer device

matroxfb_crtc2: secondary head of fb0 was registered as fb1

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (FF) [SLPF]

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

mice: PS/2 mouse device common for all mice

input: AT Translated Set 2 keyboard on isa0060/serio0

input: ImPS/2 Generic Wheel Mouse on isa0060/serio1

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP(,...)]

lp0: using parport0 (interrupt-driven).

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

FDC 0 is a post-1991 82077

ACPI: PCI interrupt 0000:02:08.0[A] -> GSI 19 (level, low) -> IRQ 19

3c59x: Donald Becker and others. www.scyld.com/network/vortex.html

0000:02:08.0: 3Com PCI 3c905C Tornado at 0x2000. Vers LK1.1.19

Linux video capture interface: v1.00

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

Probing IDE interface ide0...

hda: Maxtor 6B200P0, ATA DISK drive

hdb: WDC WD1000BB-75CHE0, ATA DISK drive

Probing IDE interface ide1...

hdc: ATAPI DVD DD 2X16X4X16, ATAPI CD/DVD-ROM drive

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 1024KiB

hda: 398297088 sectors (203928 MB) w/8192KiB Cache, CHS=24792/255/63

hda: cache flushes supported

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4

hdb: max request size: 128KiB

hdb: 195371568 sectors (100030 MB) w/8192KiB Cache, CHS=65535/16/63

hdb: cache flushes not supported

 /dev/ide/host0/bus0/target1/lun0: p1 p2

hdc: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache

Uniform CD-ROM driver Revision: 3.20

libata version 1.10 loaded.

ieee1394: raw1394: /dev/raw1394 device initialized

ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ACPI: PCI interrupt 0000:02:00.0[D] -> GSI 19 (level, low) -> IRQ 19

ohci_hcd 0000:02:00.0: Advanced Micro Devices [AMD] AMD-768 [Opus] USB

ohci_hcd 0000:02:00.0: irq 19, pci mem 0xf4900000

ohci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 4 ports detected

USB Universal Host Controller Interface driver v2.2

usb 1-1: new full speed USB device using ohci_hcd and address 2

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

w83781d 3-002d: Subclient 0 registration at address 0x49 failed.

Advanced Linux Sound Architecture Driver Version 1.0.8 (Thu Jan 13 09:39:32 2005 UTC).

ACPI: PCI interrupt 0000:02:04.0[A] -> GSI 16 (level, low) -> IRQ 16

Audigy2 value:Special config.

ALSA device list:

  #0: Sound Blaster Audigy2_Value (rev.0, serial:0x10011102) at 0x2080, irq 16

oprofile: using NMI interrupt.

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 64Kbytes

TCP established hash table entries: 131072 (order: 9, 2097152 bytes)

TCP bind hash table entries: 65536 (order: 7, 786432 bytes)

TCP: Hash tables configured (established 131072 bind 65536)

ip_conntrack version 2.1 (7168 buckets, 57344 max) - 220 bytes per conntrack

ip_tables: (C) 2000-2002 Netfilter core team

ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/

arp_tables: (C) 2002 David S. Miller

NET: Registered protocol family 1

NET: Registered protocol family 17

Starting balanced_irq

ACPI wakeup devices:

PCI0 OP2P USB0

ACPI: (supports S0 S1 S4 S5)

ReiserFS: hda3: found reiserfs format "3.6" with standard journal

ReiserFS: hda3: using ordered data mode

ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda3: checking transaction log (hda3)

ReiserFS: hda3: Using r5 hash to sort names

VFS: Mounted root (reiserfs filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 256k freed

Adding 2008116k swap on /dev/hda2.  Priority:-1 extents:1

ReiserFS: hda4: found reiserfs format "3.6" with standard journal

ReiserFS: hda4: using ordered data mode

ReiserFS: hda4: journal params: device hda4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda4: checking transaction log (hda4)

ReiserFS: hda4: Using r5 hash to sort names

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hdb1, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hdb2, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

devfs_mk_dev: could not append to parent for vcc/2

devfs_mk_dev: could not append to parent for vcc/a2

devfs_mk_dev: could not append to parent for vcc/5

devfs_mk_dev: could not append to parent for vcc/a5

devfs_mk_dev: could not append to parent for vcc/6

devfs_mk_dev: could not append to parent for vcc/7

devfs_mk_dev: could not append to parent for vcc/a7

devfs_mk_dev: could not append to parent for vcc/8

devfs_mk_dev: could not append to parent for vcc/a8

devfs_mk_dev: could not append to parent for vcc/9

devfs_mk_dev: could not append to parent for vcc/11

devfs_mk_dev: could not append to parent for vcc/4

devfs_mk_dev: could not append to parent for vcc/a4

ACPI: PCI interrupt 0000:02:08.0[A] -> GSI 19 (level, low) -> IRQ 19

devfs_mk_dev: could not append to parent for vcc/2

devfs_mk_dev: could not append to parent for vcc/a2

devfs_mk_dev: could not append to parent for vcc/3

devfs_mk_dev: could not append to parent for vcc/a3

devfs_mk_dev: could not append to parent for vcc/5

devfs_mk_dev: could not append to parent for vcc/a5

devfs_mk_dev: could not append to parent for vcc/6

devfs_mk_dev: could not append to parent for vcc/a6

devfs_mk_dev: could not append to parent for vcc/7

devfs_mk_dev: could not append to parent for vcc/a7

Losing too many ticks!

TSC cannot be used as a timesource.

Possible reasons for this are:

  You're running with Speedstep,

  You don't have DMA enabled for your hard disk (see hdparm),

  Incorrect TSC synchronization on an SMP system (see dmesg).

Falling back to a sane timesource now.

```

When running hdparm, looks like dma is not setup and I can't activate it while I have AMD support in my kernel.

```
natasha root # hdparm /dev/hda

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 24792/255/63, sectors = 203928109056, start = 0

natasha root # hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 6B200P0, FwRev=BAH41B70, SerialNo=B40R5VYH

 Config={ Fixed }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57

 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 udma6

 AdvancedPM=yes: disabled (255) WriteCache=enabled

 Drive conforms to: (null):

 * signifies the current active mode

natasha root # hdparm -d 1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

----------

## Master Shake

I don't know if this will help you but it just might.  In your kernel do you have the option:

```

Device Drivers ->

Character devices ->

[*] Enhanced Real Time Clock Support

```

What that does is it gives you access to your hardware clock.  So if it is a software problem that should fix it.

----------

## pbardet

Thanks for the tip.

I haven't been able to try it completely (ie setup the /dev/rtc) but it's recompiled.

While recompiling, I went through all kernel menus and found out I had two different chipsets enabled in my kernel. Can't remember the sub-menu for sure as I tested lots of stuff but it was related to the motherboard/chipset used on it. I don't know when that second option was enabled, but it sounds like I overlooked a question when migrating the kernel from 2.6.X to 2.6.11 with make oldconfig. I'll have to do diffs between my .configs, if I can find some spare time...

I believe they were conflicting with each other and prevented me from enabling DMA but in such a way that the boot process would not complain about it as it used to be the case when I first installed the machine. It's now been 12 hour the machine runs, and I've lost 5 seconds only. I tried to recompile stuff during that time and it did not move the clock.

hdparm now indicates that DMA is enabled at full speed.

I need to do some more checks tonight when I get back from work to make sure the machine is not sluggish anymore, as well as restart ntpd, and I'll update the topic as solved if all works out.

----------

## pbardet

And I'm back with my original problem. NTP won't start.

Actually, it starts and crashes right away without error message in ntp.log.

It adjusts the clock once and dies.

Any idea where the problem could come from ?

I've searched the forums. The only thing I found out was about a dying CMOS battery

but I exchanged both batteries from the computer where all works fine and the one

where it doesn't, and it's still the same. So the battery doesn't seem to be an issue.

----------

## pbardet

I finally spent some more time starting ntpd by hand with -d option or not. Everything works fine. ntpd stays alive

If I use the /etc/init.d/ntpd script, it exits after a little while and the process disappears but the script says it's all fine.

It's driving me nuts. It doesn't look it's about the config.

----------

## pbardet

And thanks to davison, my problem was with the ownership on /var/log/ntp.log.

For some reason (but after running ntpd as root for debugging purpose, there no way it could be otherwise), it belonged to root, instead of ntp.

----------

