Thinkpad X200t ACPI & battery thresholds (compatibility & troubleshooting)

Hi guys,

First time poster on here, but not complete newbie.

I have looked at these forum posts, but I think I need a bit of a nudge in the right direction.

What I want to do is to set my battery charge start and stop threshold to preserve battery life (because these old ones are getting slightly hard to find, but not too bad yet). I've set it with tlpui, but it's not actually working.

I have a Thinkpad X200t (tablet). It may be that neither module supports this particular hardware, but the error message I'm getting Failed to find module 'acpi_call' doesn't make sense in that context (methink).

Right now, I've got acpi_call, but I tried tp-smapi before, and got the same error (Failed to find module).
Thanks so much in advance, and I'll try to respond ASAP for requests for clarification.

Now for the info dump:

  • systemctl:
[ram@falcon ~]$ systemctl --failed
  UNIT                         LOAD   ACTIVE SUB    DESCRIPTION                                                                        
● systemd-modules-load.service loaded failed failed Load Kernel Modules                                                                

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive unit

[ram@falcon ~]$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2019-02-02 20:42:49 CST; 59min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 433 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 433 (code=exited, status=1/FAILURE)

Feb 02 20:42:49 falcon systemd[1]: Starting Load Kernel Modules...
Feb 02 20:42:49 falcon systemd-modules-load[433]: Failed to find module 'acpi_call'
Feb 02 20:42:49 falcon systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Feb 02 20:42:49 falcon systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Feb 02 20:42:49 falcon systemd[1]: Failed to start Load Kernel Modules.
  • kernel version:
[ram@falcon ~]$ uname -r
4.19.16-1-MANJARO
  • Misc info on relevant installed packages from pacman:
[ram@falcon ~]$ pacman -Qs acpi
local/acpi 1.7-2
    Client for battery, power, and thermal readings
local/acpi_call-dkms 1.1.0-186
    A linux kernel module that enables calls to ACPI methods through /proc/acpi/call
local/acpid 2.0.31-1
    A daemon for delivering ACPI power management events with netlink support
local/tpacpi-bat 3.1-2
    A Perl script with ACPI calls for recent ThinkPads (such as T420 and W520) whose battery thresholds are not supported by tp_smapi

[ram@falcon ~]$ pacman -Qs smapi
local/tpacpi-bat 3.1-2
    A Perl script with ACPI calls for recent ThinkPads (such as T420 and W520) whose battery thresholds are not supported by tp_smapi

[ram@falcon ~]$ pacman -Qs kernel
local/acpi_call-dkms 1.1.0-186
    A linux kernel module that enables calls to ACPI methods through /proc/acpi/call
local/b43-fwcutter 019-2
    firmware extractor for the b43 kernel module
local/cpupower 4.20-2 (linux-tools)
    Linux kernel tool to examine and tune power saving related features of your processor
local/dkms 2.5-4
    Dynamic Kernel Modules System
local/iptables 1:1.8.2-1
    Linux kernel packet control tool (using legacy interface)
local/kmod 25-1
    Linux kernel module management tools and library
local/lib32-libdrm 2.4.96-1
    Userspace interface to kernel DRM services (32-bit)
local/libdrm 2.4.96-1
    Userspace interface to kernel DRM services
local/libnetfilter_conntrack 1.0.7-1
    Library providing an API to the in-kernel connection tracking state table
local/libnfnetlink 1.0.1-3
    Low-level library for netfilter related kernel/userspace communication
local/linux-api-headers 4.17.11-1
    Kernel headers sanitized for use in userspace
local/linux316 3.16.62-1
    The Linux316 kernel and modules
local/linux419 4.19.16-1
    The Linux419 kernel and modules
local/mtdev 1.1.5-2
    A stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol
local/ndctl 63-1
    Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel
  • a dump of tlp-stat:
