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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: pgprU1TGdtBPp.pgp
Description: PGP signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux