-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Older Thinkpads (2011 and older) require this kernel module for battery charge thresholds and recalibration with tlp. You only need this if the Recommendations section from running `tlp-stat -b` includes `Install tp-smapi kernel modules for ThinkPad battery thresholds and recalibration`.
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
set -oeux pipefail | ||
|
||
ARCH="$(rpm -E '%_arch')" | ||
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" | ||
RELEASE="$(rpm -E '%fedora')" | ||
|
||
### Add TLP repo | ||
dnf install -y https://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm | ||
|
||
### BUILD tp_smapi (succeed or fail-fast with debug output) | ||
dnf install -y \ | ||
akmod-tp_smapi-*.fc${RELEASE}.${ARCH} | ||
akmods --force --kernels "${KERNEL}" --kmod tp_smapi | ||
modinfo /usr/lib/modules/${KERNEL}/extra/tp_smapi/tp_smapi.ko.xz >/dev/null || | ||
(find /var/cache/akmods/tp_smapi/ -name \*.log -print -exec cat {} \; && exit 1) |