[ram@falcon ~]$ sudo tlp-stat
[sudo] password for ram: 
--- TLP 1.1 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=BAT
TLP_PERSISTENT_DEFAULT=0
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=5
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
CPU_SCALING_GOVERNOR_ON_BAT=powersave
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="min_power"
AHCI_RUNTIME_PM_TIMEOUT=15
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
RADEON_POWER_PROFILE_ON_AC=default
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
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon pcieport"
USB_AUTOSUSPEND=0
USB_BLACKLIST_BTUSB=0
USB_BLACKLIST_PHONE=0
USB_BLACKLIST_PRINTER=1
USB_BLACKLIST_WWAN=1
RESTORE_DEVICE_STATE_ON_STARTUP=0
DEVICES_TO_ENABLE_ON_AC="wwan"
DEVICES_TO_DISABLE_ON_BAT="wwan"
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
START_CHARGE_THRESH_BAT0=40
STOP_CHARGE_THRESH_BAT0=80
RESTORE_THRESHOLDS_ON_BAT=1

+++ System Info
System         = LENOVO ThinkPad X200 Tablet 744943U
BIOS           = 7WET60WW (3.10 )
Release        = "Manjaro Linux"
Kernel         = 4.19.16-1-MANJARO #1 SMP PREEMPT Fri Jan 18 17:03:05 UTC 2019 x86_64
/proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=d0275327-3279-4fa1-b1ab-5c92b53e7264 rw quiet cryptdevice=UUID=1dcdb0de-797c-45b5-9a45-fd4cd8c03d08:luks-1dcdb0de-797c-45b5-9a45-fd4cd8c03d08 root=/dev/mapper/luks-1dcdb0de-797c-45b5-9a45-fd4cd8c03d08 resume=/dev/mapper/luks-1dcdb0de-797c-45b5-9a45-fd4cd8c03d08
Init system    = systemd 
Boot mode      = BIOS (CSM, Legacy)

+++ TLP Status
State          = enabled
Last run       = 09:33:49 PM,   1290 sec(s) ago
Mode           = AC
Power source   = AC

Notice: systemd-rfkill.service is not masked -- invoke "systemctl mask systemd-rfkill.service" to correct this!

+++ Processor
CPU model      = Intel(R) Core(TM)2 Duo CPU     L9600  @ 2.13GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = powersave performance schedutil 
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  2134000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies = 2134000 2133000 1600000 800000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors = powersave performance schedutil 
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  2134000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies = 2134000 2133000 1600000 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 = 42 48 -128 40 25 -128 25 -128 40 43 -128 -128 -128 -128 -128 -128 [°C]
/proc/acpi/ibm/fan     =  3405 [/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     = TEAML5Lite3D120G                        
  Firmware  = Q0410A  
  APM Level = none/disabled
  Status    = active/idle
  TRIM      = supported
  Scheduler = mq-deadline

  Runtime PM: control = on, autosuspend_delay = (not available)

  SMART info:
      5 Reallocated_Sector_Ct     =        0 
      9 Power_On_Hours            =      149 [h]
     12 Power_Cycle_Count         =      249 
    177 Wear_Leveling_Count       =      100 [%]
    194 Temperature_Celsius       =       35    [°C]
    232 Available_Reservd_Space   =      100 [%]
    241 Host_Writes_32MiB         =    0.109 [TB]


+++ 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: battery_bay   = no battery 
/sys/devices/platform/dock.1: ata_bay       = no drive (or powered off)
/sys/devices/platform/dock.2: dock_station  = undocked

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

+++ Intel Graphics
/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)

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

wls1(iwlwifi)                 : wifi, connected, power management = off

+++ 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 pcieport

/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: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: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, i801_smbus)
/sys/bus/pci/devices/0000:03:00.0/power/control = on   (0x028000, Network controller, iwlwifi)

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

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 08ff:2810 control = on,   autosuspend_delay_ms =  2000 -- AuthenTec, Inc. AES2810 (no driver)
Bus 004 Device 001 ID 1d6b:0001 control = auto, autosuspend_delay_ms =     0 -- Linux Foundation 1.1 root hub (hub)
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   = inactive (kernel module 'tp_smapi' not installed)
tpacpi-bat = inactive (unsupported hardware)

