It was still working a monts or two ago. I know it was a working solution in july. But now i have freshly installed stable xfce edition (20.2) in my virtualbox, and this trick didnt work for me. I still can send my virtualbox to suspend.
Well, it is possible - I`m unable to test it on real hardware now. But there was visible GUI changes in OS when this solution was working: there was no option to select system sleep mode in System tab of XFCE Power Mager. Now this solution doesnt work for me and I still can choose sleep mode type. So i doubt it is a VM related issue.
Can you check it on a real hardware? Its just one file and you can delete it after testing without any consequences.
File like that with numbers in front are named like that to give a sequence number, so higher numbered ones will be used after the lower ones, so will override.
I didn’t even need to reboot, after i added that file with it’s contents, without editing the other file:
The options to suspend/hibernate disappeared from my “logout” GUI menu…
BRB after a reboot with this file active…
@kodirovshchik
Ok seems the option in the GUI is still missing after a reboot.
I had to completely reboot again after i removed that file for the change to take effect again.
So it’s IMHO just a config that will show/remove the option in the GUI’s, but not the functionality in the systemd units…
When you choose to suspend your VM, it must be issuing the suspend action via ACPI.
So i suggest to look into that part of your system
And I was copy/paste all lines in a new file. First three “##” lines too. And it doesnt work when they are here. I just deleted “##” lines and all works fine =) Thank you for your time.