Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] iBook G4 clock not working after shutdown
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
mwallace
n00b
n00b


Joined: 08 Jul 2006
Posts: 52
Location: Frankfurt/Germany

PostPosted: Thu Aug 31, 2006 10:45 am    Post subject: [solved] iBook G4 clock not working after shutdown Reply with quote

Hi guys,

I have a strange problem here. It occured the first time after removing the battery of my iBook for a longer period of time. After booting, the clock showed 1904 as date. Ok, now I know that the iBook has no additional battery to keep the settings when the main battery is removed.
I re-adjusted the clock and thought that everything was fine now. However, after booting the next time I realized that the clock didn't run during the time the computer was off. It showed the time the computer was powered off.
I get no errors like "drivers/rtc/hctosys.c: unable to open rtc device (rtc0)" as reported in another posting in this forum.
I tried several settings (hwclock --systohc) and changes in the /etc/conf.d/clock: CLOCK_SYSTOHC="yes".

However, the problem remains an I hope that you can help me.


Last edited by mwallace on Sat Sep 02, 2006 3:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Thu Aug 31, 2006 5:13 pm    Post subject: Reply with quote

Did you recently upgrade your kernel? There are some changes in the kernel config wrt to the rtc driver.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
mwallace
n00b
n00b


Joined: 08 Jul 2006
Posts: 52
Location: Frankfurt/Germany

PostPosted: Thu Aug 31, 2006 7:43 pm    Post subject: Reply with quote

No, I didn't upgrade my kernel shortly before the problem occured. Maybe my kernel is missing an option? I bought the computer with OSX installed and the time was set correctly. After that I deleted OSX and installed Gentoo and didn't change anything on the time just until the problem occured after a longer removal of the battery.
I don't get any error-messages when setting the time to the hardware clock.
Back to top
View user's profile Send private message
piroko
Tux's lil' helper
Tux's lil' helper


Joined: 25 Aug 2006
Posts: 77

PostPosted: Fri Sep 01, 2006 2:48 pm    Post subject: Reply with quote

I'm not sure if this helps, but my relavent config lines for the real time clock in 2.6.18-r4 are:
Code:
CONFIG_GEN_RTC=m
CONFIG_GEN_RTC_X=y
# CONFIG_RTC_CLASS is not set