+++ Battery Status
/sys/class/power_supply/BAT0/manufacturer                   = SANYO
/sys/class/power_supply/BAT0/model_name                     = 92P1003
/sys/class/power_supply/BAT0/cycle_count                    = (not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  65120 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  61020 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  47770 [mWh]
/sys/class/power_supply/BAT0/power_now                      =  29019 [mW]
/sys/class/power_supply/BAT0/status                         = Charging

Charge                                                      =   78.3 [%]
Capacity                                                    =   93.7 [%]

+++ Suggestions
* Install tp-smapi kernel modules for ThinkPad battery features
* Install ethtool to disable Wake On LAN (WOL)
  • Modprobe:
[ram@falcon ~]$ modprobe acpi_call
modprobe: FATAL: Module acpi_call not found in directory /lib/modules/4.19.16-1-MANJARO

FYI: the model number of my thinkpad X200t is 7449-43U

I see that you have kernels 3.16 (why?) and 4.19 installed
And that your acpi-call package is dkms. acpi_call-dkms
[DKMS is dynamic kernel module setting and requires certain things]
So you want headers for 4.19 (and 3.16 if you are keeping it) if you are using dkms.

You could skip this dkms stuff by just installing acpi_call for your kernel like
linux419-acpi_call

But if you want to use DKMS I suggest you read about it here :
https://wiki.archlinux.org/index.php/Dynamic_Kernel_Module_Support

Cheat Codez

Install your headers (im going to assume just 419)
sudo pacman -S linux419-headers
Then you have to build the module for your current kernel using dkms
dkms autoinstall

1 Like

Thanks, dude!
It seems I installed 316 by mistake early on. I will nix it.

So, I installed the 419 headers, and ran dkms status and autoinstall. I now no longer get any systemd failures:

[ram@falcon ~]$ systemctl --failed
0 loaded units listed. Pass --all to see loaded but inactive units, too.

But I still can't seem to access the battery thresholds:

[ram@falcon ~]$ cd /sys/class/power_supply/BAT0
[ram@falcon BAT0]$ ls
alarm                   charge_stop_threshold  energy_full_design  power          status      uevent
capacity                cycle_count            energy_now          power_now      subsystem   voltage_min_design
capacity_level          device                 manufacturer        present        technology  voltage_now
charge_start_threshold  energy_full            model_name          serial_number  type
[ram@falcon BAT0]$ cat charge_start_threshold 
cat: charge_start_threshold: No such device
[ram@falcon BAT0]$ sudo echo 40 > charge_start_threshold 
bash: charge_start_threshold: Permission denied
[ram@falcon BAT0]$ sudo echo 40 > charge_stop_threshold 
bash: charge_stop_threshold: Permission denied
[ram@falcon BAT0]$ sudo tlp setcharge 40 80 BAT0
[sudo] password for ram: 
Error: ThinkPad battery features not available.

Could it be my particular Thinkpad isn't supported (X200t 74490-43U), or is something weirder afoot?

dkms info:

[ram@falcon BAT0]$ dkms status
acpi_call, 1.1.0, 4.19.16-1-MANJARO, x86_64: installed
[ram@falcon BAT0]$ lsmod |grep acpi
thinkpad_acpi         106496  0
nvram                  16384  1 thinkpad_acpi
rfkill                 28672  4 thinkpad_acpi,cfg80211
battery                24576  1 thinkpad_acpi
snd                    98304  16 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,thinkpad_acpi,snd_pcm
acpi_cpufreq           24576  1
acpi_call              16384  0

Here's another error I'm getting if it's at all helpful:

[ram@falcon ~]$ sudo tpacpi-bat -v -g ST 1
[sudo] password for ram: 
Error: AE_NOT_FOUND for ASL base: \_SB.PCI0.LPC.EC.HKEY
Error: AE_NOT_FOUND at /usr/bin/tpacpi-bat line 409.

Here's what I get when I try to use tp_smapi instead:

[ram@falcon ~]$ sudo pacman -Rcsu tpacpi-bat acpi_call-dkms
checking dependencies...
:: tlp optionally requires acpi_call: ThinkPad battery functions, Sandy Bridge and newer

Packages (3) dkms-2.5-4  acpi_call-dkms-1.1.0-186  tpacpi-bat-3.1-2

Total Removed Size:  0.21 MiB

:: Do you want to remove these packages? [Y/n] y
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms remove acpi_call/1.1.0 -k 4.19.16-1-MANJARO
:: Processing package changes...
(1/3) removing tpacpi-bat                                                 [##########################################] 100%
(2/3) removing acpi_call-dkms                                             [##########################################] 100%
(3/3) removing dkms                                                       [##########################################] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
[ram@falcon ~]$ sudo pacman -Sy linux419-tp_smapi
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (1) linux419-tp_smapi-0.41-13

Total Installed Size:  0.04 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                            [##########################################] 100%
(1/1) checking package integrity                                          [##########################################] 100%
(1/1) loading package files                                               [##########################################] 100%
(1/1) checking for file conflicts                                         [##########################################] 100%
(1/1) checking available disk space                                       [##########################################] 100%
:: Processing package changes...
(1/1) installing linux419-tp_smapi                                        [##########################################] 100%
:: Running post-transaction hooks...
(1/2) Updating linux419 module dependencies...
(2/2) Arming ConditionNeedsUpdate...
[ram@falcon ~]$ pacman -Ql linux419-tp_smapi
linux419-tp_smapi /usr/
linux419-tp_smapi /usr/lib/
linux419-tp_smapi /usr/lib/modules-load.d/
linux419-tp_smapi /usr/lib/modules-load.d/linux419-tp_smapi.conf
linux419-tp_smapi /usr/lib/modules/
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/hdaps.ko.xz
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/thinkpad_ec.ko.xz
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/tp_smapi.ko.xz
[ram@falcon ~]$ sudo modprobe tp_smapi
[sudo] password for ram: 
modprobe: ERROR: could not insert 'tp_smapi': Unknown symbol in module, or unknown parameter (see dmesg)
[ram@falcon ~]$ dmesg |grep -i tp.smapi
[ram@falcon ~]$ sudo modprobe haps
modprobe: FATAL: Module haps not found in directory /lib/modules/4.19.16-1-MANJARO
[ram@falcon ~]$ sudo modprobe thinkpad_ec
modprobe: ERROR: could not insert 'thinkpad_ec': Unknown symbol in module, or unknown parameter (see dmesg)
  • After reboot:
[ram@falcon ~]$ systemctl --failed
  UNIT                         LOAD   ACTIVE SUB    DESCRIPTION                                                           
● systemd-modules-load.service loaded failed failed Load Kernel Modules                                                   

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
[ram@falcon ~]$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2019-02-03 08:54:23 CST; 50s ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 447 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 447 (code=exited, status=1/FAILURE)

Feb 03 08:54:23 falcon systemd[1]: Starting Load Kernel Modules...
Feb 03 08:54:23 falcon systemd-modules-load[447]: Failed to insert 'tp_smapi': No such file or directory
Feb 03 08:54:23 falcon systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Feb 03 08:54:23 falcon systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Feb 03 08:54:23 falcon systemd[1]: Failed to start Load Kernel Modules.

Check the module is loaded,

lsmod | grep acpi_call

Just for reference, I have no issues with an X61 and X230 using the linux4**-acpi_call packages.

It was loaded:

[ram@falcon BAT0]$ lsmod |grep acpi
thinkpad_acpi         106496  0
nvram                  16384  1 thinkpad_acpi
rfkill                 28672  4 thinkpad_acpi,cfg80211
battery                24576  1 thinkpad_acpi
snd                    98304  16 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,thinkpad_acpi,snd_pcm
acpi_cpufreq           24576  1
acpi_call              16384  0

I read somewhere that acpi_call was for older thinkpads, so I tried switching to tp_smapi (see above comment)

In summary, I got acpi_call to load, but I still got an error when i tried to use it.
I tried switching to tp_smapi, but I can't even get that module to load at all. Am I supposed to symlink it manually?

Thanks for commenting :slight_smile:

Is it an official/OEM-spec battery? Cheaper replacements might not have the necessary ciruitry.

Interesting question. I don't think that the threshold is controlled on the battery itself, but I can't rule it out for certain.
I've got a completely dead OEM battery at home I can try. The battery I have now is third party, since Lenovo hasn't made accessories for this model in several years. It doesn't even have a support page anymore.

Do you know why tp_smapi won't load at all, though?

The log says "no such file or directory" so it sounds like it wasn't installed correctly.

I'd try the extramodules in the repo instead of the DKMS packages.

But I didn't install it from DKMS, that was acpi_call, which did modprobe successfully, but didn't seem to support my device (possibly too old?)

[ram@falcon ~]$ sudo pacman -Sy linux419-tp_smapi
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (1) linux419-tp_smapi-0.41-13

Total Installed Size:  0.04 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                            [##########################################] 100%
(1/1) checking package integrity                                          [##########################################] 100%
(1/1) loading package files                                               [##########################################] 100%
(1/1) checking for file conflicts                                         [##########################################] 100%
(1/1) checking available disk space                                       [##########################################] 100%
:: Processing package changes...
(1/1) installing linux419-tp_smapi                                        [##########################################] 100%
:: Running post-transaction hooks...
(1/2) Updating linux419 module dependencies...
(2/2) Arming ConditionNeedsUpdate...
[ram@falcon ~]$ pacman -Ql linux419-tp_smapi
linux419-tp_smapi /usr/
linux419-tp_smapi /usr/lib/
linux419-tp_smapi /usr/lib/modules-load.d/
linux419-tp_smapi /usr/lib/modules-load.d/linux419-tp_smapi.conf
linux419-tp_smapi /usr/lib/modules/
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/hdaps.ko.xz
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/thinkpad_ec.ko.xz
linux419-tp_smapi /usr/lib/modules/extramodules-4.19-MANJARO/tp_smapi.ko.xz
[ram@falcon ~]$ sudo modprobe tp_smapi
[sudo] password for ram: 
modprobe: ERROR: could not insert 'tp_smapi': Unknown symbol in module, or unknown parameter (see dmesg)
[ram@falcon ~]$ dmesg |grep -i tp.smapi
[ram@falcon ~]$ sudo modprobe haps
modprobe: FATAL: Module haps not found in directory /lib/modules/4.19.16-1-MANJARO
[ram@falcon ~]$ sudo modprobe thinkpad_ec
modprobe: ERROR: could not insert 'thinkpad_ec': Unknown symbol in module, or unknown parameter (see dmesg)

I'm on mobile, so sorry if the text I just pasted got garbled. It's included in a previous comment

EDIT: Fixed the pasted text from the attempt to install and use tp_smapi

Ah, now, this is a different error, and is there because you haven't fully updated your system. Do that now:

sudo pacman-mirrors -f3
sudo pacman -Syyuu

You'll find you have a kernel update so you'll also need to reboot.

:scream: Dont do that.

https://wiki.archlinux.org/index.php/Pacman#Installing_packages

[and probably one of the reasons you are having issues]

1 Like

Ok, good to know! I didn't know -Syu was needed. I'll remember that.
But I have upgraded the system rather recently.
I ran pacman -Su just today, and there was nothing to do

In which case you simply -S ... you dont ever sync mirrors, dont update, then sync one package.
Either use -S alone (and technically you should always update before this..)
Or include update in your install with -Syu .

I really appreciate the effort, guys, but I don't think my incorrect pacman usage was the root cause here:

[ram@falcon ~]$ sudo pacman-mirrors -f5
[sudo] password for ram: 
::INFO Downloading mirrors from repo.manjaro.org
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  0.928 United_States  : https://mirrors.ocf.berkeley.edu/manjaro/
  0.459 United_States  : https://mirror.math.princeton.edu/pub/manjaro/
  0.326 United_States  : https://mirrors.gigenet.com/manjaro/
  0.247 United_States  : http://mirrors.gigenet.com/manjaro/
  0.396 United_States  : http://distro.ibiblio.org/manjaro/
::INFO Writing mirror list
::United_States   : https://mirrors.gigenet.com/manjaro/stable/$repo/$arch
::United_States   : http://distro.ibiblio.org/manjaro/stable/$repo/$arch
::United_States   : https://mirror.math.princeton.edu/pub/manjaro/stable/$repo/$arch
::United_States   : https://mirrors.ocf.berkeley.edu/manjaro/stable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
[ram@falcon ~]$ man pacman
[ram@falcon ~]$ sudo pacman -Syyuu
:: Synchronizing package databases...
 core                                            148.6 KiB  1032K/s 00:00 [##########################################] 100%
 extra                                          1865.8 KiB  2.41M/s 00:01 [##########################################] 100%
 community                                         5.2 MiB  3.62M/s 00:01 [##########################################] 100%
 multilib                                        184.4 KiB  7.83M/s 00:00 [##########################################] 100%
:: Starting full system upgrade...
 there is nothing to do
[ram@falcon ~]$ 

This box was set up only on Jan 14, and I have pamac-tray running all the time to nag me of new packages, so I don't think it's been botched up too badly. I'm fairly certain I never ran pacman -Sy package-name with outstanding upgrades needed.

Any ideas what else I can try?

Much thanks,

--Chewie (Raaaargh!)

A little more detail:
I found this error in dmesg. I'm not completely sure if it's related:

[59024.867967] thinkpad_ec: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err -2)
[59024.868062] thinkpad_ec: Unknown symbol __x86_indirect_thunk (err -2)

More info:
I found this thread ( Error loading tp_smapi kernel module ), which includes the same error message. They seem to indicate that the tp_smapi module is no longer needed after 4.17. But if that's true, then why is there a package named linux419-tp_smapi to begin with? :unamused:

The built-in kernel acpi subsystem creates a battery config "file" in /sys, but it still doesn't let me read it or write to it:

[ram@falcon ~]$ cd /sys/class/power_supply/BAT0
[ram@falcon BAT0]$ ls
alarm                   cycle_count         manufacturer  serial_number  uevent
capacity                device              model_name    status         voltage_min_design
capacity_level          energy_full         power         subsystem      voltage_now
charge_start_threshold  energy_full_design  power_now     technology
charge_stop_threshold   energy_now          present       type
[ram@falcon BAT0]$ echo 80 |sudo dd of=charge_stop_threshold 
dd: error writing 'charge_stop_threshold': No such device
0+1 records in
0+0 records out
0 bytes copied, 0.000262673 s, 0.0 kB/s
[ram@falcon BAT0]$ sudo dd if=charge_stop_threshold 
dd: error reading 'charge_stop_threshold': No such device
0+0 records in
0+0 records out
0 bytes copied, 0.000293054 s, 0.0 kB/s
[ram@falcon BAT0]$ sudo dd if=charge_start_threshold 
dd: error reading 'charge_start_threshold': No such device
0+0 records in
0+0 records out
0 bytes copied, 0.000454178 s, 0.0 kB/s

Thanks,
---Chewie (Sad "Raaaaaargh")

1 Like

Ok, this is solved for me.
I don't know what's wrong with the linux419-tp_smapi package, but when I installed the dkms version from aur (yay -Syu tp_smapi-dkms), it works just fine now.

Is there any way to let the package manager know? Oh wait, I'll just email him.

Thanks all! :wink:

---Chewie (Triumphant "Graaaarooogh!")

3 Likes

Forum kindly sponsored by