Weird clock/time related problems in Manjaro (SOLVED)

SeanK

Member
Joined
Mar 18, 2020
Messages
94
Reaction score
60
Credits
532
Has anyone else had clock related problems in Manjaro KDE plasma? I have checked and its set for the right country/timezone but for some reason the time every day is incorrect and I have to manually re-set it. I had exactly the same problem with Mint.

I have heard a rumour its common in dual boots with Windows 10 which I have but not sure if that's true or not?
 
Last edited:


Vrai

Well-Known Member
Joined
Mar 16, 2019
Messages
1,060
Reaction score
1,002
Credits
4,055
I have heard a rumour its common in dual boots with Windows 10 which I have but not sure if that's true or not?
Not a rumor. It's true.
But not with just Windows 10. With Windows in general.
It has to do with how Linux and Windows keep track of the time and display it.
One uses UTC time and offsets it for your time zone and the other uses system time. There is a small file that gets written to or overwritten during the boot process and Windows and Linux don't agree on which way it should be.
There is a fix for it though.

Now, the question is, is that the issue you are having? Are you dual booting Windows and Linux?
Can you describe what you mean by "the time every day is incorrect" - is it off by a lot or off by a little - is it off by the same amount every time?

A dead or dying battery on the motherboard will cause the system to lose track of the time.
 
OP
S

SeanK

Member
Joined
Mar 18, 2020
Messages
94
Reaction score
60
Credits
532
Not a rumor. It's true.
But not with just Windows 10. With Windows in general.
It has to do with how Linux and Windows keep track of the time and display it.
One uses UTC time and offsets it for your time zone and the other uses system time. There is a small file that gets written to or overwritten during the boot process and Windows and Linux don't agree on which way it should be.
There is a fix for it though.

Now, the question is, is that the issue you are having? Are you dual booting Windows and Linux?
Can you describe what you mean by "the time every day is incorrect" - is it off by a lot or off by a little - is it off by the same amount every time?

A dead or dying battery on the motherboard will cause the system to lose track of the time.

Ah ha, so it is true! Its good to get that confirmed. Many thanks too for the comprehensive reply. :)

To answer those questions:

>I have a dual boot of Manjaro KDE plasma and Windows 10 Enterprise (each on separate internal drives SSD & M2)

> Time is off by a large margin 3-4 hours on average. I have not had Manjaro on this machine long so I'm not sure if its exactly the same amount of time but I will look out for this and report back if the work around does not resolve the problem.

>I do not know what the state of the laptop motherboards battery is. Its not an old laptop but of course technology is not that reliable these days so it could be a problem.

I'll give that solution you posted a go and let you know how it all works out.
 
OP
S

SeanK

Member
Joined
Mar 18, 2020
Messages
94
Reaction score
60
Credits
532
Not a rumor. It's true.
But not with just Windows 10. With Windows in general.
It has to do with how Linux and Windows keep track of the time and display it.
One uses UTC time and offsets it for your time zone and the other uses system time. There is a small file that gets written to or overwritten during the boot process and Windows and Linux don't agree on which way it should be.
There is a fix for it though.

Now, the question is, is that the issue you are having? Are you dual booting Windows and Linux?
Can you describe what you mean by "the time every day is incorrect" - is it off by a lot or off by a little - is it off by the same amount every time?

A dead or dying battery on the motherboard will cause the system to lose track of the time.

So I ran the work around starting with "timedatectl"

>Here is the output:

Local time: Fri 2020-03-20 22:10:17 NZDT
Universal time: Fri 2020-03-20 09:10:17 UTC
RTC time: Fri 2020-03-20 09:10:18
Time zone: Pacific/Auckland (NZDT, +1300)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no

I then applied the work around "timedatectl set-local-rtc 1 --adjust-system-clock"

>Here is the output:

Local time: Fri 2020-03-20 09:14:42 NZDT
Universal time: Thu 2020-03-19 20:14:42 UTC
RTC time: Fri 2020-03-20 09:14:42
Time zone: Pacific/Auckland (NZDT, +1300)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone
.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain
it.
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.

Next I ran the suggest solution from Manjaro 'timedatectl set-local-rtc 0'.

