Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • manjaro-armmanjaro-arm
  • packages
  • core
  • linux
  • Issues
  • #21
Closed
Open
Issue created Jul 09, 2021 by Dragan Simic@dragan-simic

RTC synchronization on PineBook Pro and RockPro64

I've noticed the following peculiar error message(s) on my PineBook Pro:

[    4.909530] systemd-journald[375]: Received client request to flush runtime journal.
[    4.918086] systemd-journald[375]: File /var/log/journal/d4d9ad9728ef4f7daaeb74a47284f5be/system.journal corrupted or uncleanly shut down, renaming and replacing.

There was no forced shutdown that could've caused this journal file to become corrupted, which made this really suspicious. Upon closer investigation, it turned out to be caused by the systemd's decision to reject journal files that have timestamps from the future. The root cause is that the RTC kernel module (rtc_rk808) gets loaded too late, causing init (i.e. systemd) to be started without prior initialization of the system clock.

The solution is to add rtc_rk808 at the start of the MODULES list in /etc/mkinitcpio.conf. For this purpose I've created manjaro-arm-pinebookpro-post-install.patch and manjaro-arm-rockpro64-post-install.patch patches for the pinebookpro-post-install and rockpro64-post-install Manjaro ARM packages. These two patches also include some tidying up and whitespace cleanups, to make everything neat. :)

To complete the fix, the kernel config file also needs to be modified so the kernel saves the time from the system clock periodically to the hardware clock, if the system clock is synchronized to an NTP source. Otherwise, the hardware clock drifts over time and the journal file eventually becomes rejected again on boot. For this purpose, I've created manjaro-arm-linux.patch patch for the linux Manjaro ARM package.

As a note, the background of the relation between the systemd behavior and the RTC synchronization is explained in more detail in this message from the systemd-devel mailing list.

Assignee
Assign to
Time tracking