Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
turris-build
turris-build
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 11
    • Merge Requests 11
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Turris
  • turris-buildturris-build
  • Issues
  • #187

Closed
Open
Opened Sep 26, 2020 by Cedric Girard@X-dark

Unable to interact with hardware clock on Turris Omnia

I am running TurrisOS 5.1.1. I noticed my hardware clock is several days out of date, causing a lot of operations to fail at boot until system time is updated by NTP. The issue is I cannot update the hardware clock and the value I can read with busybox hwclock is always the same.

root@turris:~# date
Fri Sep 25 16:25:07 CEST 2020
root@turris:~# hwclock -r
Fri Sep 18 14:48:26 2020  0.000000 seconds
root@turris:~# hwclock -w
root@turris:~# hwclock -r
Fri Sep 18 14:48:26 2020  0.000000 seconds
root@turris:~# date
Fri Sep 25 16:25:24 CEST 2020

A strace of the -w operation of hwclock from busybox does not display anything wrong:

open("/dev/rtc0", O_WRONLY|O_LARGEFILE) = 3
clock_gettime(CLOCK_REALTIME, {tv_sec=1601045609, tv_nsec=617766075}) = 0
open("/etc/TZ", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ioctl(3, RTC_SET_TIME, {tm_sec=29, tm_min=53, tm_hour=16, tm_mday=25, tm_mon=8, tm_year=120, ...}) = 0
exit_group(0)                           = ?
+++ exited with 0 +++

With util-linux hwclock, I can't even access /dev/rtc0:

root@turris:~# /usr/sbin/hwclock -r -v
hwclock from util-linux 2.34
System Time: 1601045759.232281
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
hwclock: select() to /dev/rtc0 to wait for clock tick timed out
...synchronization failed
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: turris/turris-build#187