Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hwclock issue (seems to be at boot time)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Fri Feb 24, 2012 11:25 pm    Post subject: hwclock issue (seems to be at boot time) Reply with quote

I have done numerous searches and everyone else seems to have a different problem then I do. During boot, the clock fails to set. I can't really see the other things it says near it, as it scrolls too fast. Also, since I updated things, the screen auto-clears before bringing up the login and I can't scroll up to see what it says. My clock is off by hours. Not just a few min. It is eight hours behind. Min. are perfectly on. I have set the clock using gnome's clock settings. I have set the clock using the date command. Every time I boot, it unsets. So basic info:

During installation:

cp /usr/share/America/Los_Angeles /etc/localtime
echo "America/Los_Angeles" > /etc/timezone

Now if I run hwclock --directisa --show --debug I get:

hwclock from util-linux 2.20.1
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Other info that might be important.....I'm AMD64, using 3.1.10-r1 gentoo-sources kernel. Uhmmmmmm. IDK what else. If more info is needed, just ask.
Back to top
View user's profile Send private message
smlbstcbr
n00b
n00b


Joined: 08 Apr 2006
Posts: 51

PostPosted: Fri Feb 24, 2012 11:57 pm    Post subject: Reply with quote

Are dual booting with another operating system? (namely, Windows), if so, the contents of /etc/conf.d/hwclock should be:

Code:
clock="local"

Also, from the messages of hwclock, it looks like you have not compiled rtc support in the kernel, especially:
Code:
   [*]   Set system time from RTC on startup and resume             │ │ 
  │ │    (rtc0)  RTC used to set the system time                          │ │ 
  │ │    [ ]   RTC debug support                                          │ │ 
  │ │          *** RTC interfaces ***                                     │ │ 
  │ │    [*]   /sys/class/rtc/rtcN (sysfs)                                │ │ 
  │ │    [*]   /proc/driver/rtc (procfs for rtc0)                         │ │ 
  │ │    [*]   /dev/rtcN (character devices)                              │ │ 
  │ │    [ ]     RTC UIE emulation on dev interface 

and, this, especially, this:
Code:
 *** Platform RTC drivers ***                               │ │ 
  │ │    <M>   PC-style 'CMOS'         

I have it as a module and works, just that executing hwclock seems to fail after a while for some obscure reason.
Could you please post the results of this:?
Code:
dmesg|grep rtc
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Fri Feb 24, 2012 11:57 pm    Post subject: Reply with quote

You may be missing one or more kernel options required to get convenient access to the hardware clock. What is the output of zgrep RTC /proc/config.gz? Your clock being off by eight hours sounds correct for this type of problem, since you are in Pacific time (GMT-8). Did you previously have Windows installed on the machine?

Automatic screen clearing is new in a recent upgrade of sys-apps/util-linux, as noted in the messages generated by that ebuild. Add --noclear to the command line of the tty1 getty if you want to stop this behavior.
Back to top
View user's profile Send private message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Sat Feb 25, 2012 5:16 am    Post subject: Reply with quote

Oh yes, I forgot to mention that I am duel booting with windows. I do have it set local. I'll give you the resaults of those commands ASAP(on my iPad). I'll be back in maybe 30 mins...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sat Feb 25, 2012 5:36 am    Post subject: Reply with quote

If you dual boot Windows, then your hardware clock will be set to local time by Windows. You should adjust /etc/conf.d/hwclock to clock="local" to advise Linux that it must correct for this.
Back to top
View user's profile Send private message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Sat Feb 25, 2012 5:43 am    Post subject: Reply with quote

Okay, I did see what it say to me at boot. it says:

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.

Anyway, I don't know about the kernel, I used genkernel. I only manually configured my wireless driver because it's a staging driver, I never touched any other setting.

@smlbstcbr: dmesg | grep rtc gives me:

...Nothing, That is weird.

@Hu zgrep RTC /proc/config.gz gives me:

# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_RTC_CLASS is not set

Hmmm that seems to be a problem lol.

I would look at my current kernel configuration, but I'm not sure how... It's probably my kernel isn't it?
Back to top
View user's profile Send private message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Sat Feb 25, 2012 5:44 am    Post subject: Reply with quote

Hu wrote:
If you dual boot Windows, then your hardware clock will be set to local time by Windows. You should adjust /etc/conf.d/hwclock to clock="local" to advise Linux that it must correct for this.
It is
Back to top
View user's profile Send private message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Sat Feb 25, 2012 5:55 am    Post subject: Reply with quote

I'll just remake my kernel and make sure those options are set.
Back to top
View user's profile Send private message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Sat Feb 25, 2012 5:59 am    Post subject: Reply with quote

Okay, I just did the menuconfig and it looks like those options were not set. I am rebuilding now and will let you know.
Back to top
View user's profile Send private message
whobanil80
n00b
n00b


Joined: 04 Feb 2012
Posts: 27

PostPosted: Sat Feb 25, 2012 6:19 am    Post subject: Reply with quote

Perfect. The kernel was the problem. Problem solved thanks!
Back to top
View user's profile Send private message
smlbstcbr
n00b
n00b


Joined: 08 Apr 2006
Posts: 51

PostPosted: Sat Feb 25, 2012 6:16 pm    Post subject: Reply with quote

Now that your problem has been solved, you have to tag the thread with [SOLVED] :D
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Wed Mar 21, 2012 12:23 pm    Post subject: Reply with quote

