LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-06-2014, 01:39 PM   #1
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 235

Rep: Reputation: 30
Time and date issues with ntp after suspend


Hi,
I have many issue on my Samsung Ativ Book 9 Lite with ntp and suspend. After suspend, ntp seems a bit at a loss and time and date become usually quite wrong (the date can be off by several days).
When I restart ntp manually, I get the following message :

Code:
root@coyotemobile:~# /etc/rc.d/rc.ntpd start
Starting NTP daemon:  /usr/sbin/ntpd -g
Saving system time to the hardware clock (localtime).
hwclock: select() to /dev/rtc0 to wait for clock tick timed out: No such file or directory
My ntp is configured to point to pool.ntp.org and it works well otherwise.
I've looked around and found some threads around this topic but none which gave me a solution or even allowed me to understand what's going on.
If I run manually, once ntp is restarted, the following command :

hwclock --systohc

it seems to work without the message I get when restarting ntp.
So it does not seem to be a RTC device issue.
If I look at the /var/log/messages, I get the following logs :

Code:
Aug  6 16:56:57 coyotemobile NetworkManager[1998]: <info> (wlan0): deactivating device (reason 'sleeping') [37]
Aug  6 16:56:57 coyotemobile dhcpcd[2514]: received SIGTERM from PID 1998, stopping
Aug  6 16:56:57 coyotemobile dhcpcd[2514]: wlan0: removing interface
Aug  6 16:56:57 coyotemobile dhcpcd[2514]: wlan0: deleting host route to 192.168.1.29 via 127.0.0.1
Aug  6 16:56:57 coyotemobile dhcpcd[2514]: exited
Aug  6 16:56:57 coyotemobile NetworkManager[1998]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 2514
Aug  6 16:56:57 coyotemobile kernel: [ 8607.889613] wlan0: deauthenticating from bc:f2:af:4a:1d:a1 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug  6 16:56:57 coyotemobile kernel: [ 8607.897465] cfg80211: Calling CRDA to update world regulatory domain
Aug  6 16:56:57 coyotemobile NetworkManager[1998]: <info> (wlan0): cleaning up...
Aug  6 16:56:57 coyotemobile NetworkManager[1998]: <info> (wlan0): taking down device.
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913461] cfg80211: World regulatory domain updated:
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913476] cfg80211:  DFS Master region: unset
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913481] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_t
ime)
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913490] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913496] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913503] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913509] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Aug  6 16:56:57 coyotemobile kernel: [ 8607.913515] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
Aug  6 16:56:57 coyotemobile dbus[1921]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Aug  6 16:56:57 coyotemobile dbus[1921]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug  6 16:56:58 coyotemobile ntpd[1897]: Deleting interface #4 wlan0, 192.168.1.29#123, interface stats: received=72, sent=72, dropped=0, act
ive_time=7443 secs
Aug  6 16:56:58 coyotemobile ntpd[1897]: 176.31.96.62 interface 192.168.1.29 -> (none)
Aug  6 16:56:58 coyotemobile ntpd[1897]: peers refreshed
Aug  6 16:56:58 coyotemobile kernel: [ 8609.254805] PM: Syncing filesystems ... done.
Aug  9 15:50:56 coyotemobile kernel: [ 8609.393633] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Aug  9 15:50:56 coyotemobile kernel: [ 8609.394939] sd 0:0:0:0: [sda] Stopping disk
Aug  9 15:50:56 coyotemobile kernel: [ 8610.823838] PM: suspend of devices complete after 1430.299 msecs
So obviously, the date is correct when "sleeping" is requested, buy changed to 3 days later by ntp just before actual sleep.
And this date and time remains at resume, because the drift is superior to a specific threshold above which ntp does nothing. I've read it was 1000s.
Can someone shed some light on the overall process, why it fails and how I can fix it?

Last edited by rvdboom; 08-07-2014 at 03:56 AM.
 
Old 08-06-2014, 02:11 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Did you compile your own kernel ? Because
Code:
hwclock: select() to /dev/rtc0 to wait for clock tick timed out: No such file or directory
suggests that /dev/rtc0 does not exist, which means that the RTC is not enabled in the kernel. I compiled a kernel a while back and forgot it as well, and it caused similar problems.
 
Old 08-06-2014, 06:57 PM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Apparently the Samsung Ativ Book 9 Lite uses a customised AMD quad-core processor. You could try recompiling the kernel with the CONFIG_RTC_HCTOSYS=y and CONFIG_RTC_HCTOSYS_DEVICE="rtc0" options. http://www.linuxquestions.org/questi...8/#post5142840
 
Old 08-07-2014, 03:54 AM   #4
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 235

Original Poster
Rep: Reputation: 30
Indeed, I do compile my own kernel and indeed "CONFIG_RTC_HCTOSYS=y" was missing.
Silly me.
Thanks a lot guys, it does seem to work now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NTP issues and system time drift Cyked Linux - Newbie 29 12-19-2011 12:21 PM
Time and NTP issues gauge73 Linux - Software 3 04-21-2008 08:58 AM
ntp does not work.. date and time cannot be changed.. basis1980 Linux - Software 10 02-06-2008 08:09 AM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration