Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Optimizations

Linux on ThinkPads
Post Reply
Message
Author
mugenn
Posts: 4
Joined: Sat May 05, 2018 11:25 pm
Location: Mérida, México

Optimizations

#1 Post by mugenn » Sun May 13, 2018 2:40 pm

Knowing the community behind thinkpads, I imagine some people have done some optimizations to improve them software-level. I have an x230 and I'm interested in configs to improve battery life and other aspects of it, so if you have any knowledge on them please share.

Cigarguy
ThinkPadder
ThinkPadder
Posts: 1756
Joined: Thu Aug 09, 2012 3:08 pm
Location: Calgary, Alberta, Canada

Re: Optimizations

#2 Post by Cigarguy » Sun May 13, 2018 3:01 pm

I've found the biggest improvement in battery life that I can do is choice of CPU/GPU and not having too much garbage programs running on my system. For example upgrading from a T7700 to a T9500 really helps on a T61 machine. Along with choosing an Intel GPU, energy efficient SSD and more energy efficient WiFi card. These cumulative hardware efficiency upgrades do help. There's nothing one can do in software to get this hardware improvement. Having said that, having a fresh, clean and mean software install helps too.

Optimizing hardware and software for a given platform helps but doesn't beat upgrading to an architecture that is much more efficient. No matter what I do, there's no way no how I can make my X61, watt per watt, as energy efficient as my X220. The architecture of the X220 is much more efficient.

Dekks
Senior Member
Senior Member
Posts: 583
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Optimizations

#3 Post by Dekks » Tue May 15, 2018 7:14 am

mugenn wrote:
Sun May 13, 2018 2:40 pm
Knowing the community behind thinkpads, I imagine some people have done some optimizations to improve them software-level. I have an x230 and I'm interested in configs to improve battery life and other aspects of it, so if you have any knowledge on them please share.
install tlp checking how to set battery thresholds & run powertop and look at what it suggests, if you have SDD drives only then change scheduler to NOOP, investigate putting tmp files into a RAM disk tmpfs if you have plenty of RAM, consider zwap for starters.
Home - Win 10 MSi GF63 Gaming Laptop /Arch GNOME 3/X230 Tablet /X61 [Korean] - Debian 10/T60p - Ubuntu 20.10 Helix 2
Work - Win10/Thinkpad X1 Tablet Gen 2

Seweryn
Posts: 43
Joined: Tue Nov 29, 2005 10:32 am
Location: Cill Chainnigh, Eire

Re: Optimizations

#4 Post by Seweryn » Sat Sep 08, 2018 8:00 am

Dekks wrote:
Tue May 15, 2018 7:14 am
install tlp checking how to set battery thresholds & run powertop and look at what it suggests, if you have SDD drives only then change scheduler to NOOP, investigate putting tmp files into a RAM disk tmpfs if you have plenty of RAM, consider zwap for starters.
I have just started my newly installed Linux Mint on the X301. The first thing I tried was to install some sort of Power Manager, so found the TLP tool and just about managed to open it (took me a while - first time Linux user, etc.).
But... I can't set the charging thresholds, etc. - here is the response the system displays:

seweryn@Seweryn-X301:~$ sudo tlp setcharge
Error: ThinkPad battery features not available.

Am I doing it right or is there another command for this?
X301 4057V2A; Linux Mint 19 Cinnamon

skx
Sophomore Member
Posts: 242
Joined: Mon Jul 09, 2018 6:25 pm
Location: Colombia

Re: Optimizations

#5 Post by skx » Sat Sep 08, 2018 8:33 am

Seweryn wrote:
Sat Sep 08, 2018 8:00 am
Am I doing it right or is there another command for this?
follow the official TLP installation and configuration instructions:
https://linrunner.de/en/tlp/docs/tlp-li ... stallation
quite sure you didnt install tp-smapi-dkms and the right command is sudo tlp setcharge 70 90 BAT0 but this only temporary sets the thresholds, you need to add these in the config file to have it permanently set

Linux is easy, but you need the willingness to read and keep on reading, especially when you start using linux. after 1or2 years you get used to the Linux way and are up to speed to have all efficiently understood by scanning through man pages each time. enjoy hopping distros to know which one you prefer and then make a choice and stay loyal to one Linux distro... for me it was Debian, will never go back to something else :mrgreen:
ThinkPad X220: i5-2520M CPU 2.5GHz - 8GB RAM 1333 MHz - SSD 860 EVO 250GB - Debian - ME_cleaned
ThinkPad X230: i5-3320M CPU 3.3GHz - 8GB RAM 1600 MHz - SSD 860 EVO 500GB - Debian - ME_cleaned

