Add support for TuxOnIce hibernation
authorJulien Muchembled <jm@jmuchemb.eu>
Tue, 29 Apr 2014 09:40:50 +0000 (11:40 +0200)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 14 Aug 2020 00:03:28 +0000 (01:03 +0100)
systemd does not support non-mainline kernel features so upstream rejected this
patch.
It is however required for systemd integration by tuxonice-userui package.

Forwarded: http://lists.freedesktop.org/archives/systemd-devel/2014-April/018960.html

Gbp-Pq: Topic debian
Gbp-Pq: Name Add-support-for-TuxOnIce-hibernation.patch

src/shared/sleep-config.c

index 0dccc8f9700491e5d7b1705065e75ca66a1a09ac..b1d3b2121065fe167cb45e67f266982e7d63daf6 100644 (file)
@@ -468,6 +468,12 @@ static bool enough_swap_for_hibernation(void) {
         if (getenv_bool("SYSTEMD_BYPASS_HIBERNATION_MEMORY_CHECK") > 0)
                 return true;
 
+        /* TuxOnIce is an alternate implementation for hibernation.
+         * It can be configured to compress the image to a file or an inactive
+         * swap partition, so there's nothing more we can do here. */
+        if (access("/sys/power/tuxonice", F_OK) == 0)
+                return true;
+
         r = find_hibernate_location(&hibernate_location);
         if (r < 0)
                 return false;