<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:zbyszek@in.waw.pl" title="Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>"> <span class="fn">Zbigniew Jedrzejewski-Szmek</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Do not offer hibernate with encrypted swap"
href="https://bugs.freedesktop.org/show_bug.cgi?id=23196">bug 23196</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEEDINFO
</td>
<td>NEW
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Do not offer hibernate with encrypted swap"
href="https://bugs.freedesktop.org/show_bug.cgi?id=23196#c33">Comment # 33</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Do not offer hibernate with encrypted swap"
href="https://bugs.freedesktop.org/show_bug.cgi?id=23196">bug 23196</a>
from <span class="vcard"><a class="email" href="mailto:zbyszek@in.waw.pl" title="Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>"> <span class="fn">Zbigniew Jedrzejewski-Szmek</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=23196#c32">comment #32</a>)
<span class="quote">> And the setting has now migrated to systemd. Is this still a problem?</span >
I think the issue is still valid, but before we add code to systemd, we need to
have a full picture of how this is supposed to work, supporting all cases:
1. no encryption -> hibernate OK
2. encryption with random key -> hibernate not OK
3. encryption with static key -> hibernate OK
I'd prefer not to add explicit configuration unless we really cannot make it
work otherwise. For encrypted devices udev has:
E: UDISKS_DM_TARGETS_COUNT=1
E: UDISKS_DM_TARGETS_LENGTH=624637274
E: UDISKS_DM_TARGETS_START=0
E: UDISKS_DM_TARGETS_TYPE=crypt
It would be necessary to "drill down", from the swap device, all the way to the
bottom. If any of the devices is encrypted with a random key, hibernation is
not possible. We could then check if the device has a random key by checking in
/etc/crypttab. Supporting crypt devices configured through other means would be
not supported (they would be ignored for the purposes of those checks).
BTW, I think that the checks as currently implemented in dk-p are overly
restrictive, because the kernel will always use the first partition in
/proc/swaps for hibernation, so there's no need to loop over devices.
As a temporary fix, with systemd, if you want to disable hibernation, it should
be enough to add 'HibernateMode=disabled' to /etc/systemd/sleep.conf.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>