Some specific settings I use on my ThinkPad.
1. Packages
sudo pacman -S networkmanager power-profiles-daemon brightnessctl xf86-video-amdgpu
2. Services
sudo systemctl enable NetworkManager.service power-profiles-daemon.service fstrim.timer
Switch power profiles with powerprofilesctl set [power-saver|balanced|performance] (balanced default).
3. Disable sleep
Mask every sleep target so there's no way to suspend or hibernate:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
Then make logind ignore closing the lid and idling with 99-no-sleep.conf in /etc/systemd/logind.conf.d/.
4. Low battery warning
99-battery-low.rules in /etc/udev/rules.d/ blinks the screen 3 times without polling or running any daemon:
- The firmware notifies the kernel, which marks the battery 'Low' when its energy drops below the alarm level. The rule then blinks the screen with
brightnessctland sets the alarm to0, so it doesn't keep blinking. - Plugging in the charger sets the alarm back to
2268000(5% in µWh on my battery).
5. Touchpad
40-touchpad.conf in /etc/X11/xorg.conf.d/ turns on tap to click.
6. Screen tearing
20-amdgpu.conf in /etc/X11/xorg.conf.d/ turns on TearFree.
7. Screen blanking
As there's no sleep, turn the screen off after 5 minutes without input.
In .xinitrc:
xset dpms 0 0 300