Seweryn
Posts: 43
Joined: Tue Nov 29, 2005 10:32 am
Location: Cill Chainnigh, Eire

Re: Optimizations

#6 Post by Seweryn » Sat Sep 08, 2018 9:23 am

Thank you, I will try that when I get a moment.

I also found another annoying problem, but hopefully easy to sort out.

When I close the lid and open it (or when the screen goes blank when inactive) the screen remains black no matter what I do. The computer needs a hard restart to get the screen going again :(. When I installed the system I set the power settings for "do nothing" when the lid is closed as I would always have it that way regardless of the system...

Any help would be appreciated.
X301 4057V2A; Linux Mint 19 Cinnamon

Dekks
Senior Member
Senior Member
Posts: 583
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Optimizations

#7 Post by Dekks » Sat Sep 08, 2018 9:33 am

Seweryn wrote:
Sat Sep 08, 2018 9:23 am
Thank you, I will try that when I get a moment.

I also found another annoying problem, but hopefully easy to sort out.

When I close the lid and open it (or when the screen goes blank when inactive) the screen remains black no matter what I do. The computer needs a hard restart to get the screen going again :(. When I installed the system I set the power settings for "do nothing" when the lid is closed as I would always have it that way regardless of the system...

Any help would be appreciated.
Which gfx driver are you using, could you pastebin the output of the pipe command "inxi -Fix > inxi.txt" - look for inxi.txt in /home and redact any ip addresses before pastenib'ing, you might have to install the inxi package.
Home - Win 10 MSi GF63 Gaming Laptop /Arch GNOME 3/X230 Tablet /X61 [Korean] - Debian 10/T60p - Ubuntu 20.10 Helix 2
Work - Win10/Thinkpad X1 Tablet Gen 2

Seweryn
Posts: 43
Joined: Tue Nov 29, 2005 10:32 am
Location: Cill Chainnigh, Eire

Re: Optimizations

#8 Post by Seweryn » Sat Sep 08, 2018 9:50 am

The full command did not display anything, however "sudo inxi -fix" displayed this:

CPU: Dual core Intel Core2 Duo U9600 (-MCP-)
arch: Penryn rev.10 cache: 3072 KB bmips: 6384
clock speeds: max: 1601 MHz 1: 1074 MHz 2: 925 MHz
CPU Flags: acpi aperfmperf apic arch_perfmon bts clflush cmov
constant_tsc cpuid cx16 cx8 de ds_cpl dtes64 dtherm dts est
flexpriority fpu fxsr ht ida lahf_lm lm mca mce mmx monitor msr
mtrr nopl nx pae pat pbe pdcm pebs pge pni pse pse36 pti sep smx ss
sse sse2 sse4_1 ssse3 syscall tm tm2 tpr_shadow tsc vme vmx vnmi
xsave xtpr
Network: Card-1: Intel 82567LM Gigabit Network Connection
driver: e1000e v: 3.2.6-k port: 1840 bus-ID: 00:19.0
IF: enp0s25 state: down mac: 00:22:68:1f:80:a7
Card-2: Intel PRO/Wireless 5100 AGN [Shiloh] Network Connection
driver: iwlwifi bus-ID: 03:00.0
IF: wls1 state: up mac: 00:26:c6:c6:a4:b0
WAN IP: 51.171.114.108
IF: wwp0s29f7u4i7 ip-v4: N/A ip-v6-link: N/A
IF: enp0s25 ip-v4: N/A ip-v6-link: N/A
IF: wls1 ip-v4: 192.168.1.2 ip-v6-link: fe80::e42f:a311:cdac:b3e7
ip-v6-temporary: 2001:bb6:1c07:cf58:7c27:44f7:5ddd:685b/64
ip-v6-global: 2001:bb6:1c07:cf58:5891:1f6c:8787:1006/64
X301 4057V2A; Linux Mint 19 Cinnamon

Dekks
Senior Member
Senior Member
Posts: 583
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Optimizations

#9 Post by Dekks » Sat Sep 08, 2018 3:51 pm

try it with a capital F as in inxi -Fix then also look at output from sudo tlp-stat
Home - Win 10 MSi GF63 Gaming Laptop /Arch GNOME 3/X230 Tablet /X61 [Korean] - Debian 10/T60p - Ubuntu 20.10 Helix 2
Work - Win10/Thinkpad X1 Tablet Gen 2

Seweryn
Posts: 43
Joined: Tue Nov 29, 2005 10:32 am
Location: Cill Chainnigh, Eire

Re: Optimizations

#10 Post by Seweryn » Sun Sep 09, 2018 2:59 am

I think I have the battery power manager sorted. Thank you (I managed to set the thresholds so I assume it works...).

Now the one big problem with closing and opening the lid is the one to get sorted. After chatting with other Linux users I was told that this version of Mint (the last one 19) is not suitable for my machine (?). I can't believe this little issue cannot be sorted, but I am open to suggestions.

And one more little thing - is there a way of having Bluetooth switched off by default on start-up rather than doing it every time after the machine starts up, as I very rarely us it? It is programmed to be on when I start the system.

And here is what the system displayed:


System: Host: Seweryn-X301 Kernel: 4.15.0-33-generic x86_64
bits: 64 gcc: 7.3.0
Desktop: Cinnamon 3.8.8 (Gtk 3.22.30-1ubuntu1)
Distro: Linux Mint 19 Tara
Machine: Device: laptop System: LENOVO product: 4057V2A v: ThinkPad X301 serial: R881THA
Mobo: LENOVO model: 4057V2A serial: VQ16B03R077
BIOS: LENOVO v: 6EET56WW (3.16 ) date: 10/26/2012
Battery BAT0: charge: 32.6 Wh 100.0% condition: 32.6/43.2 Wh (75%)
model: SANYO 42T4643 status: N/A
CPU: Dual core Intel Core2 Duo U9600 (-MCP-)
arch: Penryn rev.10 cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 ssse3 vmx) bmips: 6383
clock speeds: max: 1601 MHz 1: 1196 MHz 2: 1196 MHz
Graphics: Card: Intel Mobile 4 Series Integrated Graphics Controller
bus-ID: 00:02.0
Display Server: X.Org 1.19.6
drivers: modesetting (unloaded: fbdev,vesa)
Resolution: 1440x900@60.00hz
OpenGL: renderer: Mesa DRI Mobile Intel GM45 Express
version: 2.1 Mesa 18.0.5 Direct Render: Yes
Audio: Card Intel 82801I (ICH9 Family) HD Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.15.0-33-generic
Network: Card-1: Intel 82567LM Gigabit Network Connection
driver: e1000e v: 3.2.6-k port: 1840 bus-ID: 00:19.0
IF: enp0s25 state: down mac: 00:22:68:1f:80:a7
Card-2: Intel PRO/Wireless 5100 AGN [Shiloh] Network Connection
driver: iwlwifi bus-ID: 03:00.0
IF: wls1 state: up mac: 00:26:c6:c6:a4:b0
WAN IP: 51.171.114.108
IF: wwp0s29f7u4i7 ip-v4: N/A ip-v6-link: N/A
IF: enp0s25 ip-v4: N/A ip-v6-link: N/A
IF: wls1 ip-v4: 192.168.1.2 ip-v6-link: fe80::e42f:a311:cdac:b3e7
ip-v6-temporary: 2001:bb6:1c07:cf58:51ea:d50d:f32d:3f05/64
ip-v6-global: 2001:bb6:1c07:cf58:5891:1f6c:8787:1006/64
Drives: HDD Total Size: 250.1GB (6.4% used)
ID-1: /dev/sda model: Samsung_SSD_860 size: 250.1GB temp: 0C
Partition: ID-1: / size: 229G used: 15G (7%) fs: ext4 dev: /dev/sda1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 36.0C mobo: 35.0C
Fan Speeds (in rpm): cpu: N/A fan-1: 4935
Info: Processes: 184 Uptime: 9 min Memory: 1580.4/3841.5MB
Init: systemd runlevel: 5 Gcc sys: 7.3.0
Client: Shell (sudo) inxi: 2.3.56

--- TLP 1.1 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=AC
TLP_PERSISTENT_DEFAULT=0
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
CPU_HWP_ON_AC=balance_performance
CPU_HWP_ON_BAT=balance_power
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=power
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
AHCI_RUNTIME_PM_TIMEOUT=15
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=off
WIFI_PWR_ON_BAT=on
WOL_DISABLE=Y
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_AC=0
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
USB_AUTOSUSPEND=1
USB_BLACKLIST_BTUSB=0
USB_BLACKLIST_PHONE=0
USB_BLACKLIST_PRINTER=1
USB_BLACKLIST_WWAN=1
RESTORE_DEVICE_STATE_ON_STARTUP=0

+++ System Info
System = LENOVO ThinkPad X301 4057V2A
BIOS = 6EET56WW (3.16 )
Release = Linux Mint 19 Tara
Kernel = 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64
/proc/cmdline = BOOT_IMAGE=/boot/vmlinuz-4.15.0-33-generic root=UUID=97fc58f7-3e71-4129-98ab-861f1bdc6818 ro quiet splash vt.handoff=1
Init system = systemd v237
Boot mode = BIOS (CSM, Legacy)

+++ TLP Status
State = enabled
Last run = 08:43:01, 741 sec(s) ago
Mode = AC
Power source = AC

+++ Processor
CPU model = Intel(R) Core(TM)2 Duo CPU U9600 @ 1.60GHz

/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_available_governors = conservative ondemand userspace powersave performance schedutil
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 1601000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies = 1601000 1600000 1200000 800000 [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_available_governors = conservative ondemand userspace powersave performance schedutil
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq = 1601000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies = 1601000 1600000 1200000 800000 [kHz]

/sys/devices/system/cpu/cpufreq/boost = 1

x86_energy_perf_policy: program not installed.

/sys/module/workqueue/parameters/power_efficient = Y
/proc/sys/kernel/nmi_watchdog = 0

+++ Undervolting
PHC kernel not available.

+++ Temperatures
/proc/acpi/ibm/thermal = 39 38 38 -128 18 -128 17 -128 33 -128 40 -128 -128 -128 -128 -128 [°C]
/proc/acpi/ibm/fan = 4945 [/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

+++ Storage Devices
/dev/sda:
Model = Samsung SSD 860 EVO mSATA 250GB
Firmware = RVT41B6Q
APM Level = none/disabled
Status = active/idle
TRIM = supported
Scheduler = cfq

Runtime PM: control = on, autosuspend_delay = -1


+++ AHCI Link Power Management (ALPM)
/sys/class/scsi_host/host0/link_power_management_policy = med_power_with_dipm
/sys/class/scsi_host/host1/link_power_management_policy = med_power_with_dipm
/sys/class/scsi_host/host2/link_power_management_policy = med_power_with_dipm
/sys/class/scsi_host/host3/link_power_management_policy = med_power_with_dipm

+++ AHCI Host Controller Runtime Power Management
/sys/bus/pci/devices/0000:00:1f.2/ata1/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata2/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata3/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata4/power/control = on

+++ Docks and Device Bays
/sys/devices/platform/dock.0: ata_bay = drive present

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

+++ Intel Graphics
/sys/module/i915/parameters/enable_rc6 = 0 (disabled)
/sys/module/i915/parameters/enable_dc = -1 (use per-chip default)
/sys/module/i915/parameters/enable_fbc = 0 (disabled)
/sys/module/i915/parameters/enable_psr = -1 (use per-chip default)
/sys/module/i915/parameters/modeset = -1 (use per-chip default)
/sys/module/i915/parameters/semaphores = 0 (disabled)

+++ Wireless
bluetooth = on
wifi = on
wwan = on

hci0(btusb) : bluetooth, not connected
wls1(iwlwifi) : wifi, connected, power management = on
wwp0s29f7u4i7(cdc_ether) : wwan, not connected

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save = 0
/sys/module/snd_hda_intel/parameters/power_save_controller = N

+++ Runtime Power Management
Device blacklist = (not configured)
Driver blacklist = amdgpu nouveau nvidia radeon (default)

/sys/bus/pci/devices/0000:00:00.0/power/control = on (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:02.0/power/control = on (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:02.1/power/control = on (0x038000, Display controller, no driver)
/sys/bus/pci/devices/0000:00:03.0/power/control = on (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:03.3/power/control = on (0x070002, Serial controller, serial)
/sys/bus/pci/devices/0000:00:19.0/power/control = on (0x020000, Ethernet controller, e1000e)
/sys/bus/pci/devices/0000:00:1a.0/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1a.1/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1a.2/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1a.7/power/control = on (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1b.0/power/control = on (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1c.0/power/control = on (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.1/power/control = on (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.2/power/control = on (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1d.1/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1d.2/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1d.7/power/control = on (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1e.0/power/control = on (0x060401, PCI bridge, no driver)
/sys/bus/pci/devices/0000:00:1f.0/power/control = on (0x060100, ISA bridge, lpc_ich)
/sys/bus/pci/devices/0000:00:1f.2/power/control = on (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1f.3/power/control = on (0x0c0500, SMBus, no driver)
/sys/bus/pci/devices/0000:03:00.0/power/control = on (0x028000, Network controller, iwlwifi)
/sys/bus/pci/devices/0000:04:00.0/power/control = on (0x058000, Memory controller, no driver)

+++ USB
Autosuspend = enabled
Device whitelist = (not configured)
Device blacklist = (not configured)
Bluetooth blacklist = disabled
Phone blacklist = disabled
WWAN blacklist = enabled

Bus 002 Device 002 ID 0bdb:1900 control = on, autosuspend_delay_ms = 2000 -- Ericsson Business Mobile Networks BV F3507g Mobile Broadband Module (cdc_acm, cdc_wdm, cdc_ether)
Bus 002 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 008 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 007 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 006 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 005 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 004 Device 002 ID 0a5c:2145 control = auto, autosuspend_delay_ms = 2000 -- Broadcom Corp. BCM2045B (BDC-2.1) [Bluetooth Controller] (btusb)
Bus 004 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 003 Device 002 ID 08ff:2810 control = auto, autosuspend_delay_ms = 2000 -- AuthenTec, Inc. AES2810 (no driver)
Bus 003 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)

+++ ThinkPad Battery Features
tp-smapi = active
tpacpi-bat = inactive (unsupported hardware)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/devices/platform/smapi/BAT0/manufacturer = SANYO
/sys/devices/platform/smapi/BAT0/model = 42T4643
/sys/devices/platform/smapi/BAT0/manufacture_date = 2010-04-10
/sys/devices/platform/smapi/BAT0/first_use_date = 2012-01-03
/sys/devices/platform/smapi/BAT0/cycle_count = 26
/sys/devices/platform/smapi/BAT0/temperature = 17 [°C]
/sys/devices/platform/smapi/BAT0/design_capacity = 43200 [mWh]
/sys/devices/platform/smapi/BAT0/last_full_capacity = 32600 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_capacity = 32580 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_percent = 100 [%]
/sys/devices/platform/smapi/BAT0/remaining_running_time_now = not_discharging [min]
/sys/devices/platform/smapi/BAT0/remaining_charging_time = not_charging [min]
/sys/devices/platform/smapi/BAT0/power_now = 0 [mW]
/sys/devices/platform/smapi/BAT0/power_avg = 0 [mW]
/sys/devices/platform/smapi/BAT0/state = idle

/sys/devices/platform/smapi/BAT0/start_charge_thresh = 3 [%]
/sys/devices/platform/smapi/BAT0/stop_charge_thresh = 100 [%]
/sys/devices/platform/smapi/BAT0/force_discharge = 0

Charge = 99.9 [%]
Capacity = 75.5 [%]

+++ Suggestions
* Install smartmontools for disk drive health info



Here are the stats:

--- TLP 1.1 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=AC
TLP_PERSISTENT_DEFAULT=0
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
CPU_HWP_ON_AC=balance_performance
CPU_HWP_ON_BAT=balance_power
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=power
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
AHCI_RUNTIME_PM_TIMEOUT=15
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=off
WIFI_PWR_ON_BAT=on
WOL_DISABLE=Y
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_AC=0
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
USB_AUTOSUSPEND=1
USB_BLACKLIST_BTUSB=0
USB_BLACKLIST_PHONE=0
USB_BLACKLIST_PRINTER=1
USB_BLACKLIST_WWAN=1
RESTORE_DEVICE_STATE_ON_STARTUP=0

+++ System Info
System = LENOVO ThinkPad X301 4057V2A
BIOS = 6EET56WW (3.16 )
Release = Linux Mint 19 Tara
Kernel = 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64
/proc/cmdline = BOOT_IMAGE=/boot/vmlinuz-4.15.0-33-generic root=UUID=97fc58f7-3e71-4129-98ab-861f1bdc6818 ro quiet splash vt.handoff=1
Init system = systemd v237
Boot mode = BIOS (CSM, Legacy)

+++ TLP Status
State = enabled
Last run = 08:43:01, 741 sec(s) ago
Mode = AC
Power source = AC

+++ Processor
CPU model = Intel(R) Core(TM)2 Duo CPU U9600 @ 1.60GHz

/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_available_governors = conservative ondemand userspace powersave performance schedutil
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 1601000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies = 1601000 1600000 1200000 800000 [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_available_governors = conservative ondemand userspace powersave performance schedutil
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq = 800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq = 1601000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies = 1601000 1600000 1200000 800000 [kHz]

/sys/devices/system/cpu/cpufreq/boost = 1

x86_energy_perf_policy: program not installed.

/sys/module/workqueue/parameters/power_efficient = Y
/proc/sys/kernel/nmi_watchdog = 0

+++ Undervolting
PHC kernel not available.

+++ Temperatures
/proc/acpi/ibm/thermal = 39 38 38 -128 18 -128 17 -128 33 -128 40 -128 -128 -128 -128 -128 [°C]
/proc/acpi/ibm/fan = 4945 [/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

+++ Storage Devices
/dev/sda:
Model = Samsung SSD 860 EVO mSATA 250GB
Firmware = RVT41B6Q
APM Level = none/disabled
Status = active/idle
TRIM = supported
Scheduler = cfq

Runtime PM: control = on, autosuspend_delay = -1


+++ AHCI Link Power Management (ALPM)
/sys/class/scsi_host/host0/link_power_management_policy = med_power_with_dipm
/sys/class/scsi_host/host1/link_power_management_policy = med_power_with_dipm
/sys/class/scsi_host/host2/link_power_management_policy = med_power_with_dipm
/sys/class/scsi_host/host3/link_power_management_policy = med_power_with_dipm

+++ AHCI Host Controller Runtime Power Management
/sys/bus/pci/devices/0000:00:1f.2/ata1/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata2/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata3/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata4/power/control = on

+++ Docks and Device Bays
/sys/devices/platform/dock.0: ata_bay = drive present

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

+++ Intel Graphics
/sys/module/i915/parameters/enable_rc6 = 0 (disabled)
/sys/module/i915/parameters/enable_dc = -1 (use per-chip default)
/sys/module/i915/parameters/enable_fbc = 0 (disabled)
/sys/module/i915/parameters/enable_psr = -1 (use per-chip default)
/sys/module/i915/parameters/modeset = -1 (use per-chip default)
/sys/module/i915/parameters/semaphores = 0 (disabled)

+++ Wireless
bluetooth = on
wifi = on
wwan = on

hci0(btusb) : bluetooth, not connected
wls1(iwlwifi) : wifi, connected, power management = on
wwp0s29f7u4i7(cdc_ether) : wwan, not connected

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save = 0
/sys/module/snd_hda_intel/parameters/power_save_controller = N

+++ Runtime Power Management
Device blacklist = (not configured)
Driver blacklist = amdgpu nouveau nvidia radeon (default)

/sys/bus/pci/devices/0000:00:00.0/power/control = on (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:02.0/power/control = on (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:02.1/power/control = on (0x038000, Display controller, no driver)
/sys/bus/pci/devices/0000:00:03.0/power/control = on (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:03.3/power/control = on (0x070002, Serial controller, serial)
/sys/bus/pci/devices/0000:00:19.0/power/control = on (0x020000, Ethernet controller, e1000e)
/sys/bus/pci/devices/0000:00:1a.0/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1a.1/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1a.2/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1a.7/power/control = on (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1b.0/power/control = on (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1c.0/power/control = on (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.1/power/control = on (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.2/power/control = on (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1d.1/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1d.2/power/control = on (0x0c0300, USB controller, uhci_hcd)
/sys/bus/pci/devices/0000:00:1d.7/power/control = on (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1e.0/power/control = on (0x060401, PCI bridge, no driver)
/sys/bus/pci/devices/0000:00:1f.0/power/control = on (0x060100, ISA bridge, lpc_ich)
/sys/bus/pci/devices/0000:00:1f.2/power/control = on (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1f.3/power/control = on (0x0c0500, SMBus, no driver)
/sys/bus/pci/devices/0000:03:00.0/power/control = on (0x028000, Network controller, iwlwifi)
/sys/bus/pci/devices/0000:04:00.0/power/control = on (0x058000, Memory controller, no driver)

+++ USB
Autosuspend = enabled
Device whitelist = (not configured)
Device blacklist = (not configured)
Bluetooth blacklist = disabled
Phone blacklist = disabled
WWAN blacklist = enabled

Bus 002 Device 002 ID 0bdb:1900 control = on, autosuspend_delay_ms = 2000 -- Ericsson Business Mobile Networks BV F3507g Mobile Broadband Module (cdc_acm, cdc_wdm, cdc_ether)
Bus 002 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 008 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 007 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 006 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 005 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 004 Device 002 ID 0a5c:2145 control = auto, autosuspend_delay_ms = 2000 -- Broadcom Corp. BCM2045B (BDC-2.1) [Bluetooth Controller] (btusb)
Bus 004 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)
Bus 003 Device 002 ID 08ff:2810 control = auto, autosuspend_delay_ms = 2000 -- AuthenTec, Inc. AES2810 (no driver)
Bus 003 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 1.1 root hub (hub)

+++ ThinkPad Battery Features
tp-smapi = active
tpacpi-bat = inactive (unsupported hardware)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/devices/platform/smapi/BAT0/manufacturer = SANYO
/sys/devices/platform/smapi/BAT0/model = 42T4643
/sys/devices/platform/smapi/BAT0/manufacture_date = 2010-04-10
/sys/devices/platform/smapi/BAT0/first_use_date = 2012-01-03
/sys/devices/platform/smapi/BAT0/cycle_count = 26
/sys/devices/platform/smapi/BAT0/temperature = 17 [°C]
/sys/devices/platform/smapi/BAT0/design_capacity = 43200 [mWh]
/sys/devices/platform/smapi/BAT0/last_full_capacity = 32600 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_capacity = 32580 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_percent = 100 [%]
/sys/devices/platform/smapi/BAT0/remaining_running_time_now = not_discharging [min]
/sys/devices/platform/smapi/BAT0/remaining_charging_time = not_charging [min]
/sys/devices/platform/smapi/BAT0/power_now = 0 [mW]
/sys/devices/platform/smapi/BAT0/power_avg = 0 [mW]
/sys/devices/platform/smapi/BAT0/state = idle

/sys/devices/platform/smapi/BAT0/start_charge_thresh = 3 [%]
/sys/devices/platform/smapi/BAT0/stop_charge_thresh = 100 [%]
/sys/devices/platform/smapi/BAT0/force_discharge = 0

Charge = 99.9 [%]
Capacity = 75.5 [%]

+++ Suggestions
* Install smartmontools for disk drive health info
X301 4057V2A; Linux Mint 19 Cinnamon

Dekks
Senior Member
Senior Member
Posts: 583
Joined: Thu Jun 26, 2014 9:38 am
Location: Birmingham, UK

Re: Optimizations

#11 Post by Dekks » Sun Sep 09, 2018 12:03 pm

Hi

Firstly looking at the last entries in the tlp_stat output i'd say the thresholds have not been set,

/sys/devices/platform/smapi/BAT0/start_charge_thresh = 3 [%] <<<<<
/sys/devices/platform/smapi/BAT0/stop_charge_thresh = 100 [%] <<<<<
/sys/devices/platform/smapi/BAT0/force_discharge = 0

try the following with sudo

echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 80 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh

you have to reapply if you remove/swap batteries.

for bluetooth disable it in BIOS might be a better option.

re Mint, Ubuntu MATE might be a better choice.
Home - Win 10 MSi GF63 Gaming Laptop /Arch GNOME 3/X230 Tablet /X61 [Korean] - Debian 10/T60p - Ubuntu 20.10 Helix 2
Work - Win10/Thinkpad X1 Tablet Gen 2

Seweryn
Posts: 43
Joined: Tue Nov 29, 2005 10:32 am
Location: Cill Chainnigh, Eire

Re: Optimizations

#12 Post by Seweryn » Wed Sep 12, 2018 4:00 pm

Thank you for the responses, I appreciate it.

I started testing Xubuntu 18.04 and noticed some advantages like the fact that the Bluetooth stays off after switching it off and system restart and the screen does not go black when I close-open the lid (although the highlight settings change though). Not sure what other (dis)advantages this system has, so I will keep testing it to see which one to stay with.
If any of you use both systems and would like to share their view that would be great :).
X301 4057V2A; Linux Mint 19 Cinnamon

Post Reply

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 36 guests