Uhrzeit nicht korrekt auf Linux

Sorry, ich war verhindert.

timedatectl show-timesync gibt mir folgendes aus:
"Failed to parse bus message: Kein passendes Gerät bzw. keine passende Adresse gefunden"

Ich bin ins Bios von mir gegangen und habe gesehen, dass die Uhrzeit im Bios zwei Stunden vor der aktuellen Uhrzeit liegt. Ich habe das angepasst und das OS gestartet. Im OS habe ich dann die Uhrzeit gewechselt und anschließend den Haken wieder bei "automatisch beziehen" gesetzt. Jetzt ist es zwei Minuten später und die Uhr synchronisiert noch immer nicht richtig.
 
Chibi88 schrieb:
Ich bin ins Bios von mir gegangen und habe gesehen, dass die Uhrzeit im Bios zwei Stunden vor der aktuellen Uhrzeit liegt. Ich habe das angepasst und das OS gestartet. Im OS habe ich dann die Uhrzeit gewechselt und anschließend den Haken wieder bei "automatisch beziehen" gesetzt. Jetzt ist es zwei Minuten später und die Uhr synchronisiert noch immer nicht richtig.
Das die cmos-clock in der lokalen Zeit läuft und nicht in GMT ist so ein dämlicher Windowism.
Bedenke auch das an einem System unterschiedliche User die sich in unterschiedlichen Zeitzonen befinden angemeldet sein können.
Und setzt mal die Kommandos ab die ich gepostet habe.
 
Ich verwende auch Fedora 39, die Uhrzeit ist aber korrekt synchronisiert
Dies wohl per chronyd Service.
Scheinbar verwendet dieser meine Fritz.Box dazu?
Die von mir nicht bewußt veränderte /etc/chrony.conf

Code:
# These servers were defined in the installation:
server _gateway iburst

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (https://www.pool.ntp.org/join.html).

# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Require authentication (nts or key option) for all NTP sources.
#authselectmode require

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony

# Insert/delete leap seconds by slewing instead of stepping.
#leapsecmode slew

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
# log measurements statistics tracking

Der von einem user hier genannte Befehl, liefert dieses
Code:
ntpcheck diag
[ OK ] Clock is syncing to 192.168.178.1
[ OK ] Leap indicator is set to 'none'
[ OK ] Tracking offset is -0.016ms, we expect it to be within 1.0ms
[ OK ] Sys Peer offset is 0.059ms, we expect it to be within 2.0ms
[ OK ] Sys Peer jitter is 0.000ms, we expect it to be within 1.0ms
[ OK ] Current correction is 0.012ms, we expect it to be within 60000.0ms
[ OK ] All 1 peers are OK (have 'flash' indicator set to 0)
[ OK ] All 1 peers were reachable 8/8 last sync attempts

Ist das bei Dir auch so?
192.168.178.1 ist meine FB, Provider ist 1und1-
Der PC ist per Lan Kabel mit der Fritz.Box verbunden.
 
Zuletzt bearbeitet:
@foofoobar:

1715539037194.png


2 Minuten weiter als auf dem Handy und NTP Servern im Internet.
 
Zuletzt bearbeitet:
@Chibi88 Die Lösung dafür ist es sich die Dokumentation dieser Befehle durch zu lesen und zu lernen was die denn machen.
Du wirst deine Systemeinstellungen nicht ohne sudo oder eine äquivalente Erhöhung der Rechte zur Ausführung anpassen können.
 
  • Gefällt mir
Reaktionen: Chibi88
Zuletzt bearbeitet:
1715596942885.png


Ist das so korrekt?

@Uridium sorry, meine Systemzeit geht 2-3 Minuten vor.
 
Chibi88 schrieb:
Ist das so korrekt?
Ja. Jetzt kann man sehen, dass die Zeit tatsächlich abweicht. Was jetzt noch fehlt ist die Ausgabe von ntpcheck diag. Und noch eine weitere Frage: Ist das System eine VM?
 
Es sind zweieinhalb Minuten. Bedenke den Unterschied zwischen UTC und lokaler Zeit.
 
  • Gefällt mir
Reaktionen: Keylan
Uridium schrieb:
Stunden, Chibi, Stunden...
Ich hoffe du meinst das nicht ernst. Sonst bitte Zeitzonen beachten.

Das Problem ist in Zeile 4 mit der GMT Zeit die um 0:02:32 abweicht.
 
  • Gefällt mir
Reaktionen: Evil E-Lex
Auf den vorigen Screenshots war nur der Stundenversatz sichtbar. Darum habe ich zwei mal nachgefragt. Hat sich damit erledigt, also definitiv Minuten.

Was sagt:
$ cat /etc/adjtime

Du kannst die Datei auch einfach löschen und einen neuen Sync anstoßen. Darin befindet sich ein geschätzter Zeitversatz, der der H/W Uhr zugeschrieben wird. Ist da mal was schief gelaufen, wird's bunt.

Was sagen die Logs?
$ journalctl -u systemd-timesyncd --no-hostname --since "1 day ago"
$ journalctl -u chronyd --no-hostname --since "1 day ago"
$ journalctl -u ntpd --no-hostname --since "1 day ago"
 
Zuletzt bearbeitet:
Ich post mal meine funktionierende chrony.conf:

Code:
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (https://www.pool.ntp.org/join.html).
server ptbtime1.ptb.de nts iburst
server ptbtime2.ptb.de nts iburst
server ptbtime3.ptb.de nts iburst
server ptbtime4.ptb.de nts iburst

# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Require authentication (nts or key option) for all NTP sources.
#authselectmode require

# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys

# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony

# Insert/delete leap seconds by slewing instead of stepping.
#leapsecmode slew

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking
 
@Evil E-Lex

1715622823586.png


Es ist keine VM und ich nutze Fedora 40, ursprüglich Gnome, jetzt auf KDE mit X11 von Plasma wegen Nvidia und Full Disk Encryption. Problematik bestand aber vorher schon afaik.

@Uridium

1715622945289.png


1 Command: No entries
2 Command:
1715623121242.png


3 Command: No entries
 
Kannst Du mal deine /etc/chrony.conf posten? Der Timeserver ist auf deinen Router gesetzt und nicht direkt auf einen externen Server. Das ist u.U. nicht optimal.
 
  • Gefällt mir
Reaktionen: Chibi88
Code:
# These servers were defined in the installation:
server _gateway iburst

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (https://www.pool.ntp.org/join.html).

# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
#local stratum 10

# Require authentication (nts or key option) for all NTP sources.
#authselectmode require

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony

# Insert/delete leap seconds by slewing instead of stepping.
#leapsecmode slew

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking

Ich nutze einen Pi-Hole, der gleichzeitig als DHCP Server dient, da meine Vodafone Connect-Box keine Konfiguration eines DNS Servers zulässt. Liegt das ggf. daran?
 
sichere doch mal Deine /etc/chrony.conf als /etc/chrony.orig und nimm mal meine Datei.
Danach startest du mit systemctl restart chronyd.service chrony neu.

ein chronyc sources wäre dann interessant.
 
Oder Du trägst das selbst ein:
Chibi88 schrieb:
Code:
# These servers were defined in the installation:
server _gateway iburst
Code:
# These servers were defined in the installation:
server 0.europe.pool.ntp.org iburst
server 1.europe.pool.ntp.org iburst
server 2.europe.pool.ntp.org iburst
server 3.europe.pool.ntp.org iburst
Alternativ kannst Du auch alles so lassen und in deinem Router (192.168.0.1) schauen, warum der hinkt (defekter Zeitserver eingetragen o.ä.). Von dort holt sich dein Rechner aktuell die Zeit (_gateway/192.168.0.1).

Chibi88 schrieb:
Ich nutze einen Pi-Hole, der gleichzeitig als DHCP Server dient, da meine Vodafone Connect-Box keine Konfiguration eines DNS Servers zulässt. Liegt das ggf. daran?
Nein, ich glaube nicht.
 
Zurück
Oben