# 电池电量监视器手册

电池电量监视器显示了电池目前充电的状态，并且在电量低于某一界限时给予提示。

2015
MATE Documentation Project
2005
Davyd Madeley
2004
Angela Boyle
2004
Sun Microsystems
2002
Trevor Curtis
1999
2000
Jorgen Pehrson
MATE 文档项目
GNOME Documentation Project

对于本文档的复制、分发和／或修改必须遵循自由软件基金会 (Free Software Foundation) 发布的 GNU 自由文档许可证 (GFDL) 版本 1.1 或更高版本，该许可证没有固定的部分、没有封面和背页文本。您可以在此链接上或在随本手册一起分发的 COPYING-DOCS 文件中找到 GFDL 的副本。

本手册是在 GFDL 许可之下分发的 MATE 手册集合的一部分。如果想要单独分发此手册，可以在手册中添加该许可证的一份副本然后分发，如该许可证的第 6 部分所述。

各个公司使用的许多用于区别它们产品和服务的名称都声明为商标。在所有的 MATE 文档以及 MATE 文档项目的成员中，这些名称都是以全大写字母或首字母大写显示，从而表明它们是商标。

DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT:

1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND

2. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

MATE Documentation Team
Sun
GNOME Documentation Team
Sun Microsystems
Trevor
Curtis
GNOME Documentation Project

     tcurtis@somaradio.ca

Jorgen
Pehrson
GNOME Documentation Project

     jp@spektr.eu.org

Angela
Boyle
GNOME Documentation Project
Davyd
Madeley
GNOME Project
Version 2.13
July 2015

MATE Documentation Team

MATE Documentation Project

Version 2.12
September 2005

Davyd Madeley

Version 2.10
March 2005

Davyd Madeley

Version 2.8
September 2004

Angela Boyle

GNOME Documentation Project

Battery Charge Monitor Applet Manual V2.2
August 2004

Sun GNOME Documentation Team

GNOME Documentation Project

Battery Charge Monitor Applet Manual V2.0
May 2002

Trevor Curtis tcurtis@somaradio.ca

Jorgen Pehrson jp@spektr.eu.org

GNOME Documentation Project

This manual describes version 1.10.2 of Battery Charge Monitor.

## 反馈

To report a bug or make a suggestion regarding the Battery Charge Monitor applet or this manual, follow the directions in the MATE Feedback Page.

## 简介

### 电池电量监视程序

The Battery Charge Monitor applet.

电池电量监视器显示了您笔记本电脑上所有电池的状态。本监视器能直观的告诉您剩余的电量、给出百分比，并且基于您当前的使用方式为您估算剩余的使用时间。

### 添加电池电量监视器到面板

添加电池电量监视器到面板，在面板上右键，然后选择添加到面板，在添加到面板对话框中选择电池电量监视器，单击添加。

电池电量监视器小程序的布局随着用于安放小程序的面板尺寸和形式的改变而改变。

### 电源管理后端

The battery monitor supports a number of power management backends. If it is available, the monitor will attempt to use the freedesktop.org upower interface. If it is unavailable or unsupported on your platform, it will fall back to the freedesktop.org HAL (Hardware Abstraction Layer). If that is also not availble, the battery monitor will attempt direct access to the power management system

不是所有从计算机销售商处得到的电源管理后端都是可用的，有些计算机销售商为特别的平台或硬件添加了额外的后端。如果对您的电池电池监视器显示信息不实，参考。

### 获得帮助

如果电池监视器不为您工作，请参考这些补充资源：

- ；

- MATE mailing lists

## 首选项

为监视器设置偏好，在面板的监视器上右键，然后选择首选项

### 电池电量监视器(右键)菜单环境

Battery Charge Monitor context menu

### 首选项对话框

Preferences Dialog

Appearance
  Compact view

    This view shows only a single graphic in the panel, either an upright battery to indicate remaining capacity or a plug to indicate your laptop is connected to an external power source.

    ### Compact view

    Compact View

    此紧缩视图是 MATE 2.12 下监视器默认视图。

  Expanded view

    The expanded view is old look from previous versions of MATE. It has the larger graphic for the battery as well as a separate graphic to indicate what state the battery is in.

    ### Expanded view

    Expanded View
  Show time/percentage

    选中这个选项将可以显示两种信息中的一个。显示剩余时间将会告诉您还有多少时间电池将完全放电或重新充满 。显示剩余百分比将会告诉您电池剩余电量的百分比。

Notifications

  - Warn when battery charge drops to

    选中此项将会在您的笔记本电量达到剩余百分比或是剩余分钟数时给予警告，提示会在您的电池剩余电量极低时出现。您可以取消提示，另外当您将笔记本插上主电源时警告会自动消失。

  - Notify when the battery is fully recharged

    Selecting this option notifies when your battery is fully recharged. If you have compiled the Battery Charge Monitor with libnotify support a non-intrusive notification will popup from the monitor on the panel.

## 问题处理

由于电源管理的复杂性和大量的可用的电源管理系统之间的差异，在电池监视器中排除错误是困难的。您需要判断错误存在于电池监视器中还是您机器提供信息的错误。

下面的信息对您排除发生在您电池监视器上的问题也许是有用的。如果您发现了电池电量监视器的错误(不是因为 ACPI 报告了错误的消息)，请将之报告。

### 确定后端

If you are using the upower interface, or the Hardware Abstraction Layer (see ) then that will be indicated in the about dialog by placing a star next to the author of the HAL backend.

#### Check you're using the HAL backend

Expanded View

正在使用的其它后端现在还没有给出指明，因此您不得不跟据您的硬件去猜测一下了。大多数的个人笔记本电脑使用 ACPI 作为后端。也有有着大量矛盾存在的后端。

### 检查 ACPI 信息

如果您正在使用 ACPI 作为电池电量监视器的后端，确认 ACPI 给了您正确的信息是很重要的。如果没有，您需要查看您 DSDT 的升级或者与 ACPI 有关联的某事物。

#### ACPI 输出实例

    [rupert@laptop ~]$ cat /proc/acpi/battery/BAT1/info
    present:                 yes
    design capacity:         41040 mWh
    last full capacity:      37044 mWh
    battery technology:      rechargeable
    design voltage:          10800 mV
    design capacity warning: 745 mWh
    design capacity low:     0 mWh
    capacity granularity 1:  10 mWh
    capacity granularity 2:  10 mWh
    model number:            G71C00056110
    serial number:           0000000008
    battery type:            Li-ION
    OEM info:
    [rupert@laptop ~]$ cat /proc/acpi/battery/BAT1/state
    present:                 yes
    capacity state:          ok
    charging state:          discharging
    present rate:            11232 mW
    remaining capacity:      27140 mWh
    present voltage:         11400 mV
    [rupert@laptop ~]$

用remaining capacity(剩余电量)除以last full capacity(上次充满电量)您可以快速的计算出剩余百分比，用remaining capacity除以present rate(当前功率)您可以快速计算出剩余使用时间。

### 硬件抽象层

You can check that your battery is detected by HAL using the command `hal-device-manager`. If your battery is not detected by HAL or the wrong information is being reported, you can attempt to disable the HAL backend by setting a GSettings key.

在首选项菜单中系统工具下选择配置编辑器。搜索键值OAFIID:MATE_BattstatApplet，它应该在`/apps/panel/applets`下。

假设路径为`/apps/panel/applets/applet_1`。在`/apps/panel/applets/applet_1/prefs`中添加一个新键(New Key...)取名no_hal设置为布尔型(boolean)变量,其值为真(true)。这样会使 HAL 的使用失效(参照了解如何检查此事)。