It is interesting, that I do not have any RTC wihtin my kernel config. nevertheless hwlock works :
Code:
n22 ~ # zgrep RTC /proc/config.gz
# CONFIG_PM_TRACE_RTC is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_RTC_CLASS is not set
n22 ~ # hwclock -u; hwclock -v
Wed 21 Mar 2012 02:23:14 PM CET  -0.278044 seconds
hwclock from util-linux 2.20.1
OTOH I've
Code:
n22 ~ # zgrep HPET /proc/config.gz
CONFIG_HPET_TIMER=y
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
Back to top
View user's profile Send private message
apinsard
n00b
n00b


Joined: 24 Mar 2012
Posts: 74
Location: France

PostPosted: Wed Apr 11, 2012 7:08 pm    Post subject: Reply with quote

I have the same problem but the solution doesn't work for me.

Code:

  │ │        --- Real Time Clock                                                            │ │ 
  │ │        [*]   Set system time from RTC on startup and resume                           │ │ 
  │ │        (rtc0)  RTC used to set the system time                                        │ │ 
  │ │        [ ]   RTC debug support                                                        │ │ 
  │ │              *** RTC interfaces ***                                                   │ │ 
  │ │        [*]   /sys/class/rtc/rtcN (sysfs)                                              │ │ 
  │ │        [*]   /proc/driver/rtc (procfs for rtc0)                                       │ │ 
  │ │        [*]   /dev/rtcN (character devices)                                            │ │ 
  . .                                                                                       . .
  . .                                                                                       . .
  . .                                                                                       . .
  │ │              *** Platform RTC drivers ***                                             │ │ 
  │ │        <*>   PC-style 'CMOS'                                                          │ │ 


Code:
Coffee linux # hwclock --debug
hwclock from util-linux 2.20.1
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.


Code:
Coffee linux # zgrep RTC /proc/config.gz
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_RTC_CLASS is not set
Back to top
View user's profile Send private message
apinsard
n00b
n00b


Joined: 24 Mar 2012
Posts: 74
Location: France

PostPosted: Thu Apr 12, 2012 12:39 pm    Post subject: Reply with quote

No idea ? :|
Back to top
View user's profile Send private message
Arkhelion
Apprentice
Apprentice


Joined: 07 Sep 2010
Posts: 151
Location: France

PostPosted: Thu Apr 12, 2012 1:47 pm    Post subject: Reply with quote

apinsard, you show us a menuconfig options tree with the correct options selected, but your kernel obviously (as /proc/config.gz show us) has not been compiled with these options. I'd say you have to recompile your kernel and make sure you boot the right kernel before checking if /dev/rtcN is created.

Unless these are other options, I have nothing here to check what these CONFIG mean.
_________________
Arkhelion
Back to top
View user's profile Send private message
apinsard
n00b
n00b


Joined: 24 Mar 2012
Posts: 74
Location: France

PostPosted: Thu Apr 12, 2012 1:54 pm    Post subject: Reply with quote

I'm sure I compiled the kernel !

I did "make && make modules_install" in /usr/src/linux/

And I don't remember any error, I'll redo it just to check.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Thu Apr 12, 2012 2:01 pm    Post subject: Reply with quote

apinsard wrote:
I'm sure I compiled the kernel !

I did "make && make modules_install" in /usr/src/linux/

And I don't remember any error, I'll redo it just to check.



But did you copy the new kernel ( arch/x86_64/boot/bzImage ) into the boot directory ?
Back to top
View user's profile Send private message
apinsard
n00b
n00b


Joined: 24 Mar 2012
Posts: 74
Location: France

PostPosted: Thu Apr 12, 2012 2:15 pm    Post subject: Reply with quote

Don't think so but, I did a lot of change in my kernel since I installed gentoo last week end and I didn't need to do anything else to get things work.

What am I supposed to do ? cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-genkernel-x86_64-3.2.12-gentoo ?

Edit. That was it. I'm very skeptical, when I configured the kernel for wireless support I didn't even mount my boot partition and it worked...

Anyway, thank you.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Thu Apr 12, 2012 4:56 pm    Post subject: Reply with quote

apinsard wrote:
Don't think so but, I did a lot of change in my kernel since I installed gentoo last week end and I didn't need to do anything else to get things work.

What am I supposed to do ? cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-genkernel-x86_64-3.2.12-gentoo ?

Edit. That was it. I'm very skeptical, when I configured the kernel for wireless support I didn't even mount my boot partition and it worked...

Anyway, thank you.


If you used genkernel before (and by the name of the kernel it seems you did), it does install the kernel into the boot partition itself. make menuconfig && make , on the other hand, do not, you have to do it manually (make modules_install just installs the modules).

Since you are becoming an expert in kernel compilation, you should look how the names of the kernels to be booted are referred to in /boot/grub/grub.conf (if your bootloader is grub, not lilo or grub2) and develop some policy for naming the kernels in /boot. For example not to have 'genkernel' in the kernel name, if genkernel was not used to make this kernel. This willbe handy when you deal with more than one kernel version (at least it is prudent during the kernel upgrade to leave the previous working version available to boot with, at least temporarily)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Apr 12, 2012 6:43 pm    Post subject: Reply with quote

Code:
make && make modules_install && make install
Back to top
View user's profile Send private message
apinsard
n00b
n00b


Joined: 24 Mar 2012
Posts: 74
Location: France

PostPosted: Thu Apr 12, 2012 7:07 pm    Post subject: Reply with quote

Actually I just used genkernel to automatically configure the kernel since I didn't know which features I needed to get my system working.

On the other hand, I know which features I don't need. So I disable some drivers and else at odd times.

Thank you for your information, I will take it into account the next time I'll configure my kernel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum