Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hwclock error at boot after updated
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 3:03 am    Post subject: hwclock error at boot after updated Reply with quote

I got this hwclock error on boot after I updated the system.

Code:
rc boot logging started at Wed Feb 12 15:17:02 2020

modules           | * Loading module vboxdrv ...
termencoding      | * Setting terminal encoding [UTF-8] ...
 [ ok ]
modules           | * Failed to load vboxdrv
 [ !! ]
modules           | * Loading module vboxnetadp ...
modules           | * Failed to load vboxnetadp
 [ !! ]
modules           | * Loading module vboxnetflt ...
modules           | * Failed to load vboxnetflt
 [ !! ]
keymaps           | * Setting keyboard mode [UTF-8] ...
 [ ok ]
hwclock           | * Setting system clock using the hardware clock [UTC] ...
keymaps           | * Loading key mappings [us] ...
 [ ok ]
hwclock           |hwclock: settimeofday() failed: Invalid argument
hwclock           | * Failed to set the system clock
 [ !! ]
loopback          | * Bringing up network interface lo ...
sysctl            | * Configuring kernel parameters ...
fsck              | * Checking local filesystems  ...


I already set the time correctly but not fix the issue.
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 3:05 am    Post subject: hwclock error at boot after updated Reply with quote

I got this hwclock error on boot after I updated the system.

Code:
rc boot logging started at Wed Feb 12 15:17:02 2020

modules           | * Loading module vboxdrv ...
termencoding      | * Setting terminal encoding [UTF-8] ...
 [ ok ]
modules           | * Failed to load vboxdrv
 [ !! ]
modules           | * Loading module vboxnetadp ...
modules           | * Failed to load vboxnetadp
 [ !! ]
modules           | * Loading module vboxnetflt ...
modules           | * Failed to load vboxnetflt
 [ !! ]
keymaps           | * Setting keyboard mode [UTF-8] ...
 [ ok ]
hwclock           | * Setting system clock using the hardware clock [UTC] ...
keymaps           | * Loading key mappings [us] ...
 [ ok ]
hwclock           |hwclock: settimeofday() failed: Invalid argument
hwclock           | * Failed to set the system clock
 [ !! ]
loopback          | * Bringing up network interface lo ...
sysctl            | * Configuring kernel parameters ...
fsck              | * Checking local filesystems  ...


I already set the time correctly but not fix the issue.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1907
Location: Frankfurt, Germany

PostPosted: Fri Feb 14, 2020 3:38 am    Post subject: Reply with quote

Hi Evilenzo32,

welcome to the Gentoo forums!

  1. Are you sure that it worked before the update? What did you update? The kernel?

  2. Please post the output of
    Code:
    emerge --info

  3. Please post the output of
    Code:
    hwclock --show -v
Mike

PS: please don't post questions to more than one forum.
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 4:30 am    Post subject: Reply with quote

mike155 wrote:
Hi Evilenzo32,

welcome to the Gentoo forums!

  1. Are you sure that it worked before the update? What did you update? The kernel?

  2. Please post the output of
    Code:
    emerge --info

  3. Please post the output of
    Code:
    hwclock --show -v
Mike

PS: please don't post questions to more than one forum.


Code:
hwclock from util-linux 2.35.1
System Time: 1581654035.146515
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1581520663 seconds after 1969
Last calibration done at 1581520663 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2020/02/14 04:20:36
Hw clock time : 2020/02/14 04:20:36 = 1581654036 seconds since 1969
Time since last adjustment is 133373 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2020-02-14 04:20:35.442640+00:00


I updated the world
Nothing wrong on emerge --info
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 5:27 am    Post subject: Reply with quote

mike155 wrote:
Hi Evilenzo32,

welcome to the Gentoo forums!

  1. Are you sure that it worked before the update? What did you update? The kernel?

  2. Please post the output of
    Code:
    emerge --info

  3. Please post the output of
    Code:
    hwclock --show -v
Mike

PS: please don't post questions to more than one forum.


That error msg occured after I updated glibc to latest version, Maybe the openrc script for hwclock have a bug since it doesn't get changes since 2014.

Check This.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 23241
Location: here

