Although Manjaro is one of the GNU/Linux distributions that I find to be more frictionless for me, it still need some for some actions to be done after a fresh installation.

This post covers the following:

  • Install additional modules for a modern ThinkPad
  • Enable VA-API support for an Intel 8th Gen’s integrated GPU
  • Configure local hosts
  • Set up certificates and cryptographic keys
  • Set up VS Codium / Visual Studio Code - OSS
  • Set up user backup and system snapshots
  • Set up network printers

Install Power Management Modules (acpi_call)

acpi_call is a module that provides power management related functions like the recallibration of the battery gauge. While the module currently responsible for the battery thresholds (natapi) is usually present by default, acpi_call is not.

sudo pacman -Syu linux510-acpi_call

To check for more / other modules that may be needed, run:

sudo tlp-stat -b

And look for indications at the top of the output:

$ ~ sudo tlp-stat -b                                                      
Place your finger on the fingerprint reader
--- TLP 1.3.1 --------------------------------------------

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = active (data, thresholds)
tpacpi-bat = active (recalibrate)
tp-smapi   = inactive (ThinkPad not supported)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
...
...
$ ~

Funny enough, the module tp-smapi is only supported by older ThinkPads, but tlp says “ThinkPad not supported” in a very strong way.

Install VA-API support

VA-API is the hardware video codec technology present in AMD GPUs and Intel integrated GPU for 8th Gen. and newer processors.

sudo pacman -Syu manjaro-vaapi

Configure hosts

If you have home servers configured with static IP or static DHCP leases, this is handy:

echo "IP hostname\nIP2 hostname2" | sudo tee -a /etc/hosts

Configure Your Cryptography Certificates and Keys

Normally, the relevant basic packages to run all the following commands are already installed.

GPG Keys

Import your private GPG key with the following:

gpg --import ~/path/to/private.pgp
gpg --edit-key <KEY_ID> # Issue 'trust' to select trust level

Chances are that a stock or default email client, like Geary for Pantheon or Gnome 4, does not support GPG. Install Evolution and configure pinentry to use your GPG key.

sudo pacman -Syu evolution

When trying to sign a message, chances are that an “unappropriate ioctl for device” error pops up. This is a misconfiguration of the program pinentry that is meant to ask for the passprase to unlock the private key.

The solution described in this StackOverflow thread works for a current Manjaro using Gnome 4.

Add this to ~/.gnupg/gpg.conf:

use-agent 
pinentry-mode loopback

And this to ~/.gnupg/gpg-agent.conf:

allow-loopback-pinentry

Then restart the agent with echo RELOADAGENT | gpg-connect-agent.

SSH Keys

Generate a SSH key and import it in your home servers and GitHub to be able to operate thriough SSH without supplying your password from this machine:

ssh-keygen
# copy .ssh/id_rsa.pub contents into .ssh/authorised_keys at home servers
# copy .ssh/id_rsa.pub contents into GitHub Settings 

Government Certificates

For public communications and govt. processes, import an official certificate into Firefox: provided that you have backed them up in a .p12 file protected with password.

VS Code - OSS

Visual Studio Code - OSS, a.k.a. “VS Codium”, is my preferred editor for general purposes, and with the extension “Markdown All-In-One”, for Markdown in particular.

Manjaro has VS Codium in its repositories, but the extensions marketplace sometimes is not working. It’s a bug in the store, not in the program. In case we need urgently an extension we can change the configuration to use Visual Studio Code Marketplace instead of the default, VSX. To do so, edit /usr/lib/code/product.json with elevated privileges, and change:

"extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
}

for:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

For the emojis to show in the integrated terminal, go to settings (Ctrl + ,) and search for the option Terminal › Integrated: Font Family. In its text field, type the name of the Font shown in Gnome Terminal’s Settings, that is NotoSansMono Nerd Font on August 19th 2021. Leave the font size alone, as this program measures the font size in pixels, as opposed to in points like Gnome Terminal and other programs.

Backups

Install and configure Backups and TimeShift.

  • Backups is the user friendly name of the tandem Duplicity & Dejà-Dup. This one is useful to backup the user home directories and its behaviour is similar to Apple’s Time Machine or Microsoft’s File History, with its differences and limitations in some cases.
  • TimeShift is useful to have system snapshots and be able to roll back a broken system to a healthy status. In its recovery capabilities it can be seen as similar to Mac’s Carbon Copy Cloner or Super Duper, but based on either rsync or brtfs; each backend has its benefits and drawbacks that won’t be covered here. Although TimeShift can snapshot the whole disk contents, the program recommends to exclude the user home directories to save space in the snapshots, which may or may not make sense depending on the user. That’s why I also use the previous one.

Timeshift uses cron to schedule snapshots. Manjaro uses cron’s backwards-compatible successor cronie, but apparently it is not enabled by default after the installation, so TimeShift’s shnapshots won’t happen automatically.

To solve that, check that the cron entry is created (it should) and that cronie is running:

ls /etc/cron.d/timeshift-hourly
journalctl -b -u cronie

If the second command shows no entries or result, then enable cronie, check the enablement result, and check the journal again:

sudo systemctl enable --now cronie
systemctl status cronie
journalctl -b -u cronie

Nevertheless, as Manjaro is a rolling release distribution, it’s recommended to complete the TimeShift set up by installing the package timeshift-autosnap-manjaro. This package will add a call to TimeShift for it to create a snapshot before installing new packages or updating the system.

Network Printers

On a regular Manjaro installation, the CUPS service should be up and running; otherwise check the distribution for indications on how to install it.

Once we have CUPS already set, a printer needs to be added to it. Despite CUPS may be able to discover the printer through the network, we may still need to provide and a PPD file that is also referred to as “CUPS Wrapper”. That file is generally made available by the vendor, and needs to be, either:

  • manually uploaded to CUPS through the user interface at http://localhost:631, or
  • installed as a system driver

In my case, the printer I have has a driver in AUR. In other case, we may be able to download a generic Linux driver from the vendor, and unpack it to see if they have included the PPD.

Next, we need to make the printer reachable through the network. This may need some static hosts configuration in the machine (/etc/hosts) and in the router, for the DHCP lease to be static. Two entries need to be configured: the printer host and the queue:

192.168.0.20 BC8385F20595P      # printer host
192.168.0.21 BRWE86F38342AA1    # printer queue

Last thing to note is that the default options we set up in CUPS through the web interface are only applied if we print against “LPR” in the list of printers; if we choose the full named printer, we still need to manually set options like duplex, quality, etc.