[Tracker] suspend on battery is broken
- From: "Michael Biebl" <mbiebl gmail com>
- To: tracker-list <tracker-list gnome org>
- Subject: [Tracker] suspend on battery is broken
- Date: Mon, 24 Sep 2007 02:44:12 +0200
While checking why suspend on battery doesn't work for me, I noticed,
that the way it currently works, is to poll a fixed set of proc file
names:
/* battery and ac power checks */
const gchar *battery_filenames[4] = {
"/proc/acpi/ac_adapter/AC/state",
"/proc/acpi/ac_adapter/AC0/state",
"/proc/acpi/ac_adapter/ADp1/state",
"/proc/acpi/ac_adapter/ACAD/state"
This approach seems to be broken imho.
First, in my case the correct path would be /proc/acpi/ac_adapter/C134/state.
I'm also sure there are other paths/ways on different platforms.
Second, we have to poll (currently every 2 secs) which defeats all the
recent achievements (like tickless kernel).
Is there a good reason, not to use hal? This would solve 1 and 2.
Cheers,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]