# Question concerning RTC Sync

## ROOK

Greetings -- 

Got a small issue that I'm hoping someone can assist me with - basically I'm struggling with getting the RTC to sync on boot (and shutdown). 

Here's the situation; currently without intervention when my /etc/clock script runs i get the boot time error "Can't sync RTC" etc.., BOOTMISC service not started.

Once I boot and run /sbin/hwclock --debug --utc --test I get "no interrrupt error on the rtc" 

checking /dev I note that there is no /dev/rtc there ... however if I create a HARDLINK /dev/rtc pointing to /dev/misc/rtc 

/sbin/hwclock --debug --utc --test works perfectly (and the clock will sync during shutdown).

However this doesn't work if I use a symbolic link /dev/rtc ---> /dev/misc/rtc 

Clock sync also works if I use mknod to create /dev/rtc (but this disappers on reboot). 

Question is --- is there a way to use (perhaps) /etc/devfsd.conf to create /dev/rtc device node (or a hardlink to /dev/misc/rtc) ? or am I looking in the wrong direction for a fix on this ? 

Any assistance would be GREATLY appreciated !

----------

## ckdake

Have you compiled "Enhanced Real Time Support" into your kernel?  I know that I did not set up anything special for doing RTC sync but i did compile Enhanced RTC support to fix another problem and RTC sync works perfectly.

----------

## ROOK

Yep ... compiled RTC support into the kernel. 

The clock does actually work if I use mknod to manually create /dev/rtc or create a hardlink from /dev/rtc --> /dev/misc/rtc ...

Thanks in advance.

----------

## Framba

I've got the same problem, I think.

During boot I receive this error message:

Failed to set system clock to hardware clock

ERROR: Problem starting needed services.

            "bootmisc" was not started.

I recompiled my gentoo-sources kernel with "Enhanced Real Time Support" (it is needed by "Low latency scheduling", as I read somewhere) but nothing changes.

I have no /dev/misc/rtc so I can't make the hardlink and I don't know how to use mknod  :Embarassed: 

Should I del /dev/rtc and hope it will be correctly created during a reboot?

----------

## cybe

Glad to have found this thread!! I've been struggling with this problem for a couple of weeks now, and finally I found others with the same problem.

I've got the same problem as R00K and have tried the same things, it looks very much the same on my computer.... 

Yesterday I noticed that devfsd reports something like: failed to copy /lib/dev-state/rtc to /dev/rtc on bootup! a clue perhaps?! Are you guys seeing the same? 

Is there by the way to get a nice boot.log complete with Gentoo services? (not dmesg)

----------

## Framba

I tried to delete /dev/rtc and at hwclock begin to function.

At shutdown all seems to be ok, the system and hardware clock do their work, but at startup it is as before.

----------

## Framba

Ok, I finally I was able to solve. I added the --directisa option in the /etc/init.d/clock script and now all goes well. Anybody knows why hwclock can't use /dev/rtc to funcion properly?  :Confused: 

----------

## cybe

thanks that worked, Finally...

but ofcourse this is just a little workaround...

Well, if one deletes /dev/rtc it works, and if one then does the mknod rtc thing mentioned in /usr/src/linux/Documents/rtc.txt (I think) then it works, but once you boot up it doesn't so someone (devfsd?) makes a new one and makes it wrong somehow. Like I said, my devfsd mentions that it failed to create /dev/misc/rtc at bootup, anyone else noticed this?

----------

## gr_by

Same problem here; adding --directisa solved it.  I too hope to find some answers on why /dev/rtc doesn't work.

Removing /dev/rtc is not doing it for me.

Thanks for all the help.

----------

## derekberube

I was encountering the same probelm that was reported in this thread (glad that I found it).  Using --directisa seemed to solve the problem for me as well.  However, after a little more digging and reading through some information I found on the net, I had a look at my ACPI configuration.

Setting the following kernel option fixed the problem for me:

Power management options (ACPI, APM) --->

ACPI (Advanced Configuration and Power Interface) Support --->

Power Management Timer Support

This has solved my bootmisc services issue.

----------

