-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Laptop Configuration
Complete beginner-friendly guide to configuring Linux on laptops, covering Arch Linux, CachyOS, and other distributions including battery optimization, power management, touchpad, function keys, and laptop-specific settings.
- Understanding Laptop Configuration
- Battery Optimization
- Power Management
- Function Keys
- Touchpad Configuration
- Thermal Management
- Laptop-Specific Hardware
- Troubleshooting
Laptops have unique requirements:
- Battery life: Maximize battery runtime
- Power management: Balance performance and power
- Touchpad: Configure touchpad settings
- Function keys: Media keys, brightness, etc.
- Thermal management: Prevent overheating
Why configure:
- Battery life: Extend usage time
- Performance: Balance performance and battery
- Comfort: Better user experience
- Hardware: Enable laptop-specific features
Check battery:
# Using upower
upower -i /org/freedesktop/UPower/devices/battery_BAT0
# Simple battery level
cat /sys/class/power_supply/BAT0/capacityInstall TLP:
# Arch/CachyOS
sudo pacman -S tlp tlp-rdw
# Debian/Ubuntu
sudo apt install tlp tlp-rdw
# Fedora
sudo dnf install tlp tlp-rdwEnable TLP:
sudo systemctl enable --now tlp.serviceWhat TLP does:
- Automatically optimizes power settings
- CPU frequency scaling
- GPU power management
- Wi-Fi/Bluetooth power
- USB autosuspend
Configure TLP:
# Edit config
sudo vim /etc/tlp.confCommon settings:
# CPU scaling
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
# GPU power
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
# Wi-Fi power
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=on
Install power-profiles-daemon:
# Arch/CachyOS
sudo pacman -S power-profiles-daemon
# Debian/Ubuntu
sudo apt install power-profiles-daemon
# Fedora
sudo dnf install power-profiles-daemonUse profiles:
# Set profile
powerprofilesctl set balanced
powerprofilesctl set performance
powerprofilesctl set power-saverInstall cpupower:
# Arch/CachyOS
sudo pacman -S cpupower
# Set governor
sudo cpupower frequency-set -g powersave # For battery
sudo cpupower frequency-set -g performance # For ACCheck function keys:
# Check function keys
xev | grep -A 2 --line-buffered '^KeyRelease' | sed -n '/keycode /p'Control brightness:
# Install light
sudo pacman -S light
# Increase brightness
light -A 10
# Decrease brightness
light -U 10
# Set brightness
light -S 50 # 50% brightnessOr use xbacklight:
# Install xbacklight
sudo pacman -S xorg-xbacklight
# Increase
xbacklight -inc 10
# Decrease
xbacklight -dec 10Volume control usually works automatically with desktop environments.
Manual control:
# Using pactl
pactl set-sink-volume @DEFAULT_SINK@ +10%
pactl set-sink-volume @DEFAULT_SINK@ -10%
pactl set-sink-mute @DEFAULT_SINK@ toggleSee Touchpad Configuration for detailed guide.
Quick setup:
# Check touchpad
xinput list | grep -i touchpad
# Configure
xinput set-prop "Touchpad Name" "libinput Tapping Enabled" 1Install thermald:
# Arch/CachyOS
sudo pacman -S thermald
# Debian/Ubuntu
sudo apt install thermald
# Fedora
sudo dnf install thermaldEnable:
sudo systemctl enable thermald
sudo systemctl start thermaldMonitor temperature:
# Install sensors
sudo pacman -S lm_sensors
# Detect sensors
sudo sensors-detect
# View sensors
sensorsCheck webcam:
# List video devices
ls -l /dev/video*
# Test
ffmpeg -f v4l2 -i /dev/video0 -frames:v 1 test.jpgControl keyboard backlight:
# Check if available
ls /sys/class/leds/
# Set brightness
echo 50 | sudo tee /sys/class/leds/input*::kbd_backlight/brightnessCheck battery:
# Check if detected
ls /sys/class/power_supply/
# Check kernel messages
dmesg | grep -i batteryCheck drivers:
# Check loaded modules
lsmod | grep -i acpi
# Check ACPI events
acpi_listenThis guide covered laptop configuration for Arch Linux, CachyOS, and other distributions, including battery optimization, power management, function keys, and laptop-specific hardware.
- Power Management - Power management
- Touchpad Configuration - Touchpad setup
- Hardware Detection - Hardware setup
- ArchWiki Laptop: https://wiki.archlinux.org/title/Laptop
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.