HakoDocs

HakoDocs

Posts (Latest 10 updated) :
Read all
Table of Contents:
  1. Linux: Dump
  2. General guides
    1. TLP
    2. Migrating wpa_supplicant to iwd
      1. Connecting iwd to EAP-PEAP networks
  3. Troubleshooting Dump
    1. Laptop is laggy after suspend

Linux: Dump

This is a list of random problems I have had to solve at some point.

General guides

TLP

Install packages

sudo pacman -S tlp tlp-rdw acpi_call ethtool smartmontools

and enable/start services

sudo systemctl enable --now tlp.service
sudo systemctl enable --now NetworkManager-dispatcher.service
sudo systemctl mask systemd-rfkill.service
sudo systemctl mask systemd-rfkill.socket

then we need to edit a configuration under /etc/tlp.conf. It already has sensible defaults, but the file has all the information you need. For reference, here are all the parameters I changed.

CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave

CPU_ENERGY_PERF_POLICY_ON_AC=performance

PLATFORM_PROFILE_ON_AC=balanced
PLATFORM_PROFILE_ON_BAT=low-power

START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80

Migrating wpa_supplicant to iwd

The Intel Wireless Daemon is a modern alternative to wpa_supplicant with

  1. Faster reconnections
  2. Simple and more efficient
  3. Better security
  4. Drop-in replacement for NetworkManager

To change to it install the iwd package

sudo pacman -S iwd

Stop and disable wpa_supplicant

sudo systemctl stop wpa_supplicant
sudo systemctl disable wpa_supplicant

Also mask it to never restart automatically

sudo systemctl mask wpa_supplicant

Enable and start iwd

sudo systemctl enable --now iwd

Configure NetworkManager by creating or modifying the file

[device]
wifi.backend=iwd

and restart

sudo systemctl restart NetworkManager

You will be asked again for Network authentication.

Connecting iwd to EAP-PEAP networks

Universities and Organizations have some tricky networks that cannot be configured using iwctl directly, and need to be done manually. For this you need to create a file called essid.8021x under /var/lib/iwd/essid.8021x, where essid is the network name. The file structure is as follows, and you only need to fill in the spaces.

[Security]
EAP-Method=PEAP
EAP-Identity=anonymous@realm.edu
EAP-PEAP-CACert=/path/to/root.crt
EAP-PEAP-ServerDomainMask=radius.realm.edu
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=johndoe@realm.edu
EAP-PEAP-Phase2-Password=hunter2

[Settings]
AutoConnect=true

For example, at Tec you need something like. If you are at this institution, you should know how to fill-in the information.

[Security]
EAP-Method=PEAP
EAP-Identity=a0xxxxxxx
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=a0xxxxxxx
EAP-PEAP-Phase2-Password=your_passwd

[Settings]
AutoConnect=true

NetworkManager will connect automatically to the network.

Troubleshooting Dump

Laptop is laggy after suspend

See Laptop is laggy after suspend for more information.