Bug#746463: systemd: Add support for TuxOnIce hibernation

2014-04-30 Thread Julien Muchembled
Package: systemd
Version: 208-1
Severity: normal
Tags: patch upstream
Control: affects -1 tuxonice-userui

systemd 208+ tries to detect whether there's enough swap space to hibernate and
this is irrelevant when TuxOnIce is used. I've just upgraded systemd from
version 204 and hibernate key stopped working because of that. In other words,
this breaks package tuxonice-userui (which I maintain).

Could you please add the attached patch to experimental branch ?

I tried to push it upstream but there seems to be a hard policy to reject
anything that is not in vanilla Linux:
 http://lists.freedesktop.org/archives/systemd-devel/2014-April/018963.html
From fe5cf5ff434d1b7f636086c83cf3174f72459432 Mon Sep 17 00:00:00 2001
From: Julien Muchembled j...@jmuchemb.eu
Date: Tue, 29 Apr 2014 11:40:50 +0200
Subject: [PATCH] Add support for TuxOnIce hibernation

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
---
 src/shared/sleep-config.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index d068bfc..ee74095 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -226,6 +226,12 @@ static bool enough_memory_for_hibernation(void) {
 size_t size, used;
 int r;
 
+/* 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 = hibernation_partition_size(size, used);
 if (r  0)
 return false;
-- 
1.8.5.2.988.g9b015e5.dirty



Bug#746463: systemd: Add support for TuxOnIce hibernation

2014-04-30 Thread Michael Biebl
Hi,

Am 30.04.2014 11:40, schrieb Julien Muchembled:

 systemd 208+ tries to detect whether there's enough swap space to hibernate 
 and
 this is irrelevant when TuxOnIce is used. I've just upgraded systemd from
 version 204 and hibernate key stopped working because of that. In other words,
 this breaks package tuxonice-userui (which I maintain).
 
 Could you please add the attached patch to experimental branch ?
 
 I tried to push it upstream but there seems to be a hard policy to reject
 anything that is not in vanilla Linux:
  http://lists.freedesktop.org/archives/systemd-devel/2014-April/018963.html

Personally I'm not too thrilled having a patch which is not going
upstream anytime soon or even ever. We already have too many of them.
That said, even if the popcon numbers of tuxonice are rather low, the
patch looks simple enough.

If you are willing to keep the patch up-to-date for new upstream
releases and handle bug reports related to this patch, I guess I'd be
fine with merging it.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#746463: systemd: Add support for TuxOnIce hibernation

2014-04-30 Thread Julien Muchembled
Le 04/30/14 13:07, Michael Biebl a écrit :
 Am 30.04.2014 11:40, schrieb Julien Muchembled:
 
 systemd 208+ tries to detect whether there's enough swap space to hibernate 
 and
 this is irrelevant when TuxOnIce is used. I've just upgraded systemd from
 version 204 and hibernate key stopped working because of that. In other 
 words,
 this breaks package tuxonice-userui (which I maintain).

 Could you please add the attached patch to experimental branch ?

 I tried to push it upstream but there seems to be a hard policy to reject
 anything that is not in vanilla Linux:
  http://lists.freedesktop.org/archives/systemd-devel/2014-April/018963.html
 
 Personally I'm not too thrilled having a patch which is not going
 upstream anytime soon or even ever. We already have too many of them.
 That said, even if the popcon numbers of tuxonice are rather low, the
 patch looks simple enough.

This is kind of chicken-and-egg issue because the absence of such patch is 
another barrier for people who would like to use TuxOnIce.
TOI deserves better than this but there seems to be little interest by kernel 
developers for hibernation.
There was a serious attempt to merge it in 2009[1][2]
TOI is still maintained and I still hope its features will get merged in the 
future.

 If you are willing to keep the patch up-to-date for new upstream
 releases and handle bug reports related to this patch, I guess I'd be
 fine with merging it.

As a maintainer of tuxonice-userui, yes, of course.
But also because Linux and systemd are 2 components I always upgrade as soon as 
possible and I couldn't use my laptop without TOI.


[1] https://lkml.org/lkml/2009/5/6/249
[2] http://lists.tuxonice.net/pipermail/tuxonice-devel/2009-August/005537.html



signature.asc
Description: OpenPGP digital signature


Bug#746463: systemd: Add support for TuxOnIce hibernation

2014-04-30 Thread Julien Muchembled
Le 04/30/14 11:40, Julien Muchembled a écrit :
 systemd 208+ tries to detect whether there's enough swap space to hibernate 
 and
 this is irrelevant when TuxOnIce is used. I've just upgraded systemd from
 version 204 and hibernate key stopped working because of that. In other words,
 this breaks package tuxonice-userui (which I maintain).
 
 Could you please add the attached patch to experimental branch ?

Ah, I've just noticed that the systemd commits that check swap were backported 
yesterday to master (204-x).
So this patch for TOI should also go there.



signature.asc
Description: OpenPGP digital signature