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.
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.
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.
(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.
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.