PostPosted: Fri Feb 14, 2020 6:47 am    Post subject: Reply with quote

/dev/rtc exists?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2948

PostPosted: Fri Feb 14, 2020 7:41 am    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
I got this hwclock error on boot after I updated the system.

Code:
rc boot logging started at Wed Feb 12 15:17:02 2020

modules           | * Loading module vboxdrv ...
termencoding      | * Setting terminal encoding [UTF-8] ...
 [ ok ]
modules           | * Failed to load vboxdrv
 [ !! ]
modules           | * Loading module vboxnetadp ...
modules           | * Failed to load vboxnetadp
 [ !! ]
modules           | * Loading module vboxnetflt ...
modules           | * Failed to load vboxnetflt
 [ !! ]
keymaps           | * Setting keyboard mode [UTF-8] ...
 [ ok ]
hwclock           | * Setting system clock using the hardware clock [UTC] ...
keymaps           | * Loading key mappings [us] ...
 [ ok ]
hwclock           |hwclock: settimeofday() failed: Invalid argument
hwclock           | * Failed to set the system clock
 [ !! ]
loopback          | * Bringing up network interface lo ...
sysctl            | * Configuring kernel parameters ...
fsck              | * Checking local filesystems  ...


I already set the time correctly but not fix the issue.


Have a look at
https://wiki.gentoo.org/wiki/System_time#OpenRC_2 wrote:
Note
It could however happen hwclock being started as dependency of another rc-service, e.g. sysklogd. In this case the rc-service osclock should be added to the same runlevel as the dependent rc-service.
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 11:16 am    Post subject: Re: hwclock error at boot after updated Reply with quote

charles17 wrote:
Evilenzo32 wrote:
I got this hwclock error on boot after I updated the system.

Code:
rc boot logging started at Wed Feb 12 15:17:02 2020

modules           | * Loading module vboxdrv ...
termencoding      | * Setting terminal encoding [UTF-8] ...
 [ ok ]
modules           | * Failed to load vboxdrv
 [ !! ]
modules           | * Loading module vboxnetadp ...
modules           | * Failed to load vboxnetadp
 [ !! ]
modules           | * Loading module vboxnetflt ...
modules           | * Failed to load vboxnetflt
 [ !! ]
keymaps           | * Setting keyboard mode [UTF-8] ...
 [ ok ]
hwclock           | * Setting system clock using the hardware clock [UTC] ...
keymaps           | * Loading key mappings [us] ...
 [ ok ]
hwclock           |hwclock: settimeofday() failed: Invalid argument
hwclock           | * Failed to set the system clock
 [ !! ]
loopback          | * Bringing up network interface lo ...
sysctl            | * Configuring kernel parameters ...
fsck              | * Checking local filesystems  ...


I already set the time correctly but not fix the issue.


Have a look at
https://wiki.gentoo.org/wiki/System_time#OpenRC_2 wrote:
Note
It could however happen hwclock being started as dependency of another rc-service, e.g. sysklogd. In this case the rc-service osclock should be added to the same runlevel as the dependent rc-service.


Remove the hwclock from boot level did remove the error at boot, But it affected my user groups, the user are removed from all groups except the $USER group.

Why not fix it by make changes on hwclock init script?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2948

PostPosted: Fri Feb 14, 2020 11:51 am    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
Why not fix it by make changes on hwclock init script?

Depends on whether using in-kernel-method or openrc-method. In-kernel-method doesn't use those init scripts at all.
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 12:32 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

charles17 wrote:
Evilenzo32 wrote:
Why not fix it by make changes on hwclock init script?

Depends on whether using in-kernel-method or openrc-method. In-kernel-method doesn't use those init scripts at all.


But that's hwclock is defaultly enable at boot level. Do you have this error too?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2948

PostPosted: Fri Feb 14, 2020 12:41 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
But that's hwclock is defaultly enable at boot level. Do you have this error too?

No, I am using In-kernel method and I have:
rc-config show --all:
Status of init scripts in runlevel "boot"
  binfmt                    [started]
  bootmisc                  [started]
  fsck                      [started]
  hostname                  [started]
  keymaps                   [started]
  localmount                [started]
  loopback                  [started]
  lvm                       [started]
  modules                   [started]
  mtab                      [started]
  procfs                    [started]
  root                      [started]
  save-keymaps              [started]
  save-termencoding         [started]
  swap                      [started]
  sysctl                    [started]
  termencoding              [started]
  urandom                   [started]
