2 Fix the last of the old wmacpi code oddities (specifically, the
3 APMInfo struct, which was a completely inappropriate name given we
4 no longer deal with APM, and because of the various code
7 I think this is probably as good as I can make it without getting
8 more feedback and the like, so I'm going to make this version
9 0.99, preliminary to either wmacpi-ng 1.0 or wmacpi 2.0 (depending
10 which direction I go with that).
12 2003 September 23 0.92
13 Fix a few more bugs, and include an option to allow the user to
14 specify how often to sample the ACPI data - some BIOSes disable
15 all interrupts while reading from the battery, which apparently
16 causes some interactivity issues. I have no idea why reading once
17 every three seconds (which is our default), but there've been some
20 Also fixed acpi-ng to properly handle the -a option.
23 Fix a problem I'm seeing with docking the app - if the window name
24 is set to "acpi" rather than "apm" it doesn't dock . . .
27 Make the time display show '--:--' instead of '00:00' when the
28 time remaining is 0 - I think this is reasonable, since it'll only
29 get into this state when the present rate value is 0. This only
30 happens when the battery is fully charged and neither discharging
31 or charging, or when the battery is completely drained. In any of
32 these states the time remaining is of very little interest, so we
33 don't lose anything. We also get to handle the (sadly, very
34 common) case where the ACPI subsystem doesn't report sane values
35 for the things we depend on.
38 Make the time display show nothing (as opposed to 00:00) when the
39 time remaining is unknown, as requested by Emma Jane Hogbin.
41 Respect the critical level specified on the command line, and add
42 a new message to differentiate between the command line critical
43 level and the critical state reported by the battery.
45 Speed up the message scrolling, so that there isn't quite such a
46 painful delay between repeats. Also, up the speed when the battery
47 is low, more when it's critical, and scroll continuously when it's
50 Finally, add support for disabling the blinking power and battery
51 glyphs from the command line, as requested by Sebastian
52 Henschel. We still blink the battery glyph when the battery
53 reports hardware critical level - I think that's worth being a bit
56 Also, added an acpi-ng manpage.
59 Properly fix the AC adapter issue - it's not much use adding the
60 infrastructure and then forgetting to fix the code that uses it.
62 Fix the time disiplay so that it doesn't try to display values
63 greater than 99:59, since the display area won't fit anything
67 Bugfixes, to handle two problems: the case where something like
68 the present rate or some such is "unknown" (reported initially by
69 Emma Jane Hogbin, and where the AC adapter is called something
70 other than "AC" (reported by Sebastian Henschel). This an 'a'
71 release because I can't test these myself . . .
74 Finally got rid of that annoying button - that space now contains
75 a 'B 1' or 'B 2' (only those two at present, since I'm too lazy to
76 fix it so that the number is generic. It should work fine for
77 anyone who doesn't have a freakish system with more than two
80 A few more code cleanups.
83 libacpi cleanups and reworking - we now handle the charging
84 battery case properly, it seems.
86 Also, some attempts to make error printing a bit cleaner; still a
87 long way to go on that, though . . .
90 Removed process_plugin_timer(), since it was doing nothing useful
94 Removed libapm.c - wmacpi-ng is specifically for ACPI, with no APM
98 Some more code cleanups, designed to move libacpi to more of a
99 library than something built into wmacpi-ng. This is useful with
100 the seperate programs, though at present it's not used much.
103 Added a command line tool, acpi-ng to query battery status from
107 Implemented multiple battery support, and averaging of the samples
108 in an attempt to even out the jumpiness of the timer.
111 More major code cleanups: in particular the handling of the power
112 panel and the message has been cleaned up so that it's actually
115 Next step from here is to actually implement handling of multiple
116 batteries, so that if there's a fully charge second battery
117 available it reports the correct time remaining (based on the
118 present rate of power consumption and the sum of the two battery's
119 remaining capacities).
122 Some major reworking of the internals, to help fix the handling of
123 multiple batteries and such things.
126 Code cleanups to fix various problems with corner cases.
129 Added support for multiple batteries: I took the simple route of
130 displaying only one battery per instance - to do more I'd need to
131 hack with the display code, and I'm not ready for that yet.
133 Added a -m option to specify the battery number to monitor.
136 Changed package completely, to support the new ACPI code as of
139 Since this code hasn't been touched in more than a year, I figure
140 I might as well have a go at hacking on it . . .
142 -- Simon Fowler, <simon@dreamcraft.com.au>
145 Updated ACPI statistics gathering code for the latest ACPI patch from
146 Intel. Now uses/checks for subsystem version 20020214+. Redone the version
150 Little fix to ACPI version check so that I don't have to make a new
151 version each time a new kernel comes out
154 Split ACPI and APM portions in different source files
155 Added power_init() function - handles checking subsystem presence,
156 version, etc. Enumerates batteries in ACPI implementation
157 ACPI: Beginnings of multiple battery support - not fully implemented
158 ACPI: Get the battery ID from /proc/acpi/battery instead of hard-coding
159 it in - also helps with multi battery stuff
160 Added some stupid command line help
161 Added -c option to set critical battery alarm level. Defaults to
162 10 percent, and added -b option to make noise when this critical level
164 APM: Updated for critical alarm stuff
165 Made a 20 color "low" quality pixmap for machines running 8bit displays
166 Updated README with some stuff, made separate INSTALL file
169 Update for intel ACPI release version 20010313
170 Minor updates for new /proc layout
173 Update for intel ACPI release verion 20010302
174 Proc format changed a little bit, so updates were necessary.
175 Added a check for specific acpi subsystem version - since each
176 new version seems to have a new interface, better be safe than
178 As usual, please test and report to me.
180 This ONLY works with linux acpica 20010302. Download this version from
181 http://developer.intel.com/technology/iapc/acpi/downloads.htm - it's a
185 Finally read through the ACPI specification. Hah, they had all my
186 questions answered :) Thus,
188 Confirmed remaining percentage formula (correct)
190 Now calculate "time remaining" according to the spec formula
192 Removed "battery load" hack since we now have "time remaining"
194 Fixed bug in display_percentage (10% didn't display right)
196 Released version 1.21
199 Added support for ACPI. This is very untested, and not very clean.
200 This has been tested on machines with only ONE battery, and only
201 with kernel 2.4.2 (that's where ACPI started to work for me)
203 Added some hackery to do with ACPI. Check README.
208 Fixed all the stuff so that wmapm works as advertised:
209 Fixed dumb bug where after charging was done new message didn't scroll.
211 Added support for fucked APM bioses that display stuff wrong. (See
212 README to learn how to enable it. Obviously, it's disabled by default)
214 Reorganized apminfo structure and got rid of redundancy.
216 Reorganized acquire_apm_info. All APM data is processed there.
218 Fixed display_state to do the Right Thing.
220 Fixed red blinking button to actually blink on critical battery, and
221 to stop when it isn't critical anymore. I don't think it ever worked