Regression: No replacement for /proc/acpi/alarm due to missing rtc0

Bug #186297 reported by Martti Kuparinen
12
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Colin Ian King

Bug Description

Binary package hint: linux-source-2.6.24

I performed a clean installation of 8.04 and quickly noticed that the ACPI wakeup feature provided by /proc/acpi/alarm in Ubuntu 7.10 (with 2.6.22 kernel) is now deprecated and should be replaced by /sys/class/rtc/rtc0/wakealarm. However, I have nothing in the /sys/class/rtc directory, i.e. rtc0 was not detected.

http://www.mythtv.org/wiki/index.php/ACPI_Wakeup says this:

Warning: The wakealarm interface is incompatible with the kernel's old "Enhanced Real Time Clock Support" and "Generic /dev/rtc emulation" options. If your kernel was built with these enabled your kernel log will contain messages such as

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

The solution is to rebuild your kernel with the above two options excluded (find them under Drivers -> Character Devices) and the various RTC interfaces (found under Drivers -> Real Time Clock) included. From a .config point of view CONFIG_RTC and CONFIG_GEN_RTC must be unset and, at a minimum, RTC_INTF_SYSFS must be set.

I don't see that probe failure on my PC but I have "/build/buildd/linux-2.6.24/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)". Taking a quick look at /boot/config-2.6.24-5-generic shows that I have incorrectly(?) CONFIG_RTC set even though CONFIG_RTC_INTF_SYSFS is also set. I will try to compile my own kernel and see if rtc0 is detected when CONFIG_RTC is unset.

Revision history for this message
Martti Kuparinen (mk1970) wrote :

Linux n71 2.6.24-5-generic #1 SMP Thu Jan 24 19:29:14 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Martti Kuparinen (mk1970) wrote :
Revision history for this message
Martti Kuparinen (mk1970) wrote :
Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Martti Kuparinen (mk1970) wrote :

Due to some other problems I reinstalled my PC but this time I installed the i386 version (with 2.6.24-5-generic kernel). To my big surprise I have now /proc/acpi/alarm available...

Revision history for this message
Milan Knizek (knizek) wrote :

I can confirm this problem as well on x86_64 ubuntu 8.04 alpha 4 and be glad if it can be resolved, since there is a new hw support (asus wifi dongle, sonyerricson usb mass storage working) in kernel 2.6.24.

Revision history for this message
Colin Ian King (colin-king) wrote :

Indeed, I've checked ubuntu 8.04 alpha 4 on x86_64 and i386. There does seem to be configuration differences wrt the rtc with x86_64 and i386 kernels. Will investigate.

Changed in linux:
assignee: ubuntu-kernel-team → colin-king
status: Triaged → In Progress
Revision history for this message
Colin Ian King (colin-king) wrote :

It appears that drivers/acpi/sleep/proc.c contains the following code:

#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || !defined(CONFIG_X86)
/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
#else
#define HAVE_ACPI_LEGACY_ALARM
#endif

I believe the i386 kernel does not have CONFIG_RTC_DRV_CMOS defined, but the x86_64 version has, hence only the i386 version enables /proc/acpi/alarm.

Changed in linux:
status: In Progress → Fix Committed
Changed in linux:
status: Fix Committed → In Progress
Changed in linux:
status: In Progress → Fix Committed
Revision history for this message
Tim Gardner (timg-tpi) wrote :

commit 572f40c7d44d61dfe48302758fa92440eab81eae in the Hardy tree.
Will appear with 2.6.24-9

Changed in linux:
milestone: none → hardy-alpha-5
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.24-9.15

---------------
linux (2.6.24-9.15) hardy; urgency=low

  [Alessio Igor Bogani]

  * rt: Fix FTBS
  * rt: Updated configuration files

  [Tim Gardner]

  * SAUCE: make /dev/kmem a config option
  * SAUCE: x86: introduce /dev/mem restrictions with a config option
  * Fixed CGROUP FTBS caused by AppArmor patch.
  * Enabled CGROUP and CPUSETS for server flavor.
    - LP: #182434

  [Colin King]

  * Turn on /proc/acpi/alarm for x86_64 (amd64)
    - LP: #186297

  [Upstream Kernel Changes]

  * Ubuntu: LatencyTOP infrastructure patch

 -- Tim Gardner <email address hidden> Thu, 14 Feb 2008 13:34:55 -0700

Changed in linux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.