The battery charging threshold of ThinkPad is modified in Linux (UBUNTU) to solve the battery charging problem of ThinkPad in Linux.

Source: Internet
Author: User
Look this for more info: paiaptitude install TP-smapi-dkms # modprobe tp_smapi change the charging threshold: Set the start charging threshold, for example, starting from "60%: # echo 60>/sys/devices/platform/smapi/bat0/start_charge_thresh: # echo 100>/sys/devices/platform/smapi/bat0/stop_charge_thresh view charging threshold: # Cat/sys/devices/platform/smapi/bat0/* _ charge_thresh others: 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 make the settings take effect at startup (only use the same battery): 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 put the following in the file/etc/sysfs. conf: # Cat>/etc/sysfs. conf <EOF # For a liion battery in a thinkpaddevices/platform/smapi/bat0/start_charge_thresh = 50 devices/platform/smapi/bat0/keys = 80 eofthe init script supplied by sysfsutils load these settings on each boot. other Battery status information: 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/quota # 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.