Running Xubuntu 18.04 LTS, I've set up hibernation with uswsusp, and it works flawlessly (s2disk).
Then, I've integrated s2disk to Systemd (systemctl hibernate) by overriding the systemd-hibernate service to
[Service]
ExecStart=
ExecStartPre=-/bin/run-parts -v -a pre /usr/lib/systemd/system-sleep
ExecStart=/usr/sbin/s2disk
ExecStartPost=-/bin/run-parts -v --reverse -a post /usr/lib/systemd/system-sleep
As expected, sudo systemctl hibernate works without any issues.
The problem appears when clicking the hibernate button on the power menu (enabled via polkit) fails - it looks like it worked, but when resuming the system freezes completely upon login.
I suspect that the button does not actually run the same commands as the other methods, but I couldn't find how to set it.
Update: This seems to be machine-specific. I have another PC, with very similar setup (same Xubuntu version and hibernation configuration - from here). On the other PC, it works correctly, but for the machine in question (it's a laptop), it still does not.
Update 2: I've tried to restart Plymouth upon resume (this is a solution to similar issues I've found), but it didn't help.
Type=oneshot? No idea why that should matter, though. – intelfx May 12 '18 at 17:50oneshot. Just to clarify,sudo systemctl hibernateworks as expected (no freezing at login or anything). Only from the XFCE powr dialog, the issue appears. – matan129 May 12 '18 at 19:03.desktopfile on your desktop be a suitable solution? – Fabby May 17 '18 at 19:56