linux charg修改目录,Thinkpad在linux(ubuntu)下修改电池充电阈值,成功解决Thinkpad在Linux...

linux charg修改目录,Thinkpad在linux(ubuntu)下修改电池充电阈值,成功解决Thinkpad在Linux...look this for more info http www thinkwiki org wiki Tp smapi 安装 tp smapi aptitude install tp smapi dkms modprobe tp smapi 更改充电阈值 设置开始充电阈值 如从 60 开始充电

大家好,我是讯享网,很高兴认识大家。

look this for more info: http://www.thinkwiki.org/wiki/Tp_smapi

安装tp-smapi:

# aptitude install tp-smapi-dkms

# modprobe tp_smapi

更改充电阈值:

设置开始充电阈值,如从“60%”开始充电:

# echo 60 > /sys/devices/platform/smapi/BAT0/start_charge_thresh

设置停止充电阈值,如到“100%”停止充电:

# echo 100 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh

查看充电阈值:

# cat /sys/devices/platform/smapi/BAT0/*_charge_thresh

其他:

To prevent charging for 17 minutes (regardless of thresholds):

# echo 17 > /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes

To cancel charging preventation:

# echo 0 > /sys/devices/platform/smapi/BAT0/inhibit_charge_minutes

To force battery discharging (even if connected to AC):

# echo 1 > /sys/devices/platform/smapi/BAT0/force_discharge

To cancel forced discharge:

# echo 0 > /sys/devices/platform/smapi/BAT0/force_discharge

让设置在启动时生效(只用同一块电池):

It is not necessary to create your own init.d script or modify /etc/rc.local - you just need the package sysfsutils:

# apt-get install sysfsutils

# sudo gedit /etc/sysfs.conf

把下面的放在文件 /etc/sysfs.conf后面:

# cat >> /etc/sysfs.conf << EOF

# For a LiIon battery in a Thinkpad

devices/platform/smapi/BAT0/start_charge_thresh = 50

devices/platform/smapi/BAT0/stop_charge_thresh = 80

EOF


讯享网

The init script supplied by sysfsutils will load these settings on each boot.

其他电池状态信息:

To view extended battery status such as charging state, voltage, current, capacity, cycle count and model information:

# cat /sys/devices/platform/smapi/BAT0/installed

# cat /sys/devices/platform/smapi/BAT0/state       # idle/charging/discharging

# cat /sys/devices/platform/smapi/BAT0/cycle_count

# cat /sys/devices/platform/smapi/BAT0/current_now # instantaneous current

# cat /sys/devices/platform/smapi/BAT0/current_avg # last minute average

# cat /sys/devices/platform/smapi/BAT0/power_now   # instantaneous power

# cat /sys/devices/platform/smapi/BAT0/power_avg   # last minute average

# cat /sys/devices/platform/smapi/BAT0/last_full_capacity

# cat /sys/devices/platform/smapi/BAT0/remaining_percent

# cat /sys/devices/platform/smapi/BAT0/remaining_running_time

# cat /sys/devices/platform/smapi/BAT0/remaining_charging_time

# cat /sys/devices/platform/smapi/BAT0/remaining_capacity

# cat /sys/devices/platform/smapi/BAT0/design_capacity

# cat /sys/devices/platform/smapi/BAT0/voltage

# cat /sys/devices/platform/smapi/BAT0/design_voltage

# cat /sys/devices/platform/smapi/BAT0/manufacturer

# cat /sys/devices/platform/smapi/BAT0/model

# cat /sys/devices/platform/smapi/BAT0/barcoding

# cat /sys/devices/platform/smapi/BAT0/chemistry

# cat /sys/devices/platform/smapi/BAT0/serial

# cat /sys/devices/platform/smapi/BAT0/manufacture_date

# cat /sys/devices/platform/smapi/BAT0/first_use_date

# cat /sys/devices/platform/smapi/BAT0/temperature # in milli-Celsius

# cat /sys/devices/platform/smapi/ac_connected

The raw status data is also available, including some fields not listed above (in case you can figure them out):

# cat /sys/devices/platform/smapi/BAT0/dump

小讯
上一篇 2025-02-26 10:20
下一篇 2025-03-26 20:29

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/94322.html