From owner-freebsd-questions@FreeBSD.ORG Thu Jan 18 20:15:10 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EAD6A16A407 for ; Thu, 18 Jan 2007 20:15:10 +0000 (UTC) (envelope-from hika@bsdmon.com) Received: from bigfugu.bsdmon.com (218.128.101-84.rev.gaoland.net [84.101.128.218]) by mx1.freebsd.org (Postfix) with ESMTP id EC48213C44B for ; Thu, 18 Jan 2007 20:15:09 +0000 (UTC) (envelope-from hika@bsdmon.com) Received: from localhost (localhost [127.0.0.1]) by bigfugu.bsdmon.com (Postfix) with ESMTP id 0F32862AF; Thu, 18 Jan 2007 21:13:59 +0100 (CET) Received: from bigfugu.bsdmon.com ([127.0.0.1]) by localhost (bigfugu.bsdmon.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 65493-19; Thu, 18 Jan 2007 21:13:57 +0100 (CET) Received: from sdf1.bsdmon.com (sdf1.macross.vfx [10.0.1.1]) by bigfugu.bsdmon.com (Postfix) with ESMTP id 780AB62AE; Thu, 18 Jan 2007 21:13:57 +0100 (CET) Date: Thu, 18 Jan 2007 21:14:04 +0100 From: Gilbert Cao To: Jonathan Chen Message-ID: <20070118201404.GB686@bsdmon.com> References: <23251.82.226.60.41.1169109343.squirrel@bigfugu.bsdmon.com> <20070118184149.GC8400@osiris.chen.org.nz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline In-Reply-To: <20070118184149.GC8400@osiris.chen.org.nz> X-Operating-System: FreeBSD 6.1-RELEASE i386 Organization: BSDMon X-GPG-Key: http://www.bsdmon.com/public_key.gpg User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: amavisd-new at bsdmon.com Cc: freebsd-questions@freebsd.org Subject: Re: Incorrect kernel time on laptop boot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 20:15:11 -0000 --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 19, 2007 at 07:41:49AM +1300, Jonathan Chen wrote: > On Thu, Jan 18, 2007 at 09:35:43AM +0100, Gilbert Cao wrote: > >=20 > > Hi the list, > >=20 > > I currently experienced a problem with my Sony Vaio VGN-FE31B laptop. > > Each time I boot, the kernel time seems to be set with the wrong date t= ime. > > When I poweroff the machine, wait for some minutes and reboot again, the > > kernel time is set with a few seconds after the "wrong" time on shutdow= n. >=20 > If you're dual-booting with Windows, the cause is that Windows will > set the BIOS to wall-time, while FreeBSD sets the BIOS to UTC. One way > to fix this is to run tzsetup and set FreeBSD to run with wall-time. Well, yes, I have dual boot with Windows, and I know it needs to have BIOS clock set to local time. My FreeBSD is "tzsetup" to local time, no UTC, and it has a /etc/wall_cmos_clock file and "adjkerntz -i" running. At the time I wrote, my laptop still has its date and time set to yesterday evening (local time), and it was powered off the whole day, today. However, if I boot it with a FreeBSD 7.0-CURRENT-200610 kernel, its date and time is set correctly. So, I might concluded that something has changed between 200610 and 200611 snapshots. Anyway, I don't know if it can help but here is a result from : $ sysctl kern.timecounter >> -------------------------------------------------------------------- kern.timecounter.tc.i8254.mask: 65535 kern.timecounter.tc.i8254.counter: 17348 kern.timecounter.tc.i8254.frequency: 1193182 kern.timecounter.tc.i8254.quality: 0 kern.timecounter.tc.ACPI-fast.mask: 16777215 kern.timecounter.tc.ACPI-fast.counter: 15466075 kern.timecounter.tc.ACPI-fast.frequency: 3579545 kern.timecounter.tc.ACPI-fast.quality: 1000 kern.timecounter.tc.TSC.mask: 4294967295 kern.timecounter.tc.TSC.counter: 886479930 kern.timecounter.tc.TSC.frequency: 1662511500 kern.timecounter.tc.TSC.quality: -100 kern.timecounter.stepwarnings: 0 kern.timecounter.nbinuptime: 1387464 kern.timecounter.nnanouptime: 8 kern.timecounter.nmicrouptime: 74273 kern.timecounter.nbintime: 92905 kern.timecounter.nnanotime: 13 kern.timecounter.nmicrotime: 92892 kern.timecounter.ngetbinuptime: 120493 kern.timecounter.ngetnanouptime: 173 kern.timecounter.ngetmicrouptime: 174462 kern.timecounter.ngetbintime: 0 kern.timecounter.ngetnanotime: 2 kern.timecounter.ngetmicrotime: 330562 kern.timecounter.nsetclock: 3 kern.timecounter.hardware: ACPI-fast kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000) kern.timecounter.tick: 1 kern.timecounter.smp_tsc: 0 =2E. and a dmesg output from my laptop: >> -------------------------------------------------------------------- Copyright (c) 1992-2007 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.0-CURRENT #0: Sun Jan 14 15:35:13 CET 2007 root@vaio.bsdmon.com:/usr/obj/usr/src/sys/VAIO WARNING: WITNESS option enabled, expect reduced performance. WARNING: MPSAFE network stack disabled, expect reduced performance. ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz (1662.51-MHz 686-class= CPU) Origin =3D "GenuineIntel" Id =3D 0x6f6 Stepping =3D 6 Features=3D0xbfebfbff Features2=3D0xe39d> AMD Features=3D0x20100000 AMD Features2=3D0x1 Cores per package: 2 real memory =3D 1609105408 (1534 MB) avail memory =3D 1558872064 (1486 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: on motherboard acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR acpi_bus_number: can't get _ADR Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 cpu1: on acpi0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 acpi_acad0: on acpi0 battery0: on acpi0 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 nvidia0: mem 0xd1000000-0xd1ffffff,0xb0000000-0xbfffffff,= 0xd0000000-0xd0ffffff irq 16 at device 0.0 on pci1 nvidia0: [GIANT-LOCKED] pcm0: mem 0xd2300000-0xd230= 3fff irq 22 at device 27.0 on pci0 pcib2: irq 17 at device 28.0 on pci0 pci2: on pcib2 pcib3: irq 16 at device 28.1 on pci0 pci4: on pcib3 pcib4: irq 18 at device 28.2 on pci0 pci6: on pcib4 pci6: at device 0.0 (no driver attached) pcib5: irq 21 at device 28.3 on pci0 pci8: on pcib5 uhci0: port 0x1800-0x181f irq 23 at device = 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1820-0x183f irq 17 at device = 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x1840-0x185f irq 18 at device = 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered uhci3: port 0x1860-0x187f irq 16 at device = 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xd2304000-0xd23043f= f irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: on usb4 uhub4: 8 ports with 8 removable, self powered pcib6: at device 30.0 on pci0 pci10: on pcib6 cbb0: at device 3.0 on pci10 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 fwohci0: <1394 Open Host Controller Interface> mem 0xd2006000-0xd20067ff,0x= d2000000-0xd2003fff irq 16 at device 3.1 on pci10 fwohci0: [GIANT-LOCKED] fwohci0: OHCI version 1.10 (ROM=3D1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 08:00:46:03:02:2e:b7:82 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 0a:00:46:2e:b7:82 fwe0: Ethernet address: 0a:00:46:2e:b7:82 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=3D0xc000ffc0, gen=3D1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <=3D 0, cable IRM =3D 0 (me) firewire0: bus manager 0 (me) pci10: at device 3.2 (no driver attached) fxp0: port 0x6000-0x603f mem 0xd20050= 00-0xd2005fff irq 20 at device 8.0 on pci10 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:13:a9:48:cf:09 fxp0: [GIANT-LOCKED] isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177= ,0x376,0x1880-0x188f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0x18c8-0x18cf,0x18ac-0x18af,= 0x18c0-0x18c7,0x18a8-0x18ab,0x18b0-0x18bf mem 0xd2304400-0xd23047ff irq 19 = at device 31.2 on pci0 ata2: on atapci1 ata3: on atapci1 pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 acpi_tz1: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model GlidePoint, device ID 0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcefff,0xdc000-0xdffff,0xe0000-0x= e17ff pnpid ORM0000 on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio0: [FAST] sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ums0: on uhub1 ums0: 16 buttons and Z dir. Timecounters tick every 1.000 msec acd0: DVDR at ata0-master UDMA33 ad4: 76319MB at ata2-master SATA150 pcm0: pcm0: SMP: AP CPU #1 Launched! cd0 at ata0 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device=20 cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad4s3a --=20 -------------------------------- (hika) Gilbert Cao http://www.miaouirc.com - MiaouIRC Project 2002-2003 http://www.bsdmon.com - The BSD DMON Power to serve IRC : #miaule at IRCNET Network -------------------------------- --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFr9UMSyQfFTqAEpcRAs+5AJ9ZwJOak0pv8PcHl15eYoSI+4U65QCeOmgG uPZYfkcVLX9MPbBKtPe+FYI= =eGM8 -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi--