1

In system settings -> Power, what does "inactive" mean in "suspend when inactive for xxx mins"?

If my laptop am running a hours long backup program while i am sleeping, is that considered "inactive"?

If my laptop is running xdotools to simulate keys and mouse actions while I am away, is that considered "inactive"?

Thanks.

1
  • Good question. Personally, I'd simply disable suspend altogether to make life easier. But for testing purposes , I'd change the time before the computer suspends, and just run an endless while loop with xdotool key Enter, or something May 9, 2015 at 22:48

2 Answers 2

1

Inactive

No user interaction happened for the period of time specified.

A user interaction is a mouse movement, a button click, or a keyboard key pressed/released.

The settings allows for multiple levels of inactivity. First the screen saver is shown, a little later you can suspend/hibernate or minimize electricity use (i.e. make a PCI board go to a sleep mode like because it is not used for long periods of time.)


On a server, this can be a problem. Some servers allow for a Wake On LAN (WOL) setting in their BIOS / OS, but that takes a little while and many times the client will not wait long enough for the server to wake up.

Also, certain things such as network traffic can be considered to be a user activity. But I do not think that X11 offers that option. My server such goes to its screen saver even if the network runs full time all day.

2
  • a long backup will be killed if I go to sleep? simulated key and mouse movement by xdotools counts as active or not?
    – Tim
    May 10, 2015 at 1:27
  • Yes. Disk activity is not generally considered a reason for not going to a suspend mode. Now some backup systems may be capable of preventing the OS from going to suspend/hibernate (A bit like Flash playing a movie prevents the screensaver from happening). Note, however, that a screensaver is safe. May 10, 2015 at 1:29
1

Not a direct answer to your question, but to prevent going into suspend (e.g. while running your backup script) there are inhibitors which can be set by gnome-session-inhibit or by directly calling the dbus method org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Inhibit

$ gnome-session-inhibit --help
gnome-session-inhibit [OPTION...] COMMAND

Execute COMMAND while inhibiting some session functionality.

  -h, --help        Show this help
  --version         Show program version
  --app-id ID       The application id to use
                    when inhibiting (optional)
  --reason REASON   The reason for inhibiting (optional)
  --inhibit ARG     Things to inhibit, colon-separated list of:
                    logout, switch-user, suspend, idle, automount
  --inhibit-only    Do not launch COMMAND and wait forever instead

If no --inhibit option is specified, idle is assumed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .