# hwclock stopped working after update? [SOLVED]

## tld

After updating yesterday (no change or update to the kernel), hwclock stopped working.  On bootup I'm getting this:

```
 * Setting hardware clock using the system clock [UTC] ...

hwclock: Cannot access the Hardware Clock via any known method.

hwclock: Use the --debug option to see the details of our search for an access method.
```

If I try to run it manually I get this:

```
hwclock --utc

hwclock: Cannot access the Hardware Clock via any known method.

hwclock: Use the --debug option to see the details of our search for an access method.

```

I'm assuming this is because of the upgrade to sys-apps/util-linux-2.26.2 from 2.25.2-r2.  Does that version require different kernel options?  If it's related to RTC here's what I've always had:

```
grep RTC /usr/src/linux-4.0.5-gentoo/.config

CONFIG_RTC_LIB=y

# CONFIG_RTC_CLASS is not set

# CONFIG_INTEL_SMARTCONNECT is not set

```

Any ideas?  Thanks.Last edited by tld on Mon Oct 12, 2015 2:07 pm; edited 1 time in total

----------

## tld

Another machine here still running the older linux utils (with the same kernel RTC settings) does this:

```
hwclock --debug

hwclock from util-linux 2.25.2

hwclock: cannot open /dev/rtc: No such file or directory

Using direct I/O instructions to ISA clock.

Last drift adjustment done at 1306064760 seconds after 1969

Last calibration done at 1304631937 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: 2015/10/12 13:36:35

Hw clock time : 2015/10/12 13:36:35 = 1444656995 seconds since 1969

Mon 12 Oct 2015 09:36:35 AM EDT  -0.781206 seconds

```

Whereas this machine (the upgraded one) gives me this:

```
hwclock --debug

hwclock from util-linux 2.26.2

hwclock: cannot open /dev/rtc: No such file or directory

No usable clock interface found.

hwclock: Cannot access the Hardware Clock via any known method.
```

Apparently that "Using direct I/O instructions to ISA clock" is no longer happening(?).

----------

## tld

Apparently hwclock no longer uses that direct ISA when RTC isn't expressly compiled into the kernel.  This is from the man page:

```
As of v2.26 it will no longer automatically use directisa when the rtc driver is unavailable; this

 was causing an unsafe condition that could allow two processes to access the Hardware Clock at  the  same  time.
```

I made this change to my /etc/conf.d/hwclock:

```
clock_args="--directisa"
```

...which is apparently needed without RTC.

Tom

----------

## khayyam

 *tld wrote:*   

> Apparently that "Using direct I/O instructions to ISA clock" is no longer happening(?).

 

tld ... try adding '--directisa'

/etc/conf.d/hwclock

```
clock_args="--directisa"
```

HTH & best ... khay

edit ... I see you've since figured this

----------

## tld

 *khayyam wrote:*   

> edit ... I see you've since figured this

 Thanks just the same!

----------

