gnome-shell-extension-hibernate-status
gnome-shell-extension-hibernate-status copied to clipboard
Advice for Ubuntu 24.04 users
refer to: https://www.reddit.com/r/Kubuntu/comments/1c2frkd/enabling_hibernation_on_2404/ cat
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions" ||
action.id == "org.freedesktop.upower.hibernate" ||
action.id == "org.freedesktop.login1.handle-hibernate-key" ||
action.id == "org.freedesktop.login1.hibernate-ignore-inhibit")
{
return polkit.Result.YES;
}
});
into /etc/polkit-1/rules.d/10-enable-hibernate.rules
I don't quite understand this as I'm just a user. Anyway it really helps to get this extension working.
I'm a noob too but this will have zero affects if you don't install polkitd-pkla
on Ubuntu. And you have to because it is not installed by default. The article is Kubuntu/KDE related. May other Ubuntu flavours contains it but not Ubuntu.
Also the shared script won't enable hibernation in general. It is just a policy kit which is a set of rules and defines the requirements of showing the hibernate option in the system menu. So it won't fix or enable the actually bloody buggy hibernation function. Nowadays Ubuntu use swap file instead of a partition and even with the default parameters it is broken af. Not kidding.
If you want a properly working hibernation under Ubuntu 24.04 read the following article. It is detailed and I can confirm it is properly working atm. May it will become outdated if Canonical finally fix the hibernation related issues. But right now it is accurate.
After the upgrade on vanilla Ubuntu with GNOME, I had this issue: systemctl hibernate error: "Call to Hibernate failed: Invalid argument"
when doing systemctl hibernate
.
The solution at comments #9 and 10, echo MAJ:MIN > /sys/power/resume
worked for me. Then, hibernation triggered again and the buttons came back.
This is actually fixed in -proposed, friggin finally. How was this so broken. Fix was really easy (in hindsight of course 8) )