ubuntu下安装tpacpi-bat 控制…

1) You can get acpi_call here:  https://github.com/mkottman/acpi_call
Extract and "cd" to that folder (in the terminal).

sudo make
sudo make install
sudo depmod -a
sudo modprobe acpi_call


(2) install acpidump

sudo apt-get install acpidump
sudo acpidump -b -t DSDT -o /tmp/dsdt.aml
这里有点不一样,上面命令执行错误
执行  sudo acpidump -b 得到很多.dat只需用到 dsdt.dat

(maybe an error: Wrong checksum... I got it but it is ok)
iasl -d dsdt.dat
~$ cat dsdt.dsl | grep \\\\_SB\.PCI.*HKEY -o | uniq\_SB.PCI0.LPC.EC.HKEY
输出为(ThinkPad-X240):\_SB.PCI0.LPC.EC.HKEY


(3) Get tpacpi-bat here:  https://github.com/teleshoes/tpacpi-bat

 git clone https://github.com/teleshoes/tpacpi-bat  tpacpi-bat

Extract and "cd" to that folder (in the terminal).
Open the tpacpi-bat file in the folder with gedit: (sudo) gedit tpacpi-bat
Change "my $aslBases = ..." to what we got in (2). I changed all of them, default, W520, L430,... all.
  sudo cp  tpacpi-bat /opt/sbin  (路径)

(4) Now you may follow the README, for example (at the tpacpi-bat folder):

sudo tpacpi-bat -v -s ST 1 50
batt1 is going to change the start threshold to 50%.

sudo tpacpi-bat -v -s ST 2 50
batt2 is going to change the start threshold to 50%.

sudo ./tpacpi-bat -v -s SP 0 90
changes the stop at 90%.


(5) Reboot.

You WON'T notice difference in the battery icon in unity-indicator. But the voltage settles down when it is charged to 90%, for example.

Let me know any mistakes I made.

(6)查看结果
    
      sudo /opt/sbin/tpacpi-bat -v -g ST 2
Call    : \_SB.PCI0.LPC.EC.HKEY.BCTG 0x2
Response: 0x332lled
50 (relative percent)

Last edited by tpmaxwell; May 24th, 2013 at  01:22 AM.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值