# about rtc0

## arli

error:

```
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
```

Q1: i found at /var/log/kern.log, how to fix..

and

Q2: same time halt by 'Setting System clock using the hardware clock' on boot (but ok at reset), is rtc problem too ?

here is my profile (asus f8sv notebook):

#lspci

```

00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 03)

00:01.0 PCI bridge: Intel Corporation Mobile PCI Express Root Port (rev 03)

00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)

00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)

00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)

00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)

00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)

00:1f.0 ISA bridge: Intel Corporation Mobile LPC Interface Controller (rev 03)

00:1f.1 IDE interface: Intel Corporation Mobile IDE Controller (rev 03)

00:1f.2 SATA controller: Intel Corporation Mobile SATA AHCI Controller (rev 03)

01:00.0 VGA compatible controller: nVidia Corporation Device 0407 (rev a1)

03:00.0 Network controller: Intel Corporation Device 4229 (rev 61)

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

08:03.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)

08:03.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)

08:03.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)

08:03.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)

```

#ls /dev/rt*

```
/dev/rtc
```

#uname -a

```

Linux alx-gt-nb 2.6.25-gentoo-r8-arli807 #2 SMP Sat Oct 11 15:19:48 CST 2008 i686 Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz GenuineIntel GNU/Linux

```

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

```

CONFIG_HPET_EMULATE_RTC=y

CONFIG_RTC=y

# CONFIG_HPET_RTC_IRQ is not set

CONFIG_SND_RTCTIMER=m

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

CONFIG_RTC_LIB=y

CONFIG_RTC_CLASS=y

# Conflicting RTC option has been selected, check GEN_RTC and RTC

CONFIG_RTC_HCTOSYS=y

CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

# CONFIG_RTC_DEBUG is not set

# 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

# SPI RTC drivers

# CONFIG_RTC_DRV_MAX6902 is not set

# CONFIG_RTC_DRV_R9701 is not set

# CONFIG_RTC_DRV_RS5C348 is not set

# 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

```

thank 4 u help.. 

ps:

can't disable "Enhanced Real Time Clock Support" because used by "Symmetric multi-processing support"

update: cancel Solved flag

----------

## ricce_n

You should set CONFIG_RTC_DRV_CMOS to y

----------

## arli

 *ricce_n wrote:*   

> You should set CONFIG_RTC_DRV_CMOS to y

 

CONFIG_RTC_DRV_CMOS=y

but :

#grep -i rtc /var/log/kern.log

```

ACPI: RTC can wake from S4

rtc_cmos: probe of 00:03 failed with error -16

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

```

 :Sad: 

----------

## ricce_n

There seems to be two rtc systems in the kernel that conficts.

Try to disable any RTC related things you can find under 'Drivers -> Character Devices'. If you have a "Generic /dev/rtc emulation" (should be CONFIG_GEN_RTC) it is probebly what is causing the problems.

Your .config dose also contain CONFIG_HPET_EMULATE_RTC=y and CONFIG_RTC=y you may want to diable them as well if possible.

I don't have any kernel source avaiable here so I can't test and see what options blocks and where in the menu they are. I may post more info when I'm back at home ~5 p.m. (GMT+2).

----------

## arli

 *ricce_n wrote:*   

> There seems to be two rtc systems in the kernel that conficts.
> 
> Try to disable any RTC related things you can find under 'Drivers -> Character Devices'. If you have a "Generic /dev/rtc emulation" (should be CONFIG_GEN_RTC) it is probebly what is causing the problems.
> 
> Your .config dose also contain CONFIG_HPET_EMULATE_RTC=y and CONFIG_RTC=y you may want to diable them as well if possible.
> ...

 

thank u 4 u help.   :Very Happy: 

about:

CONFIG_RTC

at 

 -> Device Drivers                                                                                                          │  

  │       -> Character devices

is "Enhanced Real Time Clock Support" need by "Symmetric Multi Processing"

here from kernel document:

```

 If you run Linux on a multiprocessor machine and said Y to                                                                     │  

  │ "Symmetric Multi Processing" above, you should say Y here to read                                                              │  

  │ and set the RTC in an SMP compatible fashion. 

```

about:

CONFIG_HPET_EMULATE_RTC has selected(=y in .config) automation when CONFIG_RTC=y, or n both ... 

i can't find the `CONFIG_HPET_EMULATE_RTC` option on `make menuconfig` just can search by `/` ...

i don't know what about this ... a new time HPET so disable the rtc0 ?...

here is about HPET on kernel log:

```

ACPI: HPET 7FFAB710, 0038 (r1 A_M_I_ OEMHPET  12000707 MSFT       97)

ACPI: HPET id: 0x8086a201 base: 0xfed00000

hpet clockevent registered

hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0

hpet0: 3 64-bit timers, 14318180 Hz

hpet_resources: 0xfed00000 is busy

```

----------

## arli

i try make all rtc modules, and modprobe each:

```

for md in `ls /lib/modules/2.6.25-gentoo-r8-arli807/kernel/drivers/rtc/`

do

   declare mdn=${md%%.*}

   echo "load $mdn"

   modprobe $mdn

done

```

only `modprobe rtc-pcf8583` after X startup can create the rtc0:

```

proc_dir_entry 'rtc' already registered

Pid: 4246, comm: modprobe Tainted: P         2.6.25-gentoo-r8-arli807 #13

 [<c01a966f>] proc_register+0xcf/0x150

 [<c01a97e5>] create_proc_entry+0x55/0x90

 [<c02a5cae>] rtc_proc_add_device+0x1e/0x40

 [<c02a4e59>] rtc_device_register+0x1d9/0x210

 [<f917563a>] pcf8583_probe+0xfa/0x130 [rtc_pcf8583]

 [<c0250001>] acpi_processor_setup_cpuidle+0x103/0x18c

 [<c02a707e>] i2c_probe_address+0x3e/0x130

 [<c02a8067>] i2c_probe+0x207/0x220

 [<f9175540>] pcf8583_probe+0x0/0x130 [rtc_pcf8583]

 [<f9175540>] pcf8583_probe+0x0/0x130 [rtc_pcf8583]

 [<c02a76e5>] i2c_register_driver+0xc5/0x120

 [<c0146250>] sys_init_module+0x140/0x1ab0

 [<c02a71c0>] i2c_master_send+0x0/0x50

 [<c0174591>] vfs_read+0xa1/0x130

 [<c0174ab1>] sys_read+0x41/0x70

 [<c0103fbe>] sysenter_past_esp+0x5f/0x85

 [<c0330000>] pci_acpi_scan_root+0x100/0x210

 =======================

pcf8583 2-0050: rtc core: registered pcf8583 as rtc0

```

but when i `modprobe rtc-pcf8583` before X startup.. no rtc0 create, and no any message at kernel.log ..

o my god ... here is xorg.conf using by xfce4.42

```

Section "ServerLayout"

    Identifier     "Layout0"

    Screen      0  "Screen0" 0 0

    InputDevice    "Keyboard0" "CoreKeyboard"

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Synaptics Touchpad"

EndSection

Section "Files"

    RgbPath         "/usr/lib/X11/rgb"

EndSection

Section "Module"

    Load           "dbe"

    Load           "extmod"

    Load           "type1"

    Load           "freetype"

    Load           "glx"

EndSection

Section "ServerFlags"

    Option         "Xinerama" "0"

EndSection

Section "InputDevice"

    # generated from data in "/etc/conf.d/gpm"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol"

    Option         "Device" "/dev/input/mice"

    Option         "Emulate3Buttons" "no"

    Option         "ZAxisMapping" "4 5"

EndSection

Section "InputDevice"

    Identifier     "Synaptics Touchpad"

    Driver         "synaptics"

    Option         "SendCoreEvents" "true"

    Option         "Device" "/dev/psaux"

    Option         "Protocol" "auto-dev"

    Option         "SHMConfig" "true"

    Option         "Touchpadoff" "1"

    Option         "PalmMinWidth" "5"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid

    Identifier     "Monitor0"

    VendorName     "Unknown"

    ModelName      "AUO"

    HorizSync       30.0 - 75.0

    VertRefresh     60.0

    Option         "DPMS"

EndSection

Section "Device"

    Identifier     "Videocard0"

    Driver         "nvidia"

    VendorName     "NVIDIA Corporation"

    BoardName      "GeForce 8600M GT"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Videocard0"

    Monitor        "Monitor0"

    DefaultDepth    24

    Option         "TwinView" "0"

    Option         "metamodes" "nvidia-auto-select +0+0"

    SubSection     "Display"

        Depth       24

    EndSubSection

EndSection

Section "Extensions"

    Option         "Composite" "Enable"

EndSection

```

i guess pcf8583 just in the my mouse or touchpad...  :Question: 

----------

