diff --git a/docs/alpine-desktop-setup/post-install/power-management.md b/docs/alpine-desktop-setup/post-install/power-management.md index e69de29..f590ccd 100644 --- a/docs/alpine-desktop-setup/post-install/power-management.md +++ b/docs/alpine-desktop-setup/post-install/power-management.md @@ -0,0 +1,21 @@ +# Power management + +## Acpi + +During installation Busybox's `acpid` has already been replaced by the regular `acpid` which means that it has to be configured in `/etc/acpi/handler.sh`. The default configuration works but by default will not suspend the device if an AC adapter is connected even if the lid is closed. Therefore it's recommended in `button/lid:*:close:*` to change it to: + +``` +#power-supply-ac || suspend +suspend +``` + +## TLP + +To optimise battery on the device it's recommend to install `tlp` and activate it's service: + +``` +# apk add tlp +# rc-update add tlp default +``` + +`tlp` can be configured in `/etc/tlp.d` but the default configuration already works. diff --git a/docs/alpine-desktop-setup/post-install/zram.md b/docs/alpine-desktop-setup/post-install/zram.md index aee0ce4..736313b 100644 --- a/docs/alpine-desktop-setup/post-install/zram.md +++ b/docs/alpine-desktop-setup/post-install/zram.md @@ -9,6 +9,17 @@ Install it with: # rc-update add zram-init default ``` -Now reboot the computer or restart the service to check if it works. +`zram-init` can be configured in `/etc/conf.d/zram-init`. The amount of devices and the size of zram can be changed here, for example: + +``` +num_devices=1 + +# swap - 500M + +#size0=512 +size0=`LC_ALL=C free -m | awk '/^mem:/{print int($2/4)}'` +``` + +Now the size of the swap device will be a fourth of the ram size. Reboot the computer or restart the service to check if it works. Also be sure to read the [ArchWiki](https://wiki.archlinux.org/title/Zram) for more information.