I have a Powerbook G4, but I'm sure those configs would be relative to your iBook as well. Provided you haven't customized any of your /etc/init.d/* scripts, I would run
Code:
emerge -av baselayout
as well to ensure that your startup/shutdown scripts didn't get changed, as mine mysteriously did, causing my clock to stop working as well. :)
Also, ensure that you have the clock script running at boot. Check it with
Code:
rc-update show

If it isn't there, then run
Code:
rc-update add clock boot
as root. Tell us if you still have problems!
_________________
Anyone who is not confused by quantum theory does not truly understand it.
Back to top
View user's profile Send private message
mwallace
n00b
n00b


Joined: 08 Jul 2006
Posts: 52
Location: Frankfurt/Germany

PostPosted: Fri Sep 01, 2006 8:16 pm    Post subject: Reply with quote

Ok, the problem is still there. I recompiled my kernel and enabled "CONFIG_GEN_RTC_X=y" (it was off before).
I already followed your baselayout suggestion and deleted /etc/init.d/clock and reemerged baselayout. No changes.

Code:

uname -a
Linux tux 2.6.17-gentoo-r4 #2 Fri Sep 1 12:23:44 CEST 2006 ppc 7447A, altivec supported GNU/Linux


Code:

dmesg

Using PowerMac machine description
Total memory = 768MB; using 2048kB for hash table (at cfe00000)
Linux version 2.6.17-gentoo-r4 (root@tux) (gcc version 4.1.1 (Gentoo 4.1.1)) #2 Fri Sep 1 12:23:44 CEST 2006
Found UniNorth memory controller & host bridge @ 0xf8000000 revision: 0xd2
Mapped at 0xfdfc0000
Found a Intrepid mac-io controller, rev: 0, mapped at 0xfdf40000
Processor NAP mode on idle enabled.
PowerMac motherboard: iBook G4
via-pmu: Server Mode is disabled
PMU driver v2 initialized for Core99, firmware: 0c
Found UniNorth PCI host bridge at 0xf0000000. Firmware bus number: 0->0
Found UniNorth PCI host bridge at 0xf2000000. Firmware bus number: 0->0
Found UniNorth PCI host bridge at 0xf4000000. Firmware bus number: 0->0
nvram: Checking bank 0...
nvram: gen0=304, gen1=303
nvram: Active bank is: 0
nvram: OF partition at 0x410
nvram: XP partition at 0x1020
nvram: NR partition at 0x1120
Top of RAM: 0x30000000, Total RAM: 0x30000000
Memory hole size: 0MB
On node 0 totalpages: 196608
  DMA zone: 196608 pages, LIFO batch:31
Built 1 zonelists
Kernel command line: root=/dev/hda4 ro
mpic: Setting up MPIC " MPIC 1   " version 1.2 at 80040000, max 4 CPUs
mpic: ISU size: 64, shift: 6, mask: 3f
mpic: Initializing for 64 sources
PID hash table entries: 4096 (order: 12, 16384 bytes)
GMT Delta read from XPRAM: 0 minutes, DST: off
time_init: decrementer frequency = 18.432000 MHz
time_init: processor frequency   = 1333.333330 MHz
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 773888k/786432k available (2448k kernel code, 12208k reserved, 212k data, 127k bss, 144k init)
Calibrating delay loop... 36.73 BogoMIPS (lpj=73472)
Mount-cache hash table entries: 512
device-tree: Duplicate name in /cpus/PowerPC,G4@0, renamed to "l2-cache#1"
NET: Registered protocol family 16
KeyWest i2c @0xf8001003 irq 42 /uni-n@f8000000/i2c@f8001000
 channel 1 bus /uni-n@f8000000/i2c@f8001000/i2c-bus@1
KeyWest i2c @0x80018000 irq 26 /pci@f2000000/mac-io@17/i2c@18000
 channel 0 bus /pci@f2000000/mac-io@17/i2c@18000/i2c-bus@0
PMU i2c /pci@f2000000/mac-io@17/via-pmu@16000/pmu-i2c
 channel 1 bus <multibus>
 channel 2 bus <multibus>
PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 0001:10:18.0
PCI: Cannot allocate resource region 0 of device 0001:10:19.0
Apple USB OHCI 0001:10:18.0 disabled by firmware
Apple USB OHCI 0001:10:19.0 disabled by firmware
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Registering PowerMac CPU frequency driver
Low: 666 Mhz, High: 1333 Mhz, Boot: 666 Mhz
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
Generic RTC Driver v1.07
Macintosh non-volatile memory driver v1.1
PCI: Enabling device 0000:00:10.0 (0006 -> 0007)
radeonfb (0000:00:10.0): Invalid ROM signature 0 should be 0xaa55
radeonfb: Retrieved PLL infos from Open Firmware
radeonfb: Reference=27.00 MHz (RefDiv=12) Memory=183.00 Mhz, System=210.00 MHz
radeonfb: PLL min 12000 max 35000
radeonfb: Monitor 1 type LCD found
radeonfb: EDID probed
radeonfb: Monitor 2 type no found
radeonfb: Using Firmware dividers 0x00020074 from PPLL 0
radeonfb: Dynamic Clock Power Management enabled
Console: switching to colour frame buffer device 128x48
Registered "mnca" backlight controller,level: 15/15
radeonfb (0000:00:10.0): ATI Radeon NV
mice: PS/2 mouse device common for all mice
MacIO PCI driver attached to Intrepid chipset
input: Macintosh mouse button emulation as /class/input/input0
apm_emu: APM Emulation 0.5 initialized.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
adb: starting probe task...
PCI: Enabling device 0002:20:0d.0 (0000 -> 0002)
adb devices: [2]: 2 c4 [7]: 7 1f
ADB keyboard at 2, handler 1
Detected ADB keyboard, type ISO, swapping keys.
input: ADB keyboard as /class/input/input1
input: ADB Powerbook buttons as /class/input/input2
adb: finished probe task...
ide0: Found Apple UniNorth ATA-6 controller, bus ID 3, irq 39
Probing IDE interface ide0...
hda: FUJITSU MHV2060AT, ATA DISK drive
hda: Enabling Ultra DMA 5
ide0 at 0xf1012000-0xf1012007,0xf1012160 on irq 39
ide1: Found Apple KeyLargo ATA-3 controller, bus ID 0, irq 24
Probing IDE interface ide1...
hdc: MATSHITACD-RW CW-8124, ATAPI CD/DVD-ROM drive
hdc: Enabling MultiWord DMA 2
ide1 at 0xf1006000-0xf1006007,0xf1006160 on irq 24
hda: max request size: 512KiB
hda: 117210240 sectors (60011 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
 hda: [mac] hda1 hda2 hda3 hda4
PCI: Enabling device 0001:10:1b.2 (0004 -> 0006)
ehci_hcd 0001:10:1b.2: EHCI Host Controller
ehci_hcd 0001:10:1b.2: new USB bus registered, assigned bus number 1
ehci_hcd 0001:10:1b.2: irq 63, io mem 0x80080000
ehci_hcd 0001:10:1b.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 5 ports detected
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
Apple USB OHCI 0001:10:18.0 disabled by firmware
Apple USB OHCI 0001:10:19.0 disabled by firmware
PCI: Enabling device 0001:10:1a.0 (0000 -> 0002)
ohci_hcd 0001:10:1a.0: OHCI Host Controller
ohci_hcd 0001:10:1a.0: new USB bus registered, assigned bus number 2
ohci_hcd 0001:10:1a.0: irq 29, io mem 0x80083000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
PCI: Enabling device 0001:10:1b.0 (0000 -> 0002)
ohci_hcd 0001:10:1b.0: OHCI Host Controller
ohci_hcd 0001:10:1b.0: new USB bus registered, assigned bus number 3
ohci_hcd 0001:10:1b.0: irq 63, io mem 0x80082000
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 3 ports detected
PCI: Enabling device 0001:10:1b.1 (0000 -> 0002)
ohci_hcd 0001:10:1b.1: OHCI Host Controller
ohci_hcd 0001:10:1b.1: new USB bus registered, assigned bus number 4
ohci_hcd 0001:10:1b.1: irq 63, io mem 0x80081000
usb 2-1: new full speed USB device using ohci_hcd and address 2
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
usb 2-1: configuration #1 chosen from 1 choice
usb 2-2: new full speed USB device using ohci_hcd and address 3
usb 2-2: configuration #1 chosen from 1 choice
input: HID 05ac:1000 as /class/input/input3
input: USB HID v1.11 Keyboard [HID 05ac:1000] on usb-0001:10:1a.0-1
input: HID 05ac:1000 as /class/input/input4
input: USB HID v1.11 Mouse [HID 05ac:1000] on usb-0001:10:1a.0-1
HID device not claimed by input or hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
input: appletouch as /class/input/input5
usbcore: registered new driver appletouch
PowerMac i2c bus pmu 2 registered
PowerMac i2c bus pmu 1 registered
PowerMac i2c bus mac-io 0 registered
PowerMac i2c bus uni-n 1 registered
TCP bic registered
NET: Registered protocol family 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
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 144k init
input: PowerMac Beep as /class/input/input6
adt746x: version 1 (supported)
adt746x: Thermostat bus: 1, address: 0x2e, limit_adjust: 0, fan_speed: 32
sensor 0: PWR/MEMORY BOTTOMSIDE
sensor 1: CPU BOTTOMSIDE
sensor 2: GPU BOTTOMSIDE
adt746x: ADT7467 initializing
adt746x: Lowering max temperatures from 69, 92, 101 to 70, 50, 70
Adding 524280k swap on /dev/hda3.  Priority:-1 extents:1 across:524280k
appletouch: incomplete data package.
Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected Apple UniNorth 2 chipset
agpgart: configuring for size idx: 4
agpgart: AGP aperture is 16M @ 0x0
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.7
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
bcm43xx driver
PCI: Enabling device 0001:10:12.0 (0004 -> 0006)
bcm43xx: Chip ID 0x4318, rev 0x2
bcm43xx: Number of cores: 4
bcm43xx: Core 0: ID 0x800, rev 0xd, vendor 0x4243, enabled
bcm43xx: Core 1: ID 0x812, rev 0x9, vendor 0x4243, disabled
bcm43xx: Core 2: ID 0x804, rev 0xc, vendor 0x4243, enabled
bcm43xx: Core 3: ID 0x80d, rev 0x7, vendor 0x4243, enabled
bcm43xx: PHY connected
bcm43xx: Detected PHY: Version: 3, Type 2, Revision 7
bcm43xx: Detected Radio: ID: 8205017f (Manuf: 17f Ver: 2050 Rev: 8)
bcm43xx: Radio turned off
bcm43xx: Radio turned off
ieee1394: Initialized config rom entry `ip1394'
PCI: Enabling device 0002:20:0e.0 (0000 -> 0002)
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[40]  MMIO=[f5000000-f50007ff]  Max Packet=[2048]  IR/IT contexts=[8/8]
sungem.c:v0.98 8/24/03 David S. Miller (davem@redhat.com)
PHY ID: 4061e4, addr: 0
eth0: Sun GEM (PCI) 10/100/1000BaseT Ethernet 00:14:51:14:6f:18
eth0: Found BCM5221 PHY
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[001451fffe146f18]
[drm] Initialized drm 1.0.1 20051102
[drm] Initialized radeon 1.25.0 20060524 on minor 0:
[drm] Used old pci detect: framebuffer loaded
agpgart: Putting AGP V2 device at 0000:00:0b.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:00:10.0 into 4x mode
[drm] Setting GART location based on new memory map
[drm] Loading R300 Microcode
[drm] writeback test succeeded in 1 usecs
eth0: Link is up at 100 Mbps, full-duplex.
eth0: Pause is disabled
NET: Registered protocol family 17


Code:

rc-update show
            bootmisc | boot
             checkfs | boot
           checkroot | boot
               clock | boot
            coldplug | boot
         consolefont | boot
                dbus |      default
                hald |      default
            hostname | boot
             ifplugd |      default
             keymaps | boot
               local |      default nonetwork
          localmount | boot
             metalog |      default
             modules | boot
              net.lo | boot
            netmount |      default
          pbbuttonsd | boot
           powernowd | boot
           rmnologin | boot
             urandom | boot
                 xdm |      default


It's a really strange thing. I hope you have some more suggestions :-)
Thank you so far!

Chris

EDIT: Resetting PRAM NVRAM and PMU didn't help either.
Back to top
View user's profile Send private message
mwallace
n00b
n00b


Joined: 08 Jul 2006
Posts: 52
Location: Frankfurt/Germany

PostPosted: Sat Sep 02, 2006 3:39 pm    Post subject: Reply with quote

Ok guys, I think the problem is solved. It seems like /etc/adjtime was the problem.

This thread lead me to the right direction:
https://forums.gentoo.org/viewtopic-t-52517-start-0-postdays-0-postorder-asc-highlight-.html

I deleted /etc/adjtime and also commented out
Code:

errstr=$(/sbin/hwclock ${myadj} ${myopts} 2>&1 >/dev/null)

in the /etc/init.d/clock script.

Maybe we should file a bug so that this gets changed. It's really strange to see the clock working in such a weird way.
At least my iBook is not broken. I'm happy :-)

Can anybody with an iBook and some time confirm this issue?
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Sun Sep 03, 2006 1:23 pm    Post subject: Reply with quote

i have the same problem .. and i`ll post result using your solution asap .. :)

Cheers
_________________
http://droopia.net
Back to top
View user's profile Send private message
mwallace
n00b
n00b


Joined: 08 Jul 2006
Posts: 52
Location: Frankfurt/Germany

PostPosted: Sun Sep 03, 2006 2:05 pm    Post subject: Reply with quote

@playahater: I hope you can fix it, too.

For your information: Meanwhile I don't have "errstr=$(/sbin/hwclock ${myadj} ${myopts} 2>&1 >/dev/null)" commented out anymore. Deleting adjtime is perfectly sufficient. /etc/adjtime does a pretty good job compensating inaccuracies from the hwclock.
Back to top
View user's profile Send private message
alex6z
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2005
Posts: 119

PostPosted: Tue Oct 24, 2006 2:32 am    Post subject: Reply with quote

I have an iBook G4 933MHz. I got it at a pawn shop and soda was spilled in the battery cantacts and by the connecter on the mainboard. Not to mention the cigerette that wal seft of the keyboard and burned off 3 keys and scorched the corner of the touch pad. The thing would only run for 30 seconds on battery power. I took it apart and cleaned the mainboard and the battery started working again, normally.

Now, the clock needs to be set on each boot. I thought losing time on shutdown was the result of a damaged battery power supply. But now I am wondering if maybe not.

Right now the time is 02:24:20 10/24/2006 and it seems to always go back to that on power down no matter how many hwclock --systohc 's I do.

What can I do to fix this? At one point the clock was at 1904. Now it's 2006 but that doesn't at least but it seems to be stuck there.
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Tue Oct 24, 2006 3:49 pm    Post subject: Reply with quote

mwallace wrote:
@playahater: I hope you can fix it, too.

For your information: Meanwhile I don't have "errstr=$(/sbin/hwclock ${myadj} ${myopts} 2>&1 >/dev/null)" commented out anymore. Deleting adjtime is perfectly sufficient. /etc/adjtime does a pretty good job compensating inaccuracies from the hwclock.


mope .. not working .. :(
its like, battery is empty .. or smth like that .. :( .. dunno
_________________
http://droopia.net
Back to top
View user's profile Send private message
alex6z
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2005
Posts: 119

PostPosted: Wed Oct 25, 2006 12:59 pm    Post subject: Reply with quote

I removed clock form the boot runlevel and now it keeps the right time.
Back to top
View user's profile Send private message
mwallace
n00b
n00b


Joined: 08 Jul 2006
Posts: 52
Location: Frankfurt/Germany

PostPosted: Sat Jul 07, 2007 8:59 am    Post subject: Reply with quote

Well, this is a rather late reply... ;-)

@alex6z: Just remove your /etc/adjtime file. It's causing lots of trouble, since it saves time differences between the hardware and system clock to adjust the time correctly. If the hardware clock is set to 1904 it detects a huge difference on the next restart and will set the clock to a complete bogus time.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum