[GNOME] Disable automatic hibernation

Alexander88207

Enthusiast
I have seen that the GNOME desktop try's to go into hibernation after a small AFK time.
The problem is that i comeback with a frozen system and i dont need hibernation either.

Unfortunately this is can not be disabled in the gnome-control-center.

I have used gsettings directly instead to disable hibernation in GNOME.

For AC powered devices (PC, etc..): gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout '0'
For Battery powered devices (Laptops, Notebooks etc..): gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout '0'
 
These commands don't work on my system, I guess because I have MATE desktop instead of GNOME. Luckily for me, the MATE control center does allow setting "Put computer to sleep when inactive for:" to "Never".
A few years ago I was able to use polkit-1 settings to disable suspend, but that soon stopped working, and it still doesn't work. I had the "crash-after-suspend" bug on my old HP laptop, and it about drove me crazy. I can't disable suspend on this laptop either, but at least this one can handle it, and doesn't crash afterwards.
 
I have seen that the GNOME desktop try's to go into hibernation after a small AFK time.
The problem is that i comeback with a frozen system and i dont need hibernation either.

Unfortunately this is can not be disabled in the gnome-control-center.

I have used gsettings directly instead to disable hibernation in GNOME.

For AC powered devices (PC, etc..): gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout '0'
For Battery powered devices (Laptops, Notebooks etc..): gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout '0'

I had the same problem and it was fixed by changing gdm to sddm. I think removing it disables hibernation. Now, after a long time of inactivity I can wake up my system again without problem.
 
I had the same problem and it was fixed by changing gdm to sddm. I think removing it disables hibernation. Now, after a long time of inactivity I can wake up my system again without problem.

I prefer a lite system and try to use the things that are installed with it as much as possible, including gdm. I would consider it a workaround rather than a fix. My goal was not to use the suspend properly i only wanted to turn it off.

Thank you for your suggestion anyway.
 
I prefer a lite system and try to use the things that are installed with it as much as possible, including gdm. I would consider it a workaround rather than a fix. My goal was not to use the suspend properly i only wanted to turn it off.

Thank you for your suggestion anyway.
I have been using Gnome on a desktop system. Although suspend is not needed, it happens automatically after a few minutes of inactivity, and because of the hardware the computer does not resume. I want to disable it. I tried service gdm disable, which delayed automatic suspend, but did not disable it completely. I have also used xfce, which does not suspend, but it doesn't have the features I want. So if anyone following this thread knows how to disable Gnome on FreeBSD 13, I shall be quite receptive to their advice.
 
I have been using Gnome on a desktop system. Although suspend is not needed, it happens automatically after a few minutes of inactivity, and because of the hardware the computer does not resume. I want to disable it. I tried service gdm disable, which delayed automatic suspend, but did not disable it completely. I have also used xfce, which does not suspend, but it doesn't have the features I want. So if anyone following this thread knows how to disable Gnome on FreeBSD 13, I shall be quite receptive to their advice.

The gesettings way dont work?
 
I’ve been struggling with the same issue and set the same gsettings to no avail. Those gsettings changes should work. After perusing the internet for an answer I thing I’ve found it… unfortunately, it’s not a fix but should be the reason why the stubborn issue persists. Apparently, GNOME suspends after 20 minutes of inactivity in order to comply with EU power regulations.
I’m in the US so it’s more irritating to me the gsettings Alexander88207 has cited don’t work due to government regulations mandated across the Atlantic ocean.
I don’t mind the 20 minute inactivity suspend by default but please give us users agency over our own power management.

Had to install XFCE in order to perform remote backups using Duplicity. GNOME kept suspending my backup due to keyboard/mouse inactivity :mad:
 
Alexander88207 .... did you ever resolve this? I'm experiencing the same issue with GNOME 41.4 on a FreeBSD 13.0 Release (P11) build.

Once my system enters the hibernate state I cannot recover it and must hard shutdown.

This has been such a disruptive issue that I'm strongly considering reverting back to a Slim/MATE configuration from GNOME.

Any help will be appreciated.
 

Attachments

  • Screenshot from 2022-05-06 10-42-43.png
    Screenshot from 2022-05-06 10-42-43.png
    45.2 KB · Views: 278
The power settings like many others as well, are user specific. Therefore in the terminal I call gsettings for each user separately.

