Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 251453 - sys-fs/udev-124-r1 doesn't load rtc-cmos
Summary: sys-fs/udev-124-r1 doesn't load rtc-cmos
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: udev maintainers
URL: http://www.gentoo.org/doc/en/handbook...
Whiteboard:
Keywords:
: 252714 253780 260804 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-18 10:33 UTC by Caleb Cushing
Modified: 2009-03-03 03:52 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,3.31 KB, text/plain)
2008-12-22 11:47 UTC, Caleb Cushing
Details
rtc-cmos.c-fixed-alias (Uppercase B) (rtc-cmos.c-fixed-alias,395 bytes, patch)
2009-01-03 06:59 UTC, Azamat H. Hackimov
Details | Diff
PNP: fix broken pnp lowercasing for acpi module aliases (driver-core-2.6.git-72638f598ec9f05a43fcb22dc1dd8dc34c43acc1.patch,1.87 KB, patch)
2009-03-03 03:52 UTC, Azamat H. Hackimov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caleb Cushing 2008-12-18 10:33:06 UTC
* Setting system clock using the hardware clock [UTC] ...
 * Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
 * Failed to set clock You will need to set the clock yourself
  [ !! ]

# lsmod | grep rtc_cmos

# hwclock
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.

# modprobe rtc_cmos

# hwclock
Thu 18 Dec 2008 10:32:25 AM EST  -0.831872 seconds

Reproducible: Always
Comment 1 Matthias Schwarzott gentoo-dev 2008-12-18 11:28:34 UTC
Why should udev-124-r1 load rtc-cmos. For this to work the kernel need to either know before that rtc-cmos is needed and export this information to sysfs.
As this is a platform device and no usb/pci one, udev cannot act based on vendor/device ids.
Comment 2 Caleb Cushing 2008-12-18 11:54:21 UTC
I'm sorry maybe it's a different services job to load the module? I'm pretty sure that I shouldn't have to statically compile it or add it to the statically probed modules. I assumed it was udev's job to determine the hardware on my system and load the correct modules.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-18 17:01:07 UTC
[URL] still points to /etc/modules.autoload.d/kernel-2.6. If indeed nothing in the kernel specifies a module is needed after boot time, then the only way to get the module loaded is by configuring the init system to do it. So can we close this bug now? :)
Comment 4 Caleb Cushing 2008-12-18 17:20:11 UTC
do what you will, if you don't think anything should be loading it. even though it really makes /etc/conf.d/clock yell.
Comment 5 Matthias Schwarzott gentoo-dev 2008-12-22 08:38:10 UTC
What kernel version do you use? Did the error occur after updating the kernel?

Please also attach output of emerge --info
Comment 6 Caleb Cushing 2008-12-22 11:47:55 UTC
Created attachment 176139 [details]
emerge --info

currently 2.6.28-rc9 but it occurred when I was using gentoo-sources 2.6.26-r4 and 2.6.27-r7.
Comment 7 Caleb Cushing 2008-12-26 13:29:42 UTC
per earlier discussion

 │ CONFIG_RTC_INTF_DEV:                                                    │
  │                                                                         │
  │ Say yes here if you want to use your RTCs using the /dev                │
  │ interfaces, which "udev" sets up as /dev/rtc0 through                   │
  │ /dev/rtcN.  You may want to set up a symbolic link so one               │
  │ of these can be accessed as /dev/rtc, which is a name                   │
  │ expected by "hwclock" and some other programs.                          │
  │                                                                         │
  │ This driver can also be built as a module. If so, the module            │
  │ will be called rtc-dev.

well according to this module it seems to be udev's job to load these.
Comment 8 Matthias Schwarzott gentoo-dev 2008-12-27 08:07:27 UTC
(In reply to comment #7)
> per earlier discussion
> 
>  │ CONFIG_RTC_INTF_DEV:                                                   
> │
>   │                                                                        
> │
>   │ Say yes here if you want to use your RTCs using the /dev               
> │
>   │ interfaces, which "udev" sets up as /dev/rtc0 through                  
> │
>   │ /dev/rtcN.  You may want to set up a symbolic link so one              
> │
"Sets up" != "udev will load it"

> 
> well according to this module it seems to be udev's job to load these.
> 
I dont see where you read that udev will load it.

Well, the conclusion of a thread on hotplug mailinglist is: The kernel exports the module alias in a different case than the rtc-cmos module.

So you can try if assing something like this in a file /etc/modprobe.d/pnp-rtc-cmos:
alias pnp:dPNP0B00 pnp:dPNP0b00 

But this bug should be fixed in the kernel, as the kernel should export the symbols to load in the same format as the symbols its modules export.

If it works we can add the alias line to the udev package.
Comment 9 Federico Ferri (RETIRED) gentoo-dev 2008-12-27 17:42:40 UTC
*** Bug 252714 has been marked as a duplicate of this bug. ***
Comment 10 Federico Ferri (RETIRED) gentoo-dev 2008-12-27 17:43:59 UTC
please check this Fedora Issue

https://fedoraproject.org/wiki/FWN/Issue118#Cannot_Access_Hardware_Clock_Via_Any_Known_Method


which is the same problem as here
Comment 11 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-28 00:04:58 UTC
Any reason you can't just modify your kernel config to build the support for rtc-cmod into the kernel instead of as a module?
Comment 12 Caleb Cushing 2008-12-28 00:09:51 UTC
I have, and that's the suggested work around, imho. the second would be static loading.
Comment 13 Federico Ferri (RETIRED) gentoo-dev 2008-12-28 18:00:29 UTC
yep, that would work also.

just ensure that the default kernel configuration will have rtc-cmos built in also ;-)

