Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Problem with hwclock
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 606
Location: /dev/peru/lima

PostPosted: Wed Jun 26, 2013 9:35 pm    Post subject: [SOLVED] Problem with hwclock Reply with quote

Hello, I have this problem ever since I installed my system. I'm using stable with debian-sources-3.2.41 and I used genkernel to automatically configure the kernel and build it for me.

This is the outout of dmesg|grep rtc:

Code:
[    5.373278] rtc_cmos 00:05: RTC can wake from S4
[    5.373349] rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0
[    5.373368] rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
[    5.374885] rtc_cmos 00:05: setting system clock to 2013-06-26 10:32:32 UTC (1372242752)


This is the output of grep RTC /usr/src/linux/.config:

Code:
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_PM_TRACE_RTC is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
# I2C RTC drivers
CONFIG_RTC_DRV_DS1307=m
CONFIG_RTC_DRV_DS1374=m
CONFIG_RTC_DRV_DS1672=m
# CONFIG_RTC_DRV_DS3232 is not set
CONFIG_RTC_DRV_MAX6900=m
CONFIG_RTC_DRV_RS5C372=m
CONFIG_RTC_DRV_ISL1208=m
# CONFIG_RTC_DRV_ISL12022 is not set
CONFIG_RTC_DRV_X1205=m
CONFIG_RTC_DRV_PCF8563=m
CONFIG_RTC_DRV_PCF8583=m
CONFIG_RTC_DRV_M41T80=m
# CONFIG_RTC_DRV_M41T80_WDT is not set
CONFIG_RTC_DRV_BQ32K=m
CONFIG_RTC_DRV_S35390A=m
CONFIG_RTC_DRV_FM3130=m
CONFIG_RTC_DRV_RX8581=m
CONFIG_RTC_DRV_RX8025=m
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
# SPI RTC drivers
# CONFIG_RTC_DRV_M41T93 is not set
CONFIG_RTC_DRV_M41T94=m
CONFIG_RTC_DRV_DS1305=m
CONFIG_RTC_DRV_DS1390=m
CONFIG_RTC_DRV_MAX6902=m
CONFIG_RTC_DRV_R9701=m
CONFIG_RTC_DRV_RS5C348=m
CONFIG_RTC_DRV_DS3234=m
CONFIG_RTC_DRV_PCF2123=m
# Platform RTC drivers
CONFIG_RTC_DRV_CMOS=y
CONFIG_RTC_DRV_DS1286=m
CONFIG_RTC_DRV_DS1511=m
CONFIG_RTC_DRV_DS1553=m
CONFIG_RTC_DRV_DS1742=m
CONFIG_RTC_DRV_STK17TA8=m
CONFIG_RTC_DRV_M48T86=m
CONFIG_RTC_DRV_M48T35=m
CONFIG_RTC_DRV_M48T59=m
CONFIG_RTC_DRV_MSM6242=m
CONFIG_RTC_DRV_BQ4802=m
CONFIG_RTC_DRV_RP5C01=m
CONFIG_RTC_DRV_V3020=m
CONFIG_RTC_DRV_PCF50633=m
# on-CPU RTC drivers


And this is the output of hwclock --debug:

Code:
hwclock from util-linux 2.21.2
hwclock: Open of /dev/rtc failed: Device or resource busy
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.


Finally, this is the output of ls -l /dev/rtc*:

Code:
lrwxrwxrwx 1 root root      4 Jun 26 05:32 /dev/rtc -> rtc0
crw------- 1 root root 254, 0 Jun 26 05:32 /dev/rtc0


So, as you see I do have the RTC feature in my kernel and the device file exists, but I just can't figure out what's going on here and why is this failing, any help is appreciated.

Thanks!
_________________
AMD FX 8350 8-core CPU
16GB Corsair Vengeance DDR3 RAM
ASUS M5A97 Motherboard
1TB (Gentoo) + 500GB (Windows 7 for games) HDDs
Nvidia 550 GTX Ti 1Gb Ram DDR5
Cooler Master CM690 Case


Last edited by zietbukuel on Fri Jun 28, 2013 8:22 am; edited 2 times in total
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1411

PostPosted: Wed Jun 26, 2013 10:09 pm    Post subject: Reply with quote

Code:
rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
rtc_cmos 00:05: setting system clock to 2013-06-26 10:32:32 UTC (1372242752)

rtc0 and rtc_cmos are not equal to /dev/rtc and iirc symlink lookup is failing

_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 606
Location: /dev/peru/lima

PostPosted: Wed Jun 26, 2013 10:11 pm    Post subject: Reply with quote

eyoung100 wrote:
Code:
rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
rtc_cmos 00:05: setting system clock to 2013-06-26 10:32:32 UTC (1372242752)

rtc0 and rtc_cmos are not equal to /dev/rtc and iirc symlink lookup is failing


Could you please elaborate a bit more your answer? I can't seem to understand what you mean. Thanks.
_________________
AMD FX 8350 8-core CPU
16GB Corsair Vengeance DDR3 RAM
ASUS M5A97 Motherboard
1TB (Gentoo) + 500GB (Windows 7 for games) HDDs
Nvidia 550 GTX Ti 1Gb Ram DDR5
Cooler Master CM690 Case
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1411

PostPosted: Wed Jun 26, 2013 10:26 pm    Post subject: Reply with quote

/dev/rtc is a real device node. you can't overwrite it with a symlink
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 606
Location: /dev/peru/lima

PostPosted: Wed Jun 26, 2013 11:12 pm    Post subject: Reply with quote

eyoung100 wrote:
/dev/rtc is a real device node. you can't overwrite it with a symlink

I didn't do anything with it. How can I fix this? Thanks.
_________________
AMD FX 8350 8-core CPU
16GB Corsair Vengeance DDR3 RAM
ASUS M5A97 Motherboard
1TB (Gentoo) + 500GB (Windows 7 for games) HDDs
Nvidia 550 GTX Ti 1Gb Ram DDR5
Cooler Master CM690 Case
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2333
Location: UK

PostPosted: Thu Jun 27, 2013 12:10 am    Post subject: Reply with quote

If you have working NTP then it may be better to not use hwclock at all. 3.9 kernels have the ability to sync system time to the hardware on their own so that program is entirely unneeded.
Back to top
View user's profile Send private message
bug_report
n00b
n00b


Joined: 17 Sep 2010
Posts: 67
Location: Frankfurt, Germany

PostPosted: Thu Jun 27, 2013 1:21 am    Post subject: Reply with quote

/dev/rtc is a link to /dev/rtc0 on all of my systems - this doesn't seem to be a problem.
I don't see anything wrong in your first message - output of 'dmesg' and your kernel config parameters seem to be fine.

Possible reasons:
1) Some other program disturbs /dev/rtc. Please reboot your system in single user mode. Does 'hwclock' still report an error?
2) Your kernel version is too old. Try a newer kernel: 3.9 from http://www.kernel.org

If this doesn't help, use Google and search for 'Linux rtc busy hwclock'. Many people have similar problems...
Back to top
View user's profile Send private message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 606
Location: /dev/peru/lima

PostPosted: Thu Jun 27, 2013 2:01 am    Post subject: Reply with quote

bug_report wrote:
/dev/rtc is a link to /dev/rtc0 on all of my systems - this doesn't seem to be a problem.
I don't see anything wrong in your first message - output of 'dmesg' and your kernel config parameters seem to be fine.

Possible reasons:
1) Some other program disturbs /dev/rtc. Please reboot your system in single user mode. Does 'hwclock' still report an error?
2) Your kernel version is too old. Try a newer kernel: 3.9 from http://www.kernel.org

If this doesn't help, use Google and search for 'Linux rtc busy hwclock'. Many people have similar problems...


Maybe, this kernel is 3.2 (debian-sources). I'll try to update to 3.9 (gentoo-sources).
_________________
AMD FX 8350 8-core CPU
16GB Corsair Vengeance DDR3 RAM
ASUS M5A97 Motherboard
1TB (Gentoo) + 500GB (Windows 7 for games) HDDs
Nvidia 550 GTX Ti 1Gb Ram DDR5
Cooler Master CM690 Case
Back to top
View user's profile Send private message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 606
Location: /dev/peru/lima

PostPosted: Thu Jun 27, 2013 10:45 pm    Post subject: Reply with quote

Well, I have updated to 3.9 gentoo-sources and I'm still having this annoying problem, my clock is going faster than it should and messes up things, any help, please? Thanks.
_________________
AMD FX 8350 8-core CPU
16GB Corsair Vengeance DDR3 RAM
ASUS M5A97 Motherboard
1TB (Gentoo) + 500GB (Windows 7 for games) HDDs
Nvidia 550 GTX Ti 1Gb Ram DDR5
Cooler Master CM690 Case
Back to top
View user's profile Send private message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 606
Location: /dev/peru/lima

PostPosted: Fri Jun 28, 2013 8:21 am    Post subject: Reply with quote

Ok I found the answer.

Deactivate:
Device Drivers -> Real Time Clock

Activate:
Device Drivers -> Character Devices -> HPET High Precision Event Timer
Device Drivers -> Character Devices -> Enhanced Real Time Clock Support

Hope this helps someone having the same problem.
_________________
AMD FX 8350 8-core CPU
16GB Corsair Vengeance DDR3 RAM
ASUS M5A97 Motherboard
1TB (Gentoo) + 500GB (Windows 7 for games) HDDs
Nvidia 550 GTX Ti 1Gb Ram DDR5
Cooler Master CM690 Case
Back to top
View user's profile Send private message
hujuice
Apprentice
Apprentice


Joined: 16 Oct 2007
Posts: 198
Location: Rome, Italy

PostPosted: Thu Aug 22, 2013 5:48 pm    Post subject: Reply with quote

I ran in the same problem.
And I cannot activate CONFIG_RTC because it is deselected by CONFIG_RTC_LIB, which in turn is selected by CONFIG_X86...

Ant P. wrote:
If you have working NTP then it may be better to not use hwclock at all. 3.9 kernels have the ability to sync system time to the hardware on their own so that program is entirely unneeded.


@Ant P., you mean that CONFIG_RTC_LIB will perform the task? (or something similar...)
My ntpd is working fine.

Regards,
HUjuice
_________________
Who haven't a spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2333
Location: UK

PostPosted: Thu Aug 22, 2013 10:46 pm    Post subject: Reply with quote

hujuice wrote:
I ran in the same problem.
And I cannot activate CONFIG_RTC because it is deselected by CONFIG_RTC_LIB, which in turn is selected by CONFIG_X86...

Ant P. wrote:
If you have working NTP then it may be better to not use hwclock at all. 3.9 kernels have the ability to sync system time to the hardware on their own so that program is entirely unneeded.


@Ant P., you mean that CONFIG_RTC_LIB will perform the task? (or something similar...)
My ntpd is working fine.

Regards,
HUjuice

The option is CONFIG_RTC_SYSTOHC, under the CONFIG_RTC_CLASS menu.
Back to top
View user's profile Send private message
hujuice
Apprentice
Apprentice


Joined: 16 Oct 2007
Posts: 198
Location: Rome, Italy

PostPosted: Fri Aug 23, 2013 12:30 am    Post subject: Reply with quote

Uh, nice.
Thanks Ant P. :)
_________________
Who haven't a spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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