XXX~]$ timedatectl
Local time: Fri 2020-03-20 09:18:49 NZDT
Universal time: Thu 2020-03-19 20:18:49 UTC
RTC time: Thu 2020-03-19 20:18:49
Time zone: Pacific/Auckland (NZDT, +1300)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no

In each case the time is out by exactly - 2 hours. Its an interesting little issue and I'll keep working on it. Certainly its not a show stopper for me as I always wear a wristwatch but its certainly intriguing.

Thanks again for your help. :)
 

PlasmaHarsh

New Member
Joined
Jan 10, 2023
Messages
1
Reaction score
1
Credits
6
Quick solution: I solved the issue by just changing my time +2hr, installed whatever I needed and then fixed the time back.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,344
Reaction score
3,948
Credits
38,965
So I ran the work around starting with "timedatectl"

>Here is the output:
Looking at all of your output you were just setting the time manually and didn't use ntp to synchronize your time using time servers: "NTP service: inactive". So it may be worth looking into setting up chrony on your system so that the time automatically gets synchronized.
 
OP
S

SeanK

Member
Joined
Mar 18, 2020
Messages
94
Reaction score
60
Credits
532
Quick solution: I solved the issue by just changing my time +2hr, installed whatever I needed and then fixed the time back.
This problem is usually down to Windows and Linux dual boot (a standard configuration for me. I'm currently using Arch not Manjaro. Here's a fix that worked for me:

timedatectl set-time "2014-05-26 11:13:54" (obviously using correct date/time).

They recommend changing Windows to use UTC. Link here:

 
OP
S

SeanK

Member
Joined
Mar 18, 2020
Messages
94
Reaction score
60
Credits
532
Looking at all of your output you were just setting the time manually and didn't use ntp to synchronize your time using time servers: "NTP service: inactive". So it may be worth looking into setting up chrony on your system so that the time automatically gets synchronized.
That's a good idea. I'll read up on the Arch wiki and give it a go. Thanks.
 
OP
S

SeanK

Member
Joined
Mar 18, 2020
Messages
94
Reaction score
60
Credits
532
This problem is usually down to Windows and Linux dual boot (a standard configuration for me. I'm currently using Arch not Manjaro. Here's a fix that worked for me:

timedatectl set-time "2014-05-26 11:13:54" (obviously using correct date/time).

They recommend changing Windows to use UTC. Link here:

Gave this one a go. Failed at 2.2
chronyc
chronyc> online
200 OK
chronyc> exit

chronyc> online
506 Cannot talk to daemon
chronyc> online 200 OK
Could not get address for hostname

Have specified correct NTP pool servers for NZ and edited out examples using Nano. No clear cut solution on line for this one that I could find.

Still worth a try.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,344
Reaction score
3,948
Credits
38,965
The only setting in /etc/chrony.conf I change if I want to but usually the default timeserver is good enough.
Code:
pool 2.fedora.pool.ntp.org iburst
Then I just start and enable chrony.
Code:
systemctl enable chrony --now
Output of timedatectl
Code:
timedatectl
               Local time: Wed 2023-01-11 07:50:23 CET
           Universal time: Wed 2023-01-11 06:50:23 UTC
                 RTC time: Wed 2023-01-11 06:50:23
                Time zone: Europe/Amsterdam (CET, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
And then when I turn on my system and the time is incorrect chrony corrects it.
Code:
Jan 11 07:39:44 lilith systemd[1]: Started chronyd.service - NTP client/server.
Jan 11 07:39:57 lilith chronyd[1630]: Selected source 20.101.57.9 (2.fedora.pool.ntp.org)
Jan 11 07:39:57 lilith chronyd[1630]: System clock wrong by -1.604873 seconds
Jan 11 07:39:55 lilith chronyd[1630]: System clock was stepped by -1.604873 seconds
Jan 11 07:39:55 lilith chronyd[1630]: System clock TAI offset set to 37 seconds
Jan 11 07:39:57 lilith chronyd[1630]: Selected source 158.101.221.122 (2.fedora.pool.ntp.org)
 
$200 Digital Ocean Credit
Get a free VM to test out Linux!


Members online


Latest posts

Top