Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: how sync bios time with xfce time? (Read 1395 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: how sync bios time with xfce time?

Reply #15
time after boot desktop time is correct but every boot log i see error

RTFM:

https://wiki.gentoo.org/wiki/Ntp#Configuration
https://wikitest.gentoo.org/wiki/Ntp#Configuration
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: how sync bios time with xfce time?

Reply #16

Code: [Select]
Solving "Exiting, name server cannot be used: Temporary failure in name resolution (-3) * Failed to set clock"
FILE /etc/local.d/ntp.start

(sleep 15; ntpdate -b -u 0.gentoo.pool.ntp.org > /dev/null)&

not help
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #17
tintin, it is possible that your ntp-client is starting before your network connection is established, which could cause the name resolution error.

At this page, it details "The Depend Function"

Does your ntp-client.conf file contain this:
Code: [Select]
depend() {
before cron portmap
after net
use dns logger
}

and your ntpd.conf contain:
Code: [Select]
depend() {
use net dns logger
after ntp-client
}

?
not conf but inits, yes all contain as your show
/etc/init.d/ntp-client
Code: [Select]
#!/usr/bin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
        before cron portmap
        after net
        use dns logger
}

checkconfig() {
        if ! type "${NTPCLIENT_CMD}" >/dev/null 2>&1 ; then
                eerror "Please edit /etc/conf.d/ntp-client"
                eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
                return 1
        fi
        if [ -z "${NTPCLIENT_OPTS}" ] ; then
                eerror "Please edit /etc/conf.d/ntp-client"
                eerror "I need to know what server/options to use!"
                return 1
        fi
        return 0
}

start() {
        checkconfig || return $?

        ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
        "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS}
        eend $? "Failed to set clock"
}
/etc/init.d/ntpd
Code: [Select]
#!/usr/bin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description="ntpd - the network time protocol daemon"
#pidfile="/run/ntpd.pid"
command="/usr/bin/ntpd"
#command_args_background="-p ${pidfile}"
command_args="${NTPD_OPTS}"
#start_stop_daemon_args="--pidfile ${pidfile}"
supervisor="supervise-daemon"
command_args_foreground="-n"

depend() {
        use net dns logger
        after ntp-client
}

start_pre() {
        if [ ! -f /etc/ntp.conf ] ; then
                eerror "Please create /etc/ntp.conf"
                return 1
        fi
        return 0
}

-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #18
Hello,

Note : I don't have a problem with time synchronization.

Here is the content of my /etc/ntp.conf:
Spoiler (click to show/hide)

My /etc/init.d/ntp-client:
Spoiler (click to show/hide)

Re: how sync bios time with xfce time?

