2.6.26-sabayon kernel cannot access hardware clock [Solved]

Anything that pertains to Portage

Moderator: Moderators

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

2.6.26-sabayon kernel cannot access hardware clock [Solved]

Post by Fitzcarraldo » Wed Aug 20, 2008 2:15

I have just built the 2.6.26 kernel for x86_64 arch by merging linux-sabayon-2.6.26 and using genkernel, and now SL cannot access my laptop's hardware clock.

The 2.6.25-sabayon-r1 kernel for x86_64 allows the hardware clock to be accessed. The 2.6.26-sabayon kernel for x86_64 does not:

----------What happens with 2.6.25-sabayon-r1 kernel----------
# hwclock
Wed 20 Aug 2008 00:49:19 BST -0.130310 seconds
# uname -a
Linux localhost 2.6.25-sabayon-r1 #1 SMP Tue Jul 1 18:25:45 BST 2008 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux
#

----------What happens with 2.6.26-sabayon kernel----------
# 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.
# hwclock --debug
hwclock from util-linux-ng 2.14
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.
# uname -a
Linux localhost 2.6.26-sabayon #1 SMP Tue Aug 19 23:21:16 BST 2008 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux
#

Needless to say, the hardware clock cannot be accessed during booting, and the system clock time cannot be written to the hardware clock during shutdown.

I've filed SL Bugzilla Bug Report No. 503 for this.
Last edited by Fitzcarraldo on Mon Aug 25, 2008 23:48, edited 1 time in total.

joost
Sagely Hen
Posts: 2675
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock

Post by joost » Wed Aug 20, 2008 8:56

Code: Select all

xbox-360 joost # hwclock
Wed 20 Aug 2008 08:59:49 AM UTC  -0.309331 seconds
xbox-360 joost # uname -a
Linux xbox-360 2.6.26-sabayon #1 SMP Sat Aug 9 12:00:55 UTC 2008 i686 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux
No problems with the .26 entropy stock kernel.
Image
My blog | Twitter

Please support Sabayon: Image

Thev00d00
Generally Awesome (tm)
Posts: 1472
Joined: Wed Feb 21, 2007 15:52
Location: United Kingdom
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock

Post by Thev00d00 » Wed Aug 20, 2008 14:43

Code: Select all

b0x v00d00 # 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.
b0x v00d00 # hwclock --debug
hwclock from util-linux-ng 2.14
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.
b0x v00d00 # uname -a
Linux b0x 2.6.26-sabayon #1 SMP Mon Jul 28 15:16:43 UTC 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux
Same here, also emerged my kernel and am on x86-64
Image
Please report Bugs on the Bugzilla, not forum
Please Adopt an Unanswered thread
Website / Blog : v00d00.net
twitter: Follow Me
G+: Circle Me

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock

Post by Fitzcarraldo » Wed Aug 20, 2008 15:23

I'm almost certain it's a bug in the config of the RTC (real time clock) in the kernel configuration file in the linux-sabayon-2.6.26 package, at least for x86_64.

There was also a problem with the RTC in the kernel configuration file in the linux-sabayon-2.6.25 package (see SL Bugzilla Report No. 411 that I filed a while back).

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock

Post by Fitzcarraldo » Sat Aug 23, 2008 2:50

Just found out that if I modprobe the rtc_cmos module then I can access the hardware clock:

Code: Select all

# modprobe rtc_cmos
# hwclock
Sat 23 Aug 2008 01:47:39 BST  -1.006770 seconds
#
So why isn't the rtc_cmos module loaded automatically after building the 2.6.26-sabayon kernel for x86_64? Apparently it was with the 2.6.25-r1 kernel as there is no trouble accessing the hardware clock at boot and shutdown with that kernel.

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock

Post by Fitzcarraldo » Mon Aug 25, 2008 23:48

OK, here's how I fixed the problem (which is due to the way linux-sabayon-2.6.26 configures the kernel).

1. Deselect Real Time Clock:

Device Drivers --->
< > Real Time Clock --->

2. Select CONFIG_RTC, CONFIG_GEN_RTC and CONFIG_GEN_RTC_X (not sure if the last of these is necessary):

Device Drivers --->
Character Devices --->
<M> Enhanced Real Time Clock Support (legacy PC RTC driver)
<M> Generic /dev/rtc emulation
[*] Extended RTC operation

wolfden
Sharecropper
Posts: 9051
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock [Solved]

Post by wolfden » Tue Aug 26, 2008 0:06

I'll pass this along to our beloved devs

Thanks for info!

:D

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock [Solved]

Post by Fitzcarraldo » Tue Aug 26, 2008 6:52

I've found another way of solving the problem. Instead of doing what I wrote in my previous post, build the rtc_cmos driver into the kernel instead of a module.

I.e. instead of the way it is in the .config file created by linux-sabayon-2.6.26:

Device Drivers --->
Real Time Clock --->
<M> PC_style 'CMOS'

do the following instead when you build the kernel:

Device Drivers --->
Real Time Clock --->
<*> PC_style 'CMOS'

chickpea
Sagely Hen
Posts: 1084
Joined: Fri Jan 05, 2007 15:08
Location: Washington, DC

Re: 2.6.26-sabayon kernel cannot access hardware clock [Solved]

Post by chickpea » Tue Sep 02, 2008 3:06

Fitz:

You are quickly becomming one of my favorite people on this earth as you consistently have the same problems I am and consistently fix them before I do. :D :lol:

The modprobe rtc-cmos worked for me too, only I recompiled the kernel and it didn't seem to help. I will post back with relevant info after I recompile my kernel again just to see if doing Real Time Clock as "M" and PC-style CMOS as "Y" makes any difference.

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8091
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: 2.6.26-sabayon kernel cannot access hardware clock [Solved]

Post by Fitzcarraldo » Sat Sep 06, 2008 20:35

:) Glad that my travails help others avoid the same. I try to post my solutions to problems to help others but also as a kind of note for myself in case I need it in future.

Let us know if you managed to sort it out on your PC too.

Post Reply