linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.75k stars 130 forks source link

How to disable and revert to system defaults? #48

Closed ghost closed 11 years ago

ghost commented 11 years ago

Something has gone wrong with my setup. I've removed the threshold values from /etc/default/tlp and according to tlp stat:

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]

Yet I'm plugged in and my battery has been stuck at 77% forever. How do I completely remove all of TLP's thresholds and use the system's factory defaults? Or do I just have to specify 96/100 values in /etc/default/tlp?

ghost commented 11 years ago

Ok, even after setting thresholds to 96/100 in /etc/default/tlp AND doing sudo tlp setcharge 96 100, my battery is still stuck at 77%. This may be a bug.

MK-42 commented 11 years ago

Have you tried to remove the battery and put it back into the notebook? On my hardware I have to set the thresholds again then.

CaptSaltyJack notifications@github.com schrieb:

Ok, even after setting thresholds to 96/100 in /etc/default/tlp AND doing sudo tlp setcharge 96 100, my battery is still stuck at 77%. This may be a bug.


Reply to this email directly or view it on GitHub: https://github.com/linrunner/TLP/issues/48#issuecomment-25127675

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

ghost commented 11 years ago

The battery is not removable on the S431. The best I can do is disable the internal battery via the BIOS. I can try that.

linrunner commented 11 years ago

The procedure to remove the thresholds is described in the FAQ but using tlp setcharge 96 100 works too. After that it's not a software issue anymore. Please show the output of

tlp-stat -b
ghost commented 11 years ago
--- TLP 0.4 --------------------------------------------

+++ ThinkPad Extended Battery Functions
tp-smapi   = inactive (kernel module 'tp_smapi' not installed)
tpacpi-bat = active

