After upgrading from the gentoo-sources-2.6.25-r9 to the newer stable gentoo kernel (gentoo-sources-2.6.27-r8) the following problem appeared. While executing /etc/init.d/clock at the boot time - "Failed to set clock. You will need to set the clock yourself. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method" While executing /etc/init.d/clock at the shutdown time - "Failed to sync clocks". But in fact hwclock reads the CMOS time somehow. After each booting (System time) = (CMOS time) + (2 hours) and my timezone is Europe/Minsk (GMT+2), so it seems like hwclock assumes CMOS is set to UTC and then adds a 2-hours correction. Really, my CMOS time is set to local time. Reproducible: Always Actual Results: (System time) = (CMOS time) + (2 hours) Expected Results: (System time) = (CMOS time) # hwclock --debug hwclock from util-linux-ng 2.14.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. ================================================================================ # cat /etc/conf.d/clock CLOCK="local" TIMEZONE="Europe/Minsk" CLOCK_OPTS="" CLOCK_SYSTOHC="yes" SRM="no" ARC="no" ================================================================================ # emerge --info Portage 2.1.6.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64) ================================================================= System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T5550_@_1.83GHz-with-glibc2.2.5 Timestamp of tree: Sun, 01 Mar 2009 01:45:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 2.1.6-r1 dev-lang/python: 2.5.2-r7 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.4.8 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp.linux.ee/pub/gentoo/distfiles/ http://mirror.muntinternet.net/pub/gentoo/ http://212.219.56.138/sites/www.ibiblio.org/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en ru" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 apm berkdb bzip2 cli cracklib crypt cups dbus dri fortran gdbm gnome gpm gtk hal iconv ipv6 isdnlog java jpeg kde lm_sensors midi mikmod mmx mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre perl pmu png pppd python qt3 readline reflection session spl sse sse2 ssl sysfs tcpd tiff unicode utf8 vorbis xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="i810 vesa intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
So I guess the kernel managed to access your RTC (assuming it is in UTC), but not userspace hwclock-program. If nothing else depends on rtc time being in local time, I suggest using UTC there as it simplifies stuff. Please attach your kernel config. Maybe Bug 251453 is related to this.
(In reply to comment #1) > If nothing else depends on rtc time being in > local time, I suggest using UTC there as it simplifies stuff. Unfortunately, this is not the case. But compiling the rtc_cmos into kernel (not as module) fixes the problem. I'm attaching two kernel config files. One with working and the other with not working settings. > Maybe Bug 251453 is related to this. I would even say, this bug is a duplicate of the Bug 251453.
Created attachment 183702 [details] Working config
Created attachment 183704 [details] Not working config
*** This bug has been marked as a duplicate of bug 251453 ***