Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] failed to set system clock
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
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Tue Jul 24, 2012 10:12 am    Post subject: [SOLVED] failed to set system clock Reply with quote

Hello,

I had a problem on my computer that when it was booting up, one of the messages showing was
Code:
hwclock: Cannot access the Hardware Clock via any known method
hwclock: use the --debug option to see th details of out serch for an access method
* Failed to set system clock

and when i typed the command
Code:
date

The time which was displayed was not the correct one. So I followed the advice in this thread
https://forums.gentoo.org/viewtopic-p-6864216.html?sid=04b2ec55eb0c998ebbb6e30db97586f8
and enabled
Code:
Device Drivers -> Character devices -> <*> Generic /dev/rtc emulation
 <*> Extended ETC operation

The error at boot time disappeared, however the time shown was still not the accurate one. So I also enabled
Code:
Devide Drivers -> Real Time Clock -> PC-style 'CMOS'

as a module.

Now, the time shown using the "date" command after booting is the accurate one, however when I boot up I get the same error message that the system clock failed to be set. I find that very strange. Should I worry about this or just leave it as it is?

Thanks a lot.


Last edited by jopeto on Fri Aug 03, 2012 9:07 am; edited 1 time in total
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Jul 24, 2012 11:55 am    Post subject: Reply with quote

Try the following kernel options (assuming you are on a PC platforml):

Processor type and features -.> High Resolution Timer Support

Device drivers -> Real Time Clock -> Set system time from RTC on startup and resume


You shouldn't need emulation once HPET is enabled ...
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Wed Jul 25, 2012 2:42 pm    Post subject: Reply with quote

I tried enabling Device Drivers -> Character devices -> HPET, but when I ran make && make module_install I got
Code:

make: *** No rule to make target `module_install'.  Stop.

Is that an error or not?
Back to top
View user's profile Send private message
gorkypl
Guru
Guru


Joined: 04 Oct 2010
Posts: 444
Location: Kraków, PL

PostPosted: Wed Jul 25, 2012 3:11 pm    Post subject: Reply with quote

modules_install
_________________
BTW, TWM FTW!
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Wed Jul 25, 2012 3:11 pm    Post subject: Reply with quote

It's modules_install , with an s
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Wed Jul 25, 2012 4:25 pm    Post subject: Reply with quote

Stupid me... I'll try again.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6937
Location: almost Mile High in the USA

PostPosted: Wed Jul 25, 2012 7:21 pm    Post subject: Reply with quote

About these clock problems, I've seen some PC hardware that doesn't like the "PC CMOS RTC" option even... Still for some reason the time gets set somehow...

Anyway, it would be nice when posting about clock problems, to also post what hardware you're using, especially if not PC-based. Seems there are some somewhat nonstandard clock systems out there even on PCs. One would hope they all are compatible with the original PC/AT CMOS real time clock but...that's yet another legacy device...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Fri Jul 27, 2012 1:06 pm    Post subject: Reply with quote

Sorry for the late reply, but I was traveling with no access to internet.

So I enabled in the kernel Device Drivers -> Character devices -> HPET and now the error on boot up disappeared, however when I type the "date" command, I get the wrong time again... Strange, it looks like that I can either make the error disappear, or the date to be correct, but not the two at the same time...

I am using amd64 version of Gentoo on an Intel B950 cpu. Please let me know if you need any more info on the hardware.

When you say "About these clock problems, I've seen some PC hardware that doesn't like the "PC CMOS RTC" option even." does that mean that I need to disable that from the kernel or enable a different option?

Thanks.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6937
Location: almost Mile High in the USA

PostPosted: Fri Jul 27, 2012 1:35 pm    Post subject: Reply with quote

I'm not entirely sure myself, I'm just worried that we're solving an issue for a non-PC platform (like Macintosh) machine with PC assumptions... Then again there are PC compatible platforms that don't exactly work all the time... Unsure of the "correct" settings, very motherboard dependent...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Fri Jul 27, 2012 7:02 pm    Post subject: Reply with quote

OK, so I set my hardware clock using the bios setup and now everything is working fine. I guess that my system is set up so that the system clock is changed according to the hardware clock and not the other way around. I guess I'll have to look into commands how to make which clock primary and secondary.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Sat Jul 28, 2012 12:17 am    Post subject: Reply with quote

jopeto wrote:
[..] I guess that my system is set up so that the system clock is changed according to the hardware clock and not the other way around. [...]

The usual practice is on bootup to retrieve the time from the hardware clock, and then on shutdown to set the hardware clock from the system clock. This way the time is preserved while the system is not operating.

You can change this behavior in /etc/conf.d/hwclock .
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Mon Jul 30, 2012 7:35 am    Post subject: Reply with quote

Thanks!
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Wed Aug 01, 2012 7:38 am    Post subject: Reply with quote

OK, I think part of my troubles was that I didn't have ntp installed. Here's the wiki on this:
http://en.gentoo-wiki.com/wiki/NTP

I found out about ntp from the comments in the file /etc/conf.d/hwclock
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6937
Location: almost Mile High in the USA

PostPosted: Wed Aug 01, 2012 8:00 am    Post subject: Reply with quote

odd, it shouldn't be mandatory to have ntp running. Machines with no network access would be stuck...

Hmm... I should look into this some more the next time I run into this....Weird...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
jopeto
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2012
Posts: 106

PostPosted: Wed Aug 01, 2012 1:20 pm    Post subject: Reply with quote

Sorry, I guess I wasn't clear enough in my previous post. Having ntp is not mandatory but it is recommended. Since I have internet access, I decided to install it and set it up.

The problem which I guess I had was that in /etc/conf.d/hwclock I had setting the hardware clock to the software clock on log out disabled. I guess things should work when enabling it even without ntp.

Sorry once again for the confusion.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Wed Aug 01, 2012 1:22 pm    Post subject: Reply with quote

If you are satisfied with the function of your system clock, please add "[SOLVED]" to the thread title (by editing the first post) in case someone else has the same problem.
_________________
Personal overlay | Simple backup scheme
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