+++ ThinkPad Battery Status (Main)
/sys/class/power_supply/BAT0/manufacturer                   = SMP
/sys/class/power_supply/BAT0/model_name                     = 45N1139
/sys/class/power_supply/BAT0/cycle_count                    = (not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  46030 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  47310 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  19020 [mWh]
/sys/class/power_supply/BAT0/power_now                      =  12432 [mW]
/sys/class/power_supply/BAT0/status                         = Discharging

tpacpi-bat.BAT0.startThreshold                              =     75 [%]
tpacpi-bat.BAT0.stopThreshold                               =     75 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

For the record, my thresholds are set to 75/80.

linrunner commented 11 years ago

Wasn't this issue about removing the thresholds?! So please remove them in the config as described in the FAQ and show the full output of

tlp fullcharge
tlp-stat
ghost commented 11 years ago

Originally it was, but look at my second post about the battery being stuck at 77% despite having removed the threshold settings. I'll remove the thresholds and see if this problem comes up again. Here's the full output of the above:

--- TLP 0.4 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=auto
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
WOL_DISABLE=Y
SOUND_POWER_SAVE=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=0
USB_AUTOSUSPEND=1
USB_BLACKLIST_WWAN=1
RESTORE_DEVICE_STATE_ON_STARTUP=0

+++ System Info
System         = LENOVO ThinkPad S3-S431 20AXCTO1WW
BIOS           = HFET30WW (1.07 )
Release        = Ubuntu 13.04
Kernel         = 3.8.0-30-generic x86_64
/proc/cmdline  = BOOT_IMAGE=/vmlinuz-3.8.0-30-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash "acpi_osi=!Windows 2012" vt.handoff=7

+++ System Status
TLP power save = enabled
power source   = ac

+++ Processor
CPU Model      = Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = ondemand
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   774000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  1801000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies = 1801000 1800000 1700000 1600000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000 774000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = ondemand
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   774000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  1801000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies = 1801000 1800000 1700000 1600000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000 774000 [kHz]

/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor  = ondemand
/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq  =   774000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq  =  1801000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_available_frequencies = 1801000 1800000 1700000 1600000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000 774000 [kHz]

/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor  = ondemand
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq  =   774000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq  =  1801000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_available_frequencies = 1801000 1800000 1700000 1600000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000 774000 [kHz]

/sys/devices/system/cpu/cpufreq/boost                  = 1
/proc/sys/kernel/nmi_watchdog                          = 0

+++ Undervolting
PHC kernel not available.

+++ Temperatures
CPU temp               =    53 [°C]
/proc/acpi/ibm/fan     =     0 [/min]

+++ File System
/proc/sys/vm/laptop_mode               =     0
/proc/sys/vm/dirty_writeback_centisecs =  1500
/proc/sys/vm/dirty_expire_centisecs    =  1500
/proc/sys/vm/dirty_ratio               =    20
/proc/sys/vm/dirty_background_ratio    =    10
/proc/sys/fs/xfs/age_buffer_centisecs  = (not available)
/proc/sys/fs/xfs/xfssyncd_centisecs    = (not available)
/proc/sys/fs/xfs/xfsbufd_centisecs     = (not available)

+++ Storage Devices
/dev/sda:
          Model     = SAMSUNG MZ7TD128HAFV-000L1              
          Firmware  = DXT04L0Q
          APM Level = none/disabled
          Status    = active/idle
          TRIM      = supported
          scheduler = deadline

        SMART info:
            9 Power_On_Hours            =      155 [h]
          177 Wear_Leveling_Count       =       99 [%]
          178 Used_Rsvd_Blk_Cnt_Chip    =        0 
          179 Used_Rsvd_Blk_Cnt_Tot     =        0 
          190 Airflow_Temperature_Cel   =       40 [°C]
          233 Media_Wearout_Indicator   =      200 [%]

+++ SATA Aggressive Link Power Management
/sys/class/scsi_host/host0/link_power_management_policy  = max_performance
/sys/class/scsi_host/host1/link_power_management_policy  = max_performance
/sys/class/scsi_host/host2/link_power_management_policy  = max_performance
/sys/class/scsi_host/host3/link_power_management_policy  = max_performance
/sys/class/scsi_host/host4/link_power_management_policy  = max_performance
/sys/class/scsi_host/host5/link_power_management_policy  = max_performance

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = default (using bios preferences)

+++ Intel Graphics
/sys/module/i915/parameters/powersave        =  1 (enabled)
/sys/module/i915/parameters/i915_enable_rc6  = -1 (use per-chip default)
/sys/module/i915/parameters/i915_enable_fbc  = -1 (use per-chip default)
/sys/module/i915/parameters/lvds_downclock   =  0 (disabled)
/sys/module/i915/parameters/semaphores       = -1 (use per-chip default)

+++ Wireless
bluetooth = off (software)
wifi      = off (software)
wwan      = none (no device)

wlan0(iwlwifi): power management = off

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save            = 1
/sys/module/snd_hda_intel/parameters/power_save_controller = Y

+++ ThinkPad Extended Battery Functions
tp-smapi   = inactive (kernel module 'tp_smapi' not installed)
tpacpi-bat = active

+++ ThinkPad Battery Status (Main)
/sys/class/power_supply/BAT0/manufacturer                   = SMP
/sys/class/power_supply/BAT0/model_name                     = 45N1139
/sys/class/power_supply/BAT0/cycle_count                    = (not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  46030 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  47310 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  24610 [mWh]
/sys/class/power_supply/BAT0/power_now                      =  33416 [mW]
/sys/class/power_supply/BAT0/status                         = Charging

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

+++ Runtime Power Management
/sys/bus/pci/devices/0000:00:00.0/power/control = on   (0x060000 Host bridge)
/sys/bus/pci/devices/0000:00:02.0/power/control = on   (0x030000 VGA compatible controller)
/sys/bus/pci/devices/0000:00:14.0/power/control = on   (0x0c0330 USB controller)
/sys/bus/pci/devices/0000:00:16.0/power/control = on   (0x078000 Communication controller)
/sys/bus/pci/devices/0000:00:1a.0/power/control = on   (0x0c0320 USB controller)
/sys/bus/pci/devices/0000:00:1b.0/power/control = on   (0x040300 Audio device)
/sys/bus/pci/devices/0000:00:1c.0/power/control = on   (0x060400 PCI bridge)
/sys/bus/pci/devices/0000:00:1c.1/power/control = on   (0x060400 PCI bridge)
/sys/bus/pci/devices/0000:00:1c.3/power/control = on   (0x060400 PCI bridge)
/sys/bus/pci/devices/0000:00:1d.0/power/control = on   (0x0c0320 USB controller)
/sys/bus/pci/devices/0000:00:1f.0/power/control = on   (0x060100 ISA bridge)
/sys/bus/pci/devices/0000:00:1f.2/power/control = on   (0x010601 SATA controller)
/sys/bus/pci/devices/0000:00:1f.3/power/control = on   (0x0c0500 SMBus)
/sys/bus/pci/devices/0000:02:00.0/power/control = on   (0xff0000 Unassigned class [ff00])
/sys/bus/pci/devices/0000:03:00.0/power/control = on   (0x028000 Network controller)
/sys/bus/pci/devices/0000:04:00.0/power/control = on   (0x020000 Ethernet controller)

+++ USB
tlp usb autosuspend = enabled
tlp usb blacklist   = (not configured)

Bus 001 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms =  2000 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 002 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms =  2000 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 003 Device 002 ID 045e:07b1 control = on,   autosuspend_delay_ms =  2000 -- Microsoft Corp.  (usbhid)
Bus 003 Device 003 ID 0bda:5720 control = auto, autosuspend_delay_ms =  2000 -- Realtek Semiconductor Corp.  (uvcvideo)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =  2000 -- Linux Foundation 2.0 root hub (hub)
Bus 002 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =  2000 -- Linux Foundation 2.0 root hub (hub)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =  2000 -- Linux Foundation 2.0 root hub (hub)
Bus 004 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =  2000 -- Linux Foundation 3.0 root hub (hub)

+++ Suggestions
* Install tp-smapi kernel modules for ThinkPad advanced battery functions
linrunner commented 11 years ago

Unfortunately this is not the full output of both commands, i'm missing tlp fullcharge and then again tlp-stat if you don't mind.

ghost commented 11 years ago
$ sudo tlp fullcharge
Setting temporary charge thresholds for BAT0:
  stop  = 100
  start = 96
Activating...done.
linrunner commented 11 years ago

And now tlp-stat again. Please.

ghost commented 11 years ago

The output for tlp-stat is above. I ran fullcharge followed by stat, I just didn't copy/paste the fullcharge output. Do you still need the output again? The only thing that's different are temp & power levels:

--- stat1   2013-09-26 11:29:45.927120031 -0500
+++ stat2   2013-09-26 11:31:56.739114199 -0500
@@ -81,7 +81,7 @@
 PHC kernel not available.

 +++ Temperatures
-CPU temp               =    53 [°C]
+CPU temp               =    51 [°C]
 /proc/acpi/ibm/fan     =     0 [/min]

 +++ File System
@@ -151,8 +151,8 @@
 /sys/class/power_supply/BAT0/cycle_count                    = (not supported)
 /sys/class/power_supply/BAT0/energy_full_design             =  46030 [mWh]
 /sys/class/power_supply/BAT0/energy_full                    =  47310 [mWh]
-/sys/class/power_supply/BAT0/energy_now                     =  24610 [mWh]
-/sys/class/power_supply/BAT0/power_now                      =  33416 [mW]
+/sys/class/power_supply/BAT0/energy_now                     =  29460 [mWh]
+/sys/class/power_supply/BAT0/power_now                      =  38032 [mW]
 /sys/class/power_supply/BAT0/status                         = Charging

 tpacpi-bat.BAT0.startThreshold                              =     96 [%]
linrunner commented 11 years ago

Please stop discussing about what I need to support you. I just wanted to be shure that the two commands were executed in the order i gave you, so where is the problem to just provide the outputs in the requested order and complete?

In fact your last output proves that the thresholds are removed by the software:

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]

The rest is up to the hardware.

ghost commented 11 years ago

Great. Now, any insight into my previous comment:

Ok, even after setting thresholds to 96/100 in /etc/default/tlp AND doing sudo tlp setcharge 96 100, my battery is still stuck at 77%. This may be a bug.

linrunner commented 11 years ago

You battery was at 29,5 / 47,3 = 62 % and still charging at the time of your last output. So please show the output again at 77 %.

ghost commented 11 years ago

It's already at 83.9% now, and charging. It might've been a one-time fluke, hard to say. Thanks for your help.. I'll close this out and if it happens again, I'll do a full dump of tlp-stat and also see if I can replicate it.

JulianVai commented 6 years ago

/sys/class/power_supply/BAT0/cycle_count = (not supported) /sys/class/power_supply/BAT0/energy_full_design = 57200 [mWh] /sys/class/power_supply/BAT0/energy_full = 17600 [mWh] /sys/class/power_supply/BAT0/energy_now = 17600 [mWh] i just have this question is muy battery dead according to this?

Tset-Noitamotua commented 5 years ago

I landed here from a Google search cause I experience a similar issue. Machine stuck on charging at 79% for hours now. This seems to be the threshold value which I set with TLP on a previously installed OS.

image

The strange part is that I experience this although I have done a fresh installation of Ubuntu 19.10 (Eoan) on my machine (Thinkpad X1 Carbon 6th Gen) and do not have installed TLP here at all.

@linrunner is this worth a separate issue or should I just try to disable the battery temporarily via BIOS to reset it?

Tset-Noitamotua commented 5 years ago

UPDATE: disabling the battery in BIOS solved my issue.

How to temporarily disable battery in BIOS

  1. unplug power cable
  2. reboot into BIOS setup
  3. in "power settings" disable battery. Machine will power down automatically.
  4. wait a few seconds then plug in power cable

Now the battery continues to charge beyond 79% image