Disable auto-suspend from command line

animortis

New Member


Messages: 2

Good afternoon all. FreeBSD newbie/Linux intermediate user here. Done a thousand web and forum searches but haven't found anything that quite fit what I was looking for.

My new FreeBSD 12.2 install will automatically suspend after a certain amount of time when I step away. Not really a fan of this, as this is a desktop/home server system and I'd like it to just keep running normally, maybe turning off the monitor. It also breaks a lot. Unfortunately, I don't see a way to do this in gnome and I haven't been able to find a way to set something in a config file to get it to stop doing this. Is there an entry in a system file I can change? Maybe a "flag = 1" to "flag = 0" sort of thing? Or even just a package for a quick gui fix? Thanks.

Edit: Changed 12.7 to 12.2.... Oops
 
Last edited:

Mjölnir

Daemon

Reaction score: 1,103
Messages: 1,578

My new FreeBSD 12.7 install will automatically suspend after a certain amount of time when I step away. Not really a fan of this, as this is a desktop/home server system and I'd like it to just keep running normally, maybe turning off the monitor. It also breaks a lot. Unfortunately, I don't see a way to do this in gnome [...]
So I assume you're running GNOME automatically from rc.conf(5). To find out if GNOME is initiating the suspend, please disable GNOME. Something like service gdm disable or sysrc -v gdm_enable=NO should do that.

Standard disclaimer:
  • install the docs: pkg install {de,en}-freebsd-doc, replace de with your native tongue, and point your favorite browser to /usr/local/share/doc/freebsd.
  • You may want to add message: "query '[%C/%n] %M'", to the ALIAS section of /usr/local/etc/pkg.conf, then read through all pkg message|less and apply the requested settings.
  • Instead of less(1), you may find sysutils/most more user-friendly. Beginners will prefer edit(1) (ee(1)), editors/aee or editors/nano over the old-school, UNIX'ish vi(1) (wizzard's choice).
  • The utilities sysutils/psearch or sysutils/portfind will help you to find available software in the ports(7) tree.
  • Some nice small utilities are self-contained in the ports(7) tree (most under sysutils) and are not available as packages.
  • If you mix self-built ports(7) & packages, adjust both to use the same version (quarterly vs. latest): /etc/pkg/FreeBSD.conf & portsnap(8) can not use the quarterly ports(7) tree branch, read the Handbook.
  • ports-mgmt/octopkg is a user-friendly graphical frontend to the pkg-ng package manager. It uses the Qt toolkit and runs on every GUI. AFAIK there is no Gtk-based counterpart.
  • Use sysrc(8) to safely edit system rc(8) files instead of editing rc.conf(5). It does some checks to prevent typos, and allows for advanced tricks like sudo sysrc moused_flags+=" -l 2" (note the space).
 

geos

Member

Reaction score: 1
Messages: 22

something on command like :
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
 
OP
A

animortis

New Member


Messages: 2

Yes, it appears gnome was deciding to do its own thing on suspend which I wasn’t expecting. It was my first gui on FreeBSD, so I saw some unexpected results and there was no option in gnome-settings itself (suspend option removed for some reason), so I assumed it was the OS handling it. Fixed with dconf in the end.
 
Top