Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Time settings not preserved on reboot. [SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Thu Feb 14, 2013 6:19 am    Post subject: Time settings not preserved on reboot. [SOLVED] Reply with quote

I used the wiki http://en.gentoo-wiki.com/wiki/Time_Synchronization to synchronize my box with a time server. I opted for rdate. It will set and I did add it to the default runlevel as instructed but whenever I reboot itdefaults back to another time. Any ideas? Am I missing something obvious?

Last edited by Budoka on Tue Mar 26, 2013 3:31 am; edited 1 time in total
Back to top
View user's profile Send private message
PabloEsc
n00b
n00b


Joined: 24 Dec 2009
Posts: 40

PostPosted: Thu Feb 14, 2013 6:32 am    Post subject: Reply with quote

You probably need to set
Code:

clock_systohc="YES"

in /etc/conf/hwclock
Back to top
View user's profile Send private message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Fri Feb 15, 2013 12:35 am    Post subject: Reply with quote

PabloEsc wrote:
You probably need to set
Code:

clock_systohc="YES"

in /etc/conf/hwclock


/etc/conf/ doesn't exist on my system but I found hwclock in /etc/conf.d/hwclock. Also in /sbin and /etc/init.d.

I uncommented
Code:
clock_systohc="YES"
in /etc/conf.d/hwclock,http://bpaste.net/show/77361/, rebooted, and the behaviour hasn't changed. Any other ideas?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 15, 2013 12:41 am    Post subject: Reply with quote

Can you use hwclock utility to read and write hardware clock, does it work?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Fri Feb 15, 2013 1:10 am    Post subject: Reply with quote

Jaglover wrote:
Can you use hwclock utility to read and write hardware clock, does it work?


No the hwclock utility doesn't sem to work. It kicks out the following error:

Quote:
hwclock --debug
hwclock from util-linux 2.21.2
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.


However, and I am not sure if these are mutually exclusive, I used rdate as outlined on http://en.gentoo-wiki.com/wiki/Time_Synchronization#rdate and
Code:
Print the retrieved time:
rdate -p ptbtime1.ptb.de

Synchronize the system clock with the retrieved time:
rdate -s ptbtime1.ptb.de

work without any problem.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 15, 2013 1:14 am    Post subject: Reply with quote

Code:
cat /sys/devices/system/clocksource/clocksource0/available_clocksource

This will tell you what clocksources are available.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Sat Feb 16, 2013 1:17 pm    Post subject: Reply with quote

Jaglover wrote:
Code:
cat /sys/devices/system/clocksource/clocksource0/available_clocksource

This will tell you what clocksources are available.


[/quote]cat /sys/devices/system/clocksource/clocksource0/available_clocksource
tsc hpet acpi_pm
Quote:


So what do I do next?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Feb 16, 2013 2:27 pm    Post subject: Reply with quote

There should be a symlink /etc/rtc pointing to rtc0. If you do not have it then you should check your kernel configuration and see whether RTC is enabled.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 229
Location: Detroit, MI, USA

PostPosted: Sat Feb 16, 2013 5:01 pm    Post subject: Reply with quote

Try enabling CONFIG_RTC_DRV_CMOS in your kernel config. That will expose the hardware clock present on most PC systems.
Back to top
View user's profile Send private message
Budoka
l33t
l33t


Joined: 03 Jun 2012
Posts: 777
Location: Tokyo, Japan

PostPosted: Sun Feb 17, 2013 2:39 am    Post subject: Reply with quote

floppymaster wrote:
Try enabling CONFIG_RTC_DRV_CMOS in your kernel config. That will expose the hardware clock present on most PC systems.


That did the trick. Thanks.

Not sure why RTC wasn't compiled in the kernel given that I followed the guide but it is all sorted out now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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