tpacpi-bat

ThinkPad ACPI Battery Util

  • 所有者: teleshoes/tpacpi-bat
  • 平台:
  • 许可证: GNU General Public License v3.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Flattr Button

tpacpi-bat - ThinkPad ACPI Battery Util

Exposes ACPI interface for battery controls.

  • force discharge
  • inhibit charge
  • start charge threshold
  • stop charge threshold

This project is licensed under the GPLv3. See COPYING for details.

Copyright 2011-2016 Elliot Wolk

Installation

  • install.pl installs acpi_call from git and copies tpacpi-bat to /usr/bin
  • acpi_call is required (https://github.com/teleshoes/acpi_call.git)
  • tpacpi-bat has no other requirements besides perl; put it where you like

Startup systemd service

  • Edit desired thresholds in examples/tpacpi.conf.d
  • Copy examples/tpacpi.service to systemd unit dir (/usr/lib/systemd/system)
  • Copy tpacpi.conf.d to /etc/conf.d/tpacpi

Supported Hardware

There is an unofficial, community-maintained list of supported ThinkPads here:
Supported Hardware

Usage

Usage:
  Show this message:
    tpacpi-bat [-h, --help]

  Get charge thresholds / inhibit charge / force discharge:
    tpacpi-bat [-v] -g ST <bat{1,2}>
    tpacpi-bat [-v] -g SP <bat{1,2}>
    tpacpi-bat [-v] -g IC <bat{1,2,0}>
    tpacpi-bat [-v] -g FD <bat{1,2}>

  Set charge thresholds / inhibit charge / force discharge:
    tpacpi-bat [-v] -s ST <bat{1,2,0}> <percent{0,1-99}>
    tpacpi-bat [-v] -s SP <bat{1,2,0}> <percent{0,1-99}>
    tpacpi-bat [-v] -s IC <bat{1,2,0}> <inhibit{1,0}> [<min{0,1-720,65535}>]
    tpacpi-bat [-v] -s FD <bat{1,2}> <discharge{1,0}> [<acbreak{1,0}>]

  Set peak shift state, which is mysterious and inhibits charge:
    tpacpi-bat [-v] -s PS <inhibit{1,0}> [<min{0,1-1440,65535}>]


  Synonyms:
    ST -> --st, --startThreshold, --start, st, startThreshold, start
    SP -> --sp, --stopThreshold, --stop, sp, stopThreshold, stop
    IC -> --ic, --inhibitCharge, --inhibit, ic, inhibitCharge, inhibit
    FD -> --fd, --forceDischarge, fd, forceDischarge
    PS -> --ps, --peakShiftState, ps, peakShiftState

  Options:
    -v           show ASL call and response
    <bat>        1 for main, 2 for secondary, 0 for either/both
    <min>        number of minutes, or 0 for never, or 65535 for forever
    <percent>    0 for default, 1-99 for percentage
    <inhibit>    1 for inhibit charge, 0 for stop inhibiting charge
    <discharge>  1 for force discharge, 0 for stop forcing discharge
    <acbreak>    1 for stop forcing when AC is detached, 0 for do not
    [] means optional: sets value to 0

主要指标

概览
名称与所有者teleshoes/tpacpi-bat
主编程语言Perl
编程语言Perl (语言数: 1)
平台
许可证GNU General Public License v3.0
所有者活动
创建于2012-12-17 20:27:01
推送于2024-01-17 05:47:07
最后一次提交2024-01-17 00:47:07
发布数8
最新版本名称v3.2 (发布于 )
第一版名称v1.0 (发布于 )
用户参与
星数448
关注者数24
派生数42
提交数124
已启用问题?
问题数82
打开的问题数1
拉请求数22
打开的拉请求数0
关闭的拉请求数8
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?