sudo -u gdm dbus-launch gsettings set org.gnome.desktop.session idle-delay 0
sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'

sudo -u rolf dbus-launch gsettings set org.gnome.desktop.session idle-delay 0
sudo -u rolf dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
sudo -u rolf dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'

sudo -u just_another_user dbus-launch gsettings set org.gnome.desktop.session idle-delay 0
sudo -u just_another_user dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
sudo -u just_another_user dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'

etc.

In addition I had also problems with fast user switching and recovering from the screensaver (perhaps the same issue), and I disabled this as well on a per user basis:

sudo -u gdm dbus-launch gsettings set org.gnome.desktop.screensaver lock-enabled false
sudo -u gdm dbus-launch gsettings set org.gnome.desktop.lockdown disable-user-switching true
sudo -u gdm dbus-launch gsettings set org.gnome.desktop.screensaver user-switch-enabled false

sudo -u rolf dbus-launch gsettings set org.gnome.desktop.screensaver lock-enabled false
sudo -u rolf dbus-launch gsettings set org.gnome.desktop.lockdown disable-user-switching true
sudo -u rolf dbus-launch gsettings set org.gnome.desktop.screensaver user-switch-enabled false

...

In the latest packages we have already GNOME 42, and it comes with gdm-42. Upto then we stuck with the outdate gdm-3.28. I did not come to check the power, screensaver and user-switching issues with gdm-42, but it may well be that these are resolved now, like other issues have been resolved.

In order to switch to the latest packages, you want to add the configuration file /usr/local/etc/pkg/repos/FreeBSD.conf:
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
}

Then call # pkg upgrade.
 
The power settings like many others as well, are user specific. Therefore in the terminal I call gsettings for each user separately.

sudo -u gdm dbus-launch gsettings set org.gnome.desktop.session idle-delay 0
sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'

sudo -u rolf dbus-launch gsettings set org.gnome.desktop.session idle-delay 0
sudo -u rolf dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
sudo -u rolf dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'

sudo -u just_another_user dbus-launch gsettings set org.gnome.desktop.session idle-delay 0
sudo -u just_another_user dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
sudo -u just_another_user dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'

etc.

In addition I had also problems with fast user switching and recovering from the screensaver (perhaps the same issue), and I disabled this as well on a per user basis:

sudo -u gdm dbus-launch gsettings set org.gnome.desktop.screensaver lock-enabled false
sudo -u gdm dbus-launch gsettings set org.gnome.desktop.lockdown disable-user-switching true
sudo -u gdm dbus-launch gsettings set org.gnome.desktop.screensaver user-switch-enabled false

sudo -u rolf dbus-launch gsettings set org.gnome.desktop.screensaver lock-enabled false
sudo -u rolf dbus-launch gsettings set org.gnome.desktop.lockdown disable-user-switching true
sudo -u rolf dbus-launch gsettings set org.gnome.desktop.screensaver user-switch-enabled false

...

In the latest packages we have already GNOME 42, and it comes with gdm-42. Upto then we stuck with the outdate gdm-3.28. I did not come to check the power, screensaver and user-switching issues with gdm-42, but it may well be that these are resolved now, like other issues have been resolved.

In order to switch to the latest packages, you want to add the configuration file /usr/local/etc/pkg/repos/FreeBSD.conf:
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
}

Then call # pkg upgrade.
I'm currently running FreeBSD 13.2 STABLE, and I have the same issues. This seems to correct it, but this is still an issue. Further, logging out leaves you with a blank screen as it doesn't not return to a login window.
 
I am currently trying out Gnome on FreeBSD. Better than expected. I am using sddm for login. It has not those problems. So using that for a temporary workaround ;-)

Sorry: The above does not solve the power off issue. But it solves the logout problem.
 
For the record, I dumped Gnome and moved to i3. I enjoy being able to configure absolutely everything, and I don't have a huge memory hog running on the system.
 
I had the same issue as well. I'm now using openbox, lxqt, plasma, xfce on my systems. Basically anything other than gnome for now.
 
I am currently trying out Gnome on FreeBSD. Better than expected. I am using sddm for login. It has not those problems. So using that for a temporary workaround ;-)

Sorry: The above does not solve the power off issue. But it solves the logout problem.
I have now installed the Budgie Desktop a recently added enviroment in the ports tree. Gnome based, but it seems to work very well.
 
Back
Top