diff -ur gnome-applets-2.16.2/battstat/acpi-linux.c gnome-applets-2.16.2-battery/battstat/acpi-linux.c --- gnome-applets-2.16.2/battstat/acpi-linux.c 2005-07-04 15:15:17.000000000 +0100 +++ gnome-applets-2.16.2-battery/battstat/acpi-linux.c 2007-06-16 17:44:52.000000000 +0100 @@ -196,17 +196,20 @@ DIR * procdir; struct dirent * procdirentry; char buf[BUFSIZ]; + gchar *pbuf; acpiinfo->max_capacity = 0; acpiinfo->low_capacity = 0; acpiinfo->critical_capacity = 0; - hash = read_file ("/proc/acpi/info", buf, sizeof (buf)); - if (!hash) - return FALSE; - - acpi_ver = read_ulong (hash, "version"); - g_hash_table_destroy (hash); + if (g_file_get_contents ("/sys/module/acpi/parameters/acpica_version", &pbuf, NULL, NULL)) { + acpi_ver = strtoul (pbuf, NULL, 10); + g_free(pbuf); + } else if (hash = read_file ("/proc/acpi/info", buf, sizeof (buf))) { + acpi_ver = read_ulong (hash, "version"); + g_hash_table_destroy (hash); + } else + return FALSE; if (acpi_ver < (gulong)20020208) { acpiinfo->ac_state_state = "status";