--- orig/acpi.c 2006-03-26 11:14:51.000000000 +0200 +++ sleepd/acpi.c 2006-03-26 13:34:08.000000000 +0200 @@ -281,6 +281,16 @@ int acpi_read (int battery, apm_info *info) { char *buf, *state; + if (acpi_batt_count == 0) { + info->battery_percentage = 0; + info->battery_time = 0; + info->battery_status = BATTERY_STATUS_ABSENT; + acpi_batt_capacity[battery] = 0; + /* Where else would the power come from, eh? ;-) */ + info->ac_line_status = 1; + return 0; + } + /* Internally it's zero indexed. */ battery--; --- orig/sleepd.c 2006-03-26 11:15:22.000000000 +0200 +++ sleepd/sleepd.c 2006-03-26 13:43:27.000000000 +0200 @@ -316,7 +316,7 @@ } if (apm_exists() != 0) { - if (acpi_supported() && acpi_batt_count > 0) { + if (acpi_supported()) { use_acpi=1; } else {