Reply #19
checked, yours ntp config is same is my here,
but ntp-client won`t start at boot
also dont know why this trick from gentoo wiki not work
Code: [Select]
/etc/local.d/ntp.start              
sleep 15; ntpdate -b -u 0.gentoo.pool.ntp.org > /dev/null &

Code: [Select]
home:[root]:/home/freeartist-artix# rc-status 
Runlevel: default
 metalog                                                                                                                                                                                [  started -2:-43:-23 (0) ]
 acpid                                                                                                                                                                                  [  started -2:-43:-25 (0) ]
 dbus                                                                                                                                                                                   [  started -2:-43:-24 (0) ]
 connmand                                                                                                                                                                               [  started -2:-43:-25 (0) ]
 bluetoothd                                                                                                                                                                             [  started -2:-43:-25 (0) ]
 ntp-client                                                                                                                                                                                           [  stopped  ]
 cronie                                                                                                                                                                                 [  started -2:-43:-26 (0) ]
 cupsd                                                                                                                                                                                  [  started -2:-43:-26 (0) ]
 gpm                                                                                                                                                                                                  [  started  ]
 netmount                                                                                                                                                                                             [  started  ]
 lightdm                                                                                                                                                                                [  started -2:-43:-26 (0) ]
 ntpd                                                                                                                                                                                   [  started -2:-43:-26 (0) ]
 local                                                                                                                                                                                                [  started  ]
 agetty.tty5                                                                                                                                                                            [  started -2:-43:-49 (0) ]
 agetty.tty2                                                                                                                                                                            [  started -2:-43:-49 (0) ]
 agetty.tty6                                                                                                                                                                            [  started -2:-43:-49 (0) ]
 agetty.tty4                                                                                                                                                                            [  started -2:-43:-49 (0) ]
 agetty.tty1                                                                                                                                                                            [  started -2:-43:-49 (0) ]
 agetty.tty3                                                                                                                                                                            [  started -2:-43:-49 (0) ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dhcpcd                                                                                                                                                                                 [  started -2:-43:-25 (0) ]
 avahi-daemon                                                                                                                                                                           [  started -2:-43:-25 (0) ]
Dynamic Runlevel: manual
 openrc-settingsd                                                                                                                                                                                     [  started  ]
home:[root]:/home/freeartist-artix
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #20
Code: [Select]
home:[root]:/etc/conf.d# cat ntpd ntp-client 
# /etc/conf.d/ntpd

# Options to pass to the ntpd process
# Most people should leave this line alone ...
# however, if you know what you're doing, feel free to tweak
NTPD_OPTS="-g -u ntp:ntp"

# /etc/conf.d/ntp-client

# Command to run to set the clock initially
# Most people should just leave this line alone ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'
NTPCLIENT_CMD="ntpdate"

# Options to pass to the above command
# This default setting should work fine but you should
# change the default 'pool.ntp.org' to something closer
# to your machine.  See http://www.pool.ntp.org/ or
# try running `netselect -s 3 pool.ntp.org`.
NTPCLIENT_OPTS="-s -b -u \
0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org \
2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"

# If you use hostnames above, then you should depend on dns
# being up & running before we try to run.  Otherwise, you
# can disable this.
rc_use="dns"
rc_need="dhcpcd"
home:[root]:/etc/conf.d#
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #21
Code: [Select]
home:[root]:/etc# cat dhcpcd.conf 
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
#hostname

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
duid

# Persist interface configuration when dhcpcd exits.
persistent

# vendorclassid is set to blank to avoid sending the default of
# dhcpcd-<version>:<os>:<machine>:<platform>
vendorclassid

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Request a hostname from the network
option host_name

# Most distributions have NTP support.
option ntp_servers

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
# Don't attempt to obtain an IPv4LL address if we failed to get one via DHCP.  See RFC 3927.
noipv4ll
home:[root]:/etc#
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #22
/etc/conf.d/net
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #23
LOL ;D
As with syslog-ng issue was slved by replacement to metalog
https://forum.artixlinux.org/index.php/topic,6827.msg41496.html#msg41496
ntp problem solved with bruteforce method
no service - no problem :D
Code: [Select]
home:[root]:/home/freeartist-artix# rc-update del ntpd
 * service ntpd deleted from runlevel default
home:[root]:/home/freeartist-artix# rc-update del ntp-client
 * service ntp-client deleted from runlevel default
home:[root]:/home/freeartist-artix# rc-service ntpd stop
ntpd             | * Stopping ntpd ...                                                                                                                                                                       [ ok ]
home:[root]:/home/freeartist-artix# rc-service ntp-client stop
ntp-client       | * WARNING: ntp-client is already stopped
home:[root]:/home/freeartist-artix#
xfce time is correct :)
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #24
f**k system still use UTC time >:(
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #25
almost solved
 /etc/init.d/ntp-client and adding the sleep 5 line like this:
Code: [Select]
start() {
    checkconfig || return $?

    ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
    sleep 5;
    "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS}
    eend $? "Failed to set clock"
}

after  no error at booting, ntpd and ntp-client is started and working but system time is still incorrect
Code: [Select]
home:[freeartist-artix]:~$ rc-status
Runlevel: default
 metalog                                                                                                                                                                                  [  started 00:00:57 (0) ]
 acpid                                                                                                                                                                                    [  started 00:00:55 (0) ]
 dbus                                                                                                                                                                                     [  started 00:00:57 (0) ]
 connmand                                                                                                                                                                                 [  started 00:00:55 (0) ]
 bluetoothd                                                                                                                                                                               [  started 00:00:55 (0) ]
 ntp-client                                                                                                                                                                                           [  started  ]
 cronie                                                                                                                                                                                   [  started 00:00:34 (0) ]
 cupsd                                                                                                                                                                                    [  started 00:00:55 (0) ]
 gpm                                                                                                                                                                                                  [  started  ]
 netmount                                                                                                                                                                                             [  started  ]
 lightdm                                                                                                                                                                                  [  started 00:00:55 (0) ]
 ntpd                                                                                                                                                                                     [  started 00:00:34 (0) ]
 local                                                                                                                                                                                                [  started  ]
 agetty.tty5                                                                                                                                                                              [  started 00:00:30 (0) ]
 agetty.tty2                                                                                                                                                                              [  started 00:00:30 (0) ]
 agetty.tty6                                                                                                                                                                              [  started 00:00:30 (0) ]
 agetty.tty4                                                                                                                                                                              [  started 00:00:30 (0) ]
 agetty.tty1                                                                                                                                                                              [  started 00:00:30 (0) ]
 agetty.tty3                                                                                                                                                                              [  started 00:00:30 (0) ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dhcpcd                                                                                                                                                                                   [  started 00:00:55 (0) ]
 avahi-daemon                                                                                                                                                                             [  started 00:00:55 (0) ]
Dynamic Runlevel: manual
 openrc-settingsd                                                                                                                                                                                     [  started  ]
home:[freeartist-artix]:~$

Code: [Select]
home:[root]:/home/freeartist-artix# date
Sat 18 May 14:32:08 UTC 2024

Code: [Select]
home:[root]:/home/freeartist-artix# rc-service ntpd status
 * status: started
home:[root]:/home/freeartist-artix# rc-service ntp-client status
 * status: started
home:[root]:/home/freeartist-artix#
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #26
install chrony, remove ntpd, same
my bios always set incorrect time every poweroff by 3hr in past min and sec are correct. CMOS battery in new.(gigabyte P31 DS3L last bios)
Multiboot here. Win7 and Win10 show time correct.
Also apply this reg fix
https://wiki.archlinux.org/title/System_time#UTC_in_Windows
But at Artix only xfce show correct time, in tty time is 3hr past.
HOW sync xfce time to hwclock?
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)

Re: how sync bios time with xfce time?

Reply #27
Multiboot here. Win7 and Win10 show time correct.

"Ceterum censeo M$ esse delendam"

RTFM:

https://wiki.gentoo.org/wiki/System_time#Dual_booting_with_Windows
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "


 

Re: how sync bios time with xfce time?

Reply #29
SOLUTION

chrony
+
Code: [Select]
cp /usr/share/zoneinfo/Europe/Kiyv /etc/localtime
-=linux its buggy crap that have no antifool protection (c)=- :)
*linux is free software, and comes with ABSOLUTELY NO WARRANTY* :)
+ALL YOURS ACTIONS at Linux YOU DO at YOUR OWN RISK!+ :)