Laptop

Lenovo ThinkPad T470 Ultrabook running Linux – Part 5 – Multimedia

This is a blog looking at a refurbished Lenovo ThinkPad T470 Ultrabook running Linux.

Our T470 has a hot-swappable external 24Wh battery and an internal 24Wh battery. Both batteries had been heavily used. We therefore purchased a new Lenovo 72Wh battery. We definitely recommend getting a 72Wh battery if battery life is important.

And if you get a new battery, we strongly recommend installing and configuring TLP. It’s an awesome command-line power management package. The software needs very little configuration as the default settings are spot on. In fact, the only thing we changed for the T470 (shown by the command $ sudo tlp-stat --cdiff is:

+++ Configured Settings (only differences to defaults):
/etc/tlp.conf L0088: CPU_SCALING_GOVERNOR_ON_BAT="powersave"
/etc/tlp.conf L0501: START_CHARGE_THRESH_BAT0="75"
/etc/tlp.conf L0502: STOP_CHARGE_THRESH_BAT0="80"
/etc/tlp.conf L0508: START_CHARGE_THRESH_BAT1="75"
/etc/tlp.conf L0509: STOP_CHARGE_THRESH_BAT1="80"

These changes mean that both the internal battery and the hot-swappable external battery are only charged to 80%, and charging only starts when the battery levels falls to 75%. It’s estimated that charging a battery to only 80% increases the number of charge cycles more than threefold.

Video Drivers

Modern graphic cards perform a variety of tasks. They aren’t just designed for gaming. Many cards help offload video encoding and decoding from the CPU. This helps to lower power consumption and free up resources for the rest of the system.

Like the majority of laptops, the T470 doesn’t offer a dedicated graphics card. Instead it relies on hardware decoding from its GPU.

Linux offers 3 main APIs that enable hardware video acceleration. They are VA-API, VDPAU, and NVENC/NVDEC. VA-API (Video Acceleration API) user mode driver is supported on Intel, AMD and NVIDIA. It’s widely supported by software. The T470 has an Intel onboard GPU and uses this API.

With Manjaro, the mode driver that provides VA-API isn’t installed by default. Some programs will suggest you install that mode driver. But this isn’t always explicit. We therefore think it’s best just to install the driver straight away. Enter the command:

$ sudo pacman -S manjaro-vaapi

This package installs five separate packages: libgmmlib intel-media-driver lib32-libva-intel-driver lib32-libva-mesa-driver manjaro-vaapi

We also recommend installing libva-utils, as this provides vainfo, a utility that shows the supported profiles and entrypoints.

$ sudo pacman -S libva-utils

Here’s the output of vainfo using the Intel iHD driver.

vainfo for Intel iHD driver on Lenovo T470 laptop

VAEntrypointVLD means that the machine is capable to decode this format, VAEntrypointEncSlice means that the machine can encode to this format. VAEntryPointFEIv is an extension to VA API which allows applications to have more control over different phases of encoding and trade off quality for speed.

The driver offers hardware video decoding/encoding for MPEG-2, H.264 (AVC), JPEG,, and HEVC 8 bit codecs. There’s decoding only for VC-1 and VP8.

H.264 remains the most popular video codec although YouTube delivers much newer codecs VP9 or AV1, by default. AV1 was developed as a successor to VP9. Like VP9, but unlike H.264/AVC and HEVC, AV1 has a royalty-free licensing model. AV1 offers up to 34 percent higher data compression than VP9, and up to 50 percent higher than H264.

The T470 has the Intel Skylake GT2 [HD Graphics 520] GPU.

Next page: Page 2 – Video Playback

Pages in this article:
Page 1 – Introduction / Video Drivers
Page 2 – Video Playback
Page 3 – Music Playback


Complete list of articles in this series:

Lenovo ThinkPad T470 Ultrabook
Part 1We spotlight the condition of our refurbished T470 laptop
Part 2Specifications of the T470 laptop using the inxi utility to interrogate the system
Part 3Installing the Manjaro distribution
Part 4We run a series of benchmarks on the T470 and compare to other machines
Part 5Multimedia performance including power management

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.