How To Install tp-smapi-dkms on Ubuntu 20.04

In this tutorial we learn how to install tp-smapi-dkms on Ubuntu 20.04. tp-smapi-dkms is ThinkPad hardware/firmware access modules source - dkms version

Introduction

In this tutorial we learn how to install tp-smapi-dkms on Ubuntu 20.04.

What is tp-smapi-dkms

tp-smapi-dkms is:

The tp_smapi kernel module exposes some features of the ThinkPad hardware/firmware via a sysfs interface. Currently, the main implemented functionality is control of battery charging and extended battery status. The underlying hardware interfaces are SMAPI and direct access to the embedded controller.

This package also brings the source for an improved version of HDAPS which should work on newer ThinkPads too (the stock kernel version does not).

This package contains the source to be built with dkms.

There are three methods to install tp-smapi-dkms on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tp-smapi-dkms Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tp-smapi-dkms using apt-get by running the following command:

sudo apt-get -y install tp-smapi-dkms

Install tp-smapi-dkms Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tp-smapi-dkms using apt by running the following command:

sudo apt -y install tp-smapi-dkms

Install tp-smapi-dkms Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tp-smapi-dkms using aptitude by running the following command:

sudo aptitude -y install tp-smapi-dkms

How To Uninstall tp-smapi-dkms on Ubuntu 20.04

To uninstall only the tp-smapi-dkms package we can use the following command:

sudo apt-get remove tp-smapi-dkms

Uninstall tp-smapi-dkms And Its Dependencies

To uninstall tp-smapi-dkms and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove tp-smapi-dkms

Remove tp-smapi-dkms Configurations and Data

To remove tp-smapi-dkms configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge tp-smapi-dkms

Remove tp-smapi-dkms configuration, data, and all of its dependencies

We can use the following command to remove tp-smapi-dkms configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tp-smapi-dkms

References

Summary

In this tutorial we learn how to install tp-smapi-dkms package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.