hwclock - possible problem after update

This forum is for discussion about general software issues.

hwclock - possible problem after update

Postby mcloaked » Mon Oct 30, 2017 7:40 pm

After the most recent update of util-linux

[2017-10-30 18:50] [ALPM] upgraded util-linux (2.30.2-1 -> 2.31-1)

when I run hwclock -r I get:

# hwclock -r
hwclock: ioctl(3, RTC_UIE_ON, 0) to /dev/rtc0 failed: Invalid argument

I see the same on two different systems - anyone else seeing this?
mcloaked
 
Posts: 26
Joined: Thu Oct 16, 2014 4:16 pm

Re: hwclock - possible problem after update

Postby mcloaked » Sat Nov 04, 2017 3:14 pm

Interestingly the following command shows the RTC is set correctly (though on one machine I have to manually set the system clock with the date command, and then write the time to the RTC with hwclock --systohc, and then I see:

Code: Select all
# timedatectl status
                      Local time: Sat 2017-11-04 15:10:37 GMT
                  Universal time: Sat 2017-11-04 15:10:37 UTC
                        RTC time: Sat 2017-11-04 15:10:12
                       Time zone: Europe/London (GMT, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: no
                 RTC in local TZ: no


Also

Code: Select all
# hwclock --debug 
hwclock from util-linux 2.31
System Time: 1509807955.224164
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1509807734 seconds after 1969
Last calibration done at 1509807734 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
hwclock: ioctl(3, RTC_UIE_ON, 0) to /dev/rtc0 failed: Invalid argument
...synchronization failed


So I wonder if there was a regression with the hwclock command in the package util-linux?
mcloaked
 
Posts: 26
Joined: Thu Oct 16, 2014 4:16 pm

Re: hwclock - possible problem after update

Postby pcermak » Mon Nov 06, 2017 9:53 am

Same problem on my RPi after upgrade.

Code: Select all
[root@alarmpi ~]# hwclock  --debug
hwclock from util-linux 2.31
System Time: 1509961898.067116
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1509220014 seconds after 1969
Last calibration done at 1509220014 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
hwclock: ioctl(3, RTC_UIE_ON, 0) to /dev/rtc0 failed: Invalid argument
...synchronization failed


But device seems to work ok, because direct read over i2c work.

Code: Select all
[root@alarmpi ~]# i2cdump -y -f -r 0-6 0 0x6f c
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 81 52 09 2a 06 11 17                               ?R?*???         


And: "hwclock -w" seems to wok too.
pcermak
 
Posts: 1
Joined: Mon Nov 06, 2017 9:49 am

Re: hwclock - possible problem after update

Postby mcloaked » Tue Nov 07, 2017 5:33 pm

Yes I found the same, that writing the RTC from the system clock with hwclock does work for my two machines also. I didn't find any other reports that would indicate that anyone is working on a fix for this issue though.
mcloaked
 
Posts: 26
Joined: Thu Oct 16, 2014 4:16 pm

Re: hwclock - possible problem after update

Postby blacxun » Fri Nov 17, 2017 9:51 am

Hello to all,
I'm facing this problem too, both at PI2 as PI3. On a NanoPi Neo not! The Problem can be solved by enabling the CONFIG_RTC_INTF_DEV_UIE_EMUL option in the kernel. It's only a workaround! I don't know whether it's kernel related or hwclock. Earlier versions did work.
blacxun
 
Posts: 1
Joined: Fri Apr 17, 2015 7:19 am

Re: hwclock - possible problem after update

Postby es30 » Tue Nov 21, 2017 10:05 pm

I have raised the issue here.

UPDATE:
Expect a fix in util-linux 2.31.1.
es30
 
Posts: 1
Joined: Tue Nov 21, 2017 9:51 pm


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests