# [SOLVED] I have no /dev/rtc and hwclock can't set my time

## beijingjj

This all happened quite recently, maybe when I switched to 2.6.26.  I have rtc enabled in my kernel but my time is off now by as many time zones as I am ahead of UTC.  I dual-boot Windows so I keep my bios time set to local.  This is what happens:

```
# hwclock --debug

hwclock from util-linux-ng 2.13.1.1

hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.

No usable clock interface found.

Cannot access the Hardware Clock via any known method.

```

there is no rtc in /dev

any suggestions?Last edited by beijingjj on Thu Jul 24, 2008 11:01 pm; edited 1 time in total

----------

## cassiol

hellooo

 you have enable in kernel

```

    [*]   /dev/rtcN (character devices)

```

my second opion, verify udev 

in /etc/udev/rules.d/50-udev-default.rules has that lines???

```

KERNEL=="rtc|rtc0",             MODE="0644"

KERNEL=="rtc0",                 SYMLINK+="rtc"

```

----------

## beijingjj

Here is what I have enabled in the kernel

```
# grep -i rtc /usr/src/linux/.config

CONFIG_RTC_LIB=y

CONFIG_RTC_CLASS=y

CONFIG_RTC_HCTOSYS=y

CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

CONFIG_RTC_DEBUG=y

# RTC interfaces

CONFIG_RTC_INTF_SYSFS=y

CONFIG_RTC_INTF_PROC=y

CONFIG_RTC_INTF_DEV=y

# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set

# CONFIG_RTC_DRV_TEST is not set

# I2C RTC drivers

# CONFIG_RTC_DRV_DS1307 is not set

# CONFIG_RTC_DRV_DS1374 is not set

# CONFIG_RTC_DRV_DS1672 is not set

# CONFIG_RTC_DRV_MAX6900 is not set

# CONFIG_RTC_DRV_RS5C372 is not set

# CONFIG_RTC_DRV_ISL1208 is not set

# CONFIG_RTC_DRV_X1205 is not set

# CONFIG_RTC_DRV_PCF8563 is not set

# CONFIG_RTC_DRV_PCF8583 is not set

# CONFIG_RTC_DRV_M41T80 is not set

# CONFIG_RTC_DRV_S35390A is not set

# CONFIG_RTC_DRV_FM3130 is not set

# SPI RTC drivers

# Platform RTC drivers

# CONFIG_RTC_DRV_CMOS is not set

# CONFIG_RTC_DRV_DS1511 is not set

# CONFIG_RTC_DRV_DS1553 is not set

# CONFIG_RTC_DRV_DS1742 is not set

# CONFIG_RTC_DRV_STK17TA8 is not set

# CONFIG_RTC_DRV_M48T86 is not set

# CONFIG_RTC_DRV_M48T59 is not set

# CONFIG_RTC_DRV_V3020 is not set

# on-CPU RTC drivers

```

but there is no /dev/rtc anything:

```
# ls /dev/rt*

ls: cannot access /dev/rt*: No such file or directory

```

----------

## tounet74

hello

in kernel

```
CONFIG_RTC_DRV_CMOS=y
```

for me it's working

----------

## gentoo_ram

I agree with the CONFIG_RTC_DRV_CMOS suggestion.  It looks like new functionality.  I used 'make oldconfig' initially on 2.6.26 and this was not included.  My RTC didn't work on boot.  I went back and included this option and my RTC worked again after reboot.

In the kernel help I think it talks about including support for the "BIOS clock".

----------

## beijingjj

That was it, it works now.  Thanks guys.

----------

