Re: 2.6.21-rc1: known regressions (v2) (part 1)

From: S.ÃaÄlar Onur
Date: Tue Feb 27 2007 - 13:45:11 EST


27 Åub 2007 Sal tarihinde, Fabio Comolli ÅunlarÄ yazmÄÅtÄ:
> Confirmed, although the problem I see is probably different from
> Ismael's one: in my case /proc/acpi/adapter/AC is present but
> kpowersave does not work (it works in 2.6.20).
>
> The only file I seem to be missing is /proc/acpi/info, but I don't
> know it is important or not.

Then these problems are not same, Äsmail's problem was an ACPI one and im sure
that solved but yours seems a userspace problem (hal checks /proc/acpi/info
and kpowersave uses hal) introduced by "/proc/acpi/info deprecated
by /sys/firmware/acpi/info" [1]. You can try untested attached patch against
hal-git tree, so i'm adding hal list into CC also.

[1] http://www.mail-archive.com/linux-acpi@xxxxxxxxxxxxxxx/msg04285.html
--
S.ÃaÄlar Onur <caglar@xxxxxxxxxxxxx>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
diff --git a/hald/linux/acpi.c b/hald/linux/acpi.c
index 30e5fdf..1714627 100644
--- a/hald/linux/acpi.c
+++ b/hald/linux/acpi.c
@@ -1055,7 +1055,7 @@ acpi_synthesize_hotplug_events (void)
HalDevice *computer;
gchar path[HAL_PATH_MAX];

- if (!g_file_test ("/proc/acpi/info", G_FILE_TEST_EXISTS))
+ if (!g_file_test ("/proc/acpi/", G_FILE_TEST_IS_DIR))
return FALSE;

if ((computer = hal_device_store_find (hald_get_gdl (), "/org/freedesktop/Hal/devices/computer")) == NULL &&
@@ -1066,8 +1066,14 @@ acpi_synthesize_hotplug_events (void)

/* Set appropriate properties on the computer object */
hal_device_property_set_string (computer, "power_management.type", "acpi");
- hal_util_set_string_elem_from_file (computer, "power_management.acpi.linux.version",
+ if (g_file_test ("/proc/acpi/info", G_FILE_TEST_EXISTS)) {
+ hal_util_set_string_elem_from_file (computer, "power_management.acpi.linux.version",
"/proc/acpi", "info", "version", 0, FALSE);
+ }
+ else {
+ hal_util_set_string_elem_from_file (computer, "power_management.acpi.linux.version",
+ "%s/firmware/acpi", sysfs_path, "info", "version", 0, FALSE);
+ }

/* collect batteries */
snprintf (path, sizeof (path), "%s/acpi/battery", get_hal_proc_path ());

Attachment: pgp00000.pgp
Description: PGP signature