btw there is this new option in linux-2.6.28:

CONFIG_RTC_HCTOSYS:                                                                                                                                                            If you say yes here, the system time (wall clock) will be set using
the value read from a specified RTC device. This is useful to avoid
unnecessary fsck runs at boot time, and to network better.

Symbol: RTC_HCTOSYS
Prompt: Set system time from RTC on startup and resume
Defined at drivers/rtc/Kconfig:23  

Location: -> Device Drivers -> Real Time Clock (RTC_CLASS [=y]) 
Comment 14 Matthias Schwarzott gentoo-dev 2008-12-30 13:44:59 UTC
Is there anything that can be done on udev, or is this bug just open to trace the issue further on?
Comment 15 Federico Ferri (RETIRED) gentoo-dev 2008-12-30 17:05:34 UTC
unless udev can hotplug a suitable RTC driver on itself (and also /etc/init.d/clock must be started after udev), I think there is nothing else to do than building RTC_CMOS builtin into kernel and not as module
Comment 16 Azamat H. Hackimov 2009-01-03 06:52:45 UTC
(In reply to comment #8)
> Well, the conclusion of a thread on hotplug mailinglist is: The kernel exports
> the module alias in a different case than the rtc-cmos module.
> 
> So you can try if assing something like this in a file
> /etc/modprobe.d/pnp-rtc-cmos:
> alias pnp:dPNP0B00 pnp:dPNP0b00 
> 
> But this bug should be fixed in the kernel, as the kernel should export the
> symbols to load in the same format as the symbols its modules export.

I created patch against gentoo-sources-2.6.27-r7 witch fix this. For me works fine. See attach for more info.

Comment 17 Azamat H. Hackimov 2009-01-03 06:59:22 UTC
Created attachment 177193 [details, diff]
rtc-cmos.c-fixed-alias (Uppercase B)
Comment 18 Andrew Gaffney (RETIRED) gentoo-dev 2009-01-04 21:45:08 UTC
*** Bug 253780 has been marked as a duplicate of this bug. ***
Comment 19 M Murphy 2009-01-09 21:24:12 UTC
I also encountered this bug after installing the stable gentoo-sources-2.6.27-r7 kernel. I only noticed when vmware complained about being unable to open /dev/rtc.

The rtc-cmos.c-fixed-alias (Uppercase B) patch provided here fixed the problem (thank you!), and caused the rtc_cmos module to load automatically on boot.

$ uname -a
Linux kali 2.6.27-gentoo-r7 #1 SMP Tue Jan 6 11:29:53 CST 2009 x86_64 Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz GenuineIntel GNU/Linux
Comment 20 Azamat H. Hackimov 2009-01-19 17:24:49 UTC
More complex patch available on LKLM:
http://lkml.org/lkml/2009/1/18/79
Comment 21 Matthias Schwarzott gentoo-dev 2009-02-25 14:44:15 UTC
For me this thread on LKML sounds like they first need to make a decision upstream until we can do anything besides recommending to compile in rtc-cmos into the kernel.
Comment 22 Pavel D. Elkind 2009-03-02 20:04:39 UTC
*** Bug 260804 has been marked as a duplicate of this bug. ***
Comment 23 Azamat H. Hackimov 2009-03-03 03:52:18 UTC
Created attachment 183735 [details, diff]
PNP: fix broken pnp lowercasing for acpi module aliases

Kernel developers used different approach for solving this bug:

http://git.kernel.org/?p=linux/kernel/git/gregkh/driver-core-2.6.git;a=commit;h=72638f598ec9f05a43fcb22dc1dd8dc34c43acc1

Maybe this patch will work better.