Thinkpad在linux(ubuntu)下修改電池充電閾值,成功解決Thinkpad在Linux下的電池充電問題

來源:互聯網
上載者:User
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_minutesTo cancel charging preventation:# echo 0 > /sys/devices/platform/smapi/BAT0/inhibit_charge_minutesTo force battery discharging (even if connected to AC):# echo 1 > /sys/devices/platform/smapi/BAT0/force_dischargeTo 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 Thinkpaddevices/platform/smapi/BAT0/start_charge_thresh = 50devices/platform/smapi/BAT0/stop_charge_thresh = 80EOFThe 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_connectedThe 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
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.