Bug 73122 - logind claims that hibernate is supported even if there is no swap
Summary: logind claims that hibernate is supported even if there is no swap
Status: RESOLVED WORKSFORME
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-29 14:00 UTC by post+fdo
Modified: 2014-01-11 16:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description post+fdo 2013-12-29 14:00:31 UTC
I do not have a swap partition set up for my system. Nevertheless, logind claims (in its d-bus interface) that hibernation is supported, which is clearly wrong.

This is a regression compared to plain upower, which correctly recognizes that I don't have swap and sets its d-bus properties appropriately.
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-01-11 15:30:55 UTC
I have no swap here, so suspend is possible, but not hibernation.

$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanSuspend
('challenge',)
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHibernate
('na',)

$ sudo swapon -av
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHibernate
('challenge',)

$ sudo gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHibernate
('yes',)

Quoting http://freedesktop.org/wiki/Software/systemd/logind/: "If "na" is returned the operation is not available because hardware, kernel or drivers do not support it."

I see no bug here. I'm closing this, because the code looks correct and rather straightforward. If you have a specific example where this doesn't work (with recent git), please reopen with some more details.
Comment 2 post+fdo 2014-01-11 15:37:56 UTC
I get

$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanHibernate
('yes',)

even though I have no swap:

$ cat /proc/swaps 
Filename                                Type            Size    Used    Priority

This is with systemd 204 on Debian testing.
Please tell me which other details you need.
Comment 3 Zbigniew Jedrzejewski-Szmek 2014-01-11 15:46:29 UTC
(In reply to comment #2)
>> ... with recent git ...
> This is with systemd 204 on Debian testing.
Sorry, 204 is ancient history for the upstream bug tracker. With a bit of luck http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708 will be resolved soon and Debian can move to something more recent.
Comment 4 post+fdo 2014-01-11 16:00:24 UTC
I see. I'll re-test this when/if Debian has a more recent version, and report my findings here. Thanks for your replies.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.