Status of init scripts in runlevel "default"
  cupsd                     [started]
  dhcpcd                    [started]
  ip6tables                 [started]
  iptables                  [started]
  local                     [started]
  netmount                  [started]
  osclock                   [started]
  sysklogd                  [started]
  wpa_supplicant            [started]
Status of init scripts in runlevel "nonetwork"
  local                     [started]
Status of init scripts in runlevel "shutdown"
  killprocs                 [stopped]
  mount-ro                  [stopped]
  savecache                 [stopped]
Status of init scripts in runlevel "sysinit"
  cgroups                   [started]
  devfs                     [started]
  dmesg                     [started]
  kmod-static-nodes         [started]
  sysfs                     [started]
  udev                      [started]
  udev-trigger              [started]
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 12:47 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

So you manually disabled the hwclock service?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2948

PostPosted: Fri Feb 14, 2020 1:11 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
So you manually disabled the hwclock service?

Yes. and added osclock instead.
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 1:16 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

charles17 wrote:
Evilenzo32 wrote:
So you manually disabled the hwclock service?

Yes. and added osclock instead.


I want to set my system and hardware clock on UTC, In-kernel method need NTP but I don't use ntp to set time. Then what is the solution of that?
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 267

PostPosted: Fri Feb 14, 2020 1:45 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
In-kernel method need NTP but I don't use ntp to set time. Then what is the solution of that?

Then what do you use? You have to use something to do it. What kind of 'solution' do you mean? You can set your clock once, again using ntp, but it will drift away slowly, NTP constantly readjusts your clock, therefor it is recommended to have.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2948

PostPosted: Fri Feb 14, 2020 1:50 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
... but I don't use ntp to set time. ...

How then are you getting network time? Even ntpdate uses NTP

Edit:
https://forums.gentoo.org/viewtopic-t-505055-start-0.html
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Fri Feb 14, 2020 2:24 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

Quote:
How then are you getting network time? Even ntpdate uses NTP


On installation media the timezone is being sync, then I chroot to the system and link the timezone so it's getting the correct time.
Back to top
View user's profile Send private message
GDH-gentoo
Apprentice
Apprentice


Joined: 20 Jul 2019
Posts: 167
Location: South America

PostPosted: Fri Feb 14, 2020 3:44 pm    Post subject: Re: hwclock error at boot after updated Reply with quote

Evilenzo32 wrote:
Code:
hwclock           | * Setting system clock using the hardware clock [UTC] ...
[...]
hwclock           |hwclock: settimeofday() failed: Invalid argument
hwclock           | * Failed to set the system clock
 [ !! ]
You can try making the service more verbose with:
Code:
clock_args=--verbose
in /etc/conf.d/hwclock
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 18294

PostPosted: Fri Feb 14, 2020 9:22 pm    Post subject: Reply with quote

Merged the duplicate thread from Portage & Programming since cross-posting is not allowed.
_________________
Don't even pause and ask them why. Turn around and say goodbye.
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Sat Feb 15, 2020 12:45 am    Post subject: Reply with quote

https://sourceware.org/ml/libc-announce/2020/msg00001.html
Quote:
The settimeofday function can still be used to set a system-wide
time zone when the operating system supports it. This is because
the Linux kernel reused the API, on some architectures, to describe
a system-wide time-zone-like offset between the software clock
maintained by the kernel, and the "RTC" clock that keeps time when
the system is shut down.

However, to reduce the odds of this offset being set by accident,
settimeofday can no longer be used to set the time and the offset
simultaneously. If both of its two arguments are non-null, the call
will fail (setting errno to EINVAL).
Back to top
View user's profile Send private message
Evilenzo32
n00b
n00b


Joined: 14 Feb 2020
Posts: 11

PostPosted: Mon Feb 17, 2020 2:13 pm    Post subject: Reply with quote

fedeliallalinea wrote:
/dev/rtc exists?


Yes, It exist there
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum