
wminfo README.thinkpad.wmi


The thinkpad.wmi plugin can be in one of five states:

1. Just after thinkpad.wmi was started when the machine loads the battery
   the plugin waits until the values used to calculate the remaining loading
   time will exceed zero values -- in such a situation the plugin does not
   show the time:

    +---------+
    |3%       |
    |.........|
    |CPU: 66 C|
    |GPU: 61 C|
    |FAN: 3480|
    +---------+

2. When the machine loads the battery the negative value such as -01:20 is
   the rough estimation of the remaining loading time -- that estimation
   becomes more reliable after a few minutes of the work of the plugin
   though it is not exact at any time:

    +---------+
    |50%-01:20|
    |!!!!!....|
    |CPU: 66 C|
    |GPU: 62 C|
    |FAN: 3490|
    +---------+

3. When the battery is fully loaded the zero value 00:00 informs that the
   loading is complete:

    +---------+
    |100%00:00|
    |!!!!!!!!!|
    |CPU: 65 C|
    |GPU: 61 C|
    |FAN: 3478|
    +---------+

4. When the machine drains the battery the positive value such as +02:00 is
   the estimation of the remaining draining time -- that estimation becomes
   more reliable after a few minutes of the work of the plugin though it
   is not exact at any time:

    +---------+
    |50%+02:00|
    |!!!!!....|
    |CPU: 66 C|
    |GPU: 61 C|
    |FAN: 3484|
    +---------+

5. When the battery is not attached to the machine the value --:-- informs
   that the battery is absent:

    +---------+
    |0%  --:--|
    |.........|
    |CPU: 65 C|
    |GPU: 61 C|
    |FAN: 3472|
    +---------+

                                      *
                                    *   *

The thinkpad.wmi plugin can suspend the system to RAM when the battery
percentage falls below the defined value.  To take the advantage of that
feature you have to register /usr/local/bin/suspend or /usr/bin/suspend
script in /etc/sudoers file and set Suspend variable to "on" value:

    Suspend="on"

The default value of the battery percentage causing suspend to RAM is 5% or
less.  If you prefer the other level change the value of the Low_Battery
variable:

    Low_Battery="5"

When the machine is in the suspend mode because of the low battery level you
have to plug in the power supply before you resume it.  In the other case
the thinkpad.wmi plugin will suspend the machine anew immediately after the
resume.

After the resume from the suspend thinkpad.wmi plugin sleeps for 60 seconds
in order to allow to charge the battery to at least 6% and avoid the
recurrent suspends.

                                      *
                                    *   *

The thinkpad.wmi plugin can display temperature values in Celsius or
Fahrenheit degrees.  Celsius degrees are default.  To use Fahrenheit degrees
modify the configuration section of the plugin or use the command:

    wminfo -p 'thinkpad.wmi -F' -u 5

                                      *
                                    *   *

On ThinkPad T61 and the newer ones Lenovo changed the entry for the GPU
thermal sensor.

The /proc/acpi/ibm/thermal file on ThinkPad X60s (older machine) reports the
following temperatures:

    temperatures:	51 51 -128 48 -128 -128 -128 -128 44 43 -128 -128 -128 -128 -128 -128

The same file on T61 (newer machine) reports the following temperatures:

    temperatures:	44 37 34 -128 -128 -128 -128 -128 38 39 38 -128 -128 -128 -128 -128

The fourth value in the latter case is -128 so it is not the GPU
temperature.  The GPU temperature is probably the ninth value (see:
http://www.thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T500).

If the thinkpad.wmi plugin recognizes the fourth value as equal -128 it uses
instead the ninth value.

                                      *
                                    *   *

It is possible to use the thinkpad.wmi plugin with the other laptops than
IBM/Lenovo ThinkPads.  In such a case the plugin displays the battery usage
but refuses to display the temperatures and the fan speed.  In order to get
such information some customization of the plugin is required.

