mirror of
https://github.com/KDE/kde-linux.git
synced 2025-12-24 00:18:23 -05:00
Add the ability to hibernate
Builds and installs dynamic-hibernate and enables its associated services. This dynamically creates a swapfile before hibernation, automatically hides the bootloader - pinning the currently booted image - then allowing you to hibernate to the created swapfile. This circumvents the requirement for a swap partition or pre-existing swapfile. It also includes a notifier which alerts the user if and why hibernation fails. See gitlab.com/evlaV/steamos-customizations/-/commit/3d13dcb03258d237fc0a8dc9d3d74a1da7fe7385 for basis
This commit is contained in:
@@ -11,4 +11,5 @@ Packages=boost
|
||||
pacman
|
||||
python-setproctitle # For kde-builder
|
||||
python-yaml # For kde-builder
|
||||
rust
|
||||
|
||||
|
||||
@@ -74,3 +74,6 @@ chown -R live:live /home/live/
|
||||
# Start the basic-test (if it wants to be started)
|
||||
systemctl daemon-reload
|
||||
systemctl start --no-block kde-linux-basic-test.service
|
||||
|
||||
# Disable hibernation since dynamic-hibernate won't work in a live environment
|
||||
systemctl mask hibernate.target
|
||||
|
||||
@@ -33,8 +33,10 @@ enable kde-linux-live-setup.service
|
||||
enable kde-linux-volatile-var-lib-flatpak.service
|
||||
enable plasma-setup-live-system.service
|
||||
enable var-lib-snapd-snap.mount
|
||||
# also one of ours but not prefixed with kde-linux- so others can use it too
|
||||
# also ours but not prefixed with kde-linux- so others can use it too
|
||||
enable etc-factory.service
|
||||
enable dynamic-hibernate-prepare.service
|
||||
enable dynamic-hibernate-cleanup.service
|
||||
|
||||
# networkd - we use networkmanager
|
||||
disable systemd-networkd-wait-online.service
|
||||
|
||||
@@ -3,3 +3,7 @@
|
||||
|
||||
# Screen reading is opt-in
|
||||
disable orca.service
|
||||
|
||||
# Sends an error notification if dynamic hibernation fails
|
||||
# also ours but not prefixed with kde-linux- so others can use it too
|
||||
enable dynamic-hibernate-notifier.service
|
||||
|
||||
@@ -16,6 +16,13 @@ bootctl install
|
||||
echo 'timeout 5' >> "$SYSTEMD_ESP_PATH/loader/loader.conf"
|
||||
cp /usr/share/edk2-shell/x64/Shell.efi "$SYSTEMD_ESP_PATH/shellx64.efi"
|
||||
|
||||
# dynamic-hibernate
|
||||
cd /tmp
|
||||
git clone --depth 1 https://invent.kde.org/tduck/dynamic-hibernate # TODO: move to kde-linux org and integrate into i18n infra
|
||||
cmake -S dynamic-hibernate -B dynamic-hibernate/build -DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build dynamic-hibernate/build -v
|
||||
cmake --install dynamic-hibernate/build
|
||||
|
||||
# Meanwhile cleanup a bit
|
||||
## Unnecessary for us
|
||||
pacman --remove --noconfirm qt6-doc qt6-examples || true
|
||||
|
||||
Reference in New Issue
Block a user