Package Details: tp_smapi-dkms 0.42-2

Git Clone URL: (read-only)
Package Base: tp_smapi-dkms
Description: DKMS controlled modules for ThinkPad's SMAPI functionality
Upstream URL:
Licenses: GPL
Conflicts: tp_smapi
Provides: tp_smapi=0.42
Submitter: TamCore
Maintainer: TamCore
Last Packager: TamCore
Votes: 54
Popularity: 0.601688
First Submitted: 2011-08-30 13:12
Last Updated: 2017-09-29 15:03

Dependencies (1)

Required by (7)

Sources (3)

Latest Comments

xxxxme commented on 2017-09-28 23:29

PKGFILE and dkms.conf updated according to the recommendations in

tp_smapi-dkms.install is no longer needed. Tested to work on my machine with the -hardened kernel.

Soukyuu commented on 2017-05-07 09:58

Does not seem to work, the module is not auto-loaded neither for the mainline nor the -ck kernel for me. Headers are installed and there were no errors reported, but the sysfs entries aren't there...

Jristz commented on 2017-01-02 03:10

Pleas use a hook, dkms now have a hook to trigger dkms buildings at install, so the dkms building in the install file is unnedded now and just trigger the dkms building twice.

parazyd commented on 2015-12-20 17:23

Reported out of date. Calculated sums not correct anymore and patching fails.

socke commented on 2015-11-24 12:21

Have put the PKGBUILD and the install file in a pastebin for better readability:

socke commented on 2015-11-24 11:59

Improved PKGBUILD:
pkgdesc="DKMS controlled modules for ThinkPad's SMAPI functionality"

prepare() {
# patch Makefile for recent kernel module directory change
cd "${srcdir}/${_pkgname}-${_pkgname/_/-}-${pkgver}/"
patch -p2 < ${srcdir}/kbase.patch
sed -i 's/KVER/KERNELRELEASE/g' Makefile

cd "${srcdir}/${_pkgname}-${_pkgname/_/-}-${pkgver}/"

mkdir -p "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
cp -a {*.{h,c},Makefile} "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
cp ${srcdir}/dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}"

In the dkms.conf set:

And in the install file remove all the -dkms suffixes:
post_install() {
DKMS=`which dkms 2>/dev/null`

echo ">>> DKMS: Module add, build, and install "

$DKMS add -m tp_smapi -v $ver
for kver in /usr/lib/modules/*
if test -e ${kver}/build
kver="`basename $kver`"

$DKMS build -m tp_smapi -v $ver -k $kver
$DKMS install -m tp_smapi -v $ver -k $kver

echo ">>> Updating kernel modules..."
depmod -a $kver

pre_upgrade() {

post_upgrade() {

pre_remove() {
DKMS=`which dkms 2>/dev/null`
echo ">>> DKMS: Module uninstall "

line=`$DKMS status -m tp_smapi`
if echo "$line" | grep -E 'added|built|installed'; then
version=`echo "$line" | sed "s/tp_smapi,\([^,]*\)[,:].*/\1/;t;d"`
$DKMS remove -m tp_smapi -v $version --all


post_remove() {
/sbin/depmod -a

Actually, the install file needs some more work to do: Since you are receiving the module version as a parameter, the first line (ver=) can be omitted.

TamCore commented on 2015-01-21 15:29

tp_smapi-ck is a static package. The module is built during makepkg and that's it. This package ships the complete source of the module and some instructions for dkms to build it. That's why this package works with every kernel and why I won't add a specific kernels headers as deps.

orschiro commented on 2015-01-21 11:50

I understand. I didn't know that this package is also meant for -ck users. I expected them to use tp_smapi-ck.

TamCore commented on 2015-01-21 10:25

> Doesn't everyone use the linux package as it provides the kernel?
Nope, for example if someone (like me) has only linux-ck{,-headers} installed, there's no linux{,-headers} present on the system.

orschiro commented on 2015-01-21 09:37


Thanks for your comment.

> even if they don't use the linux package

Doesn't everyone use the linux package as it provides the kernel?

How can it be an optional dependency only if it was required to have it installed in order to install this package?

All comments