[SOLVED by OP] Zorin 17 - Cannot prevent my computer from suspending

I am using an Asus VivoBook X512JA_R564JA with an Intel® Core™ i3-1005G1 CPU @ 1.20GHz × 4, Mesa Intel® UHD Graphics (ICL GT1), 128.0 GB SSD, 20 GB of RAM. Zorin 17, 6.2.0-39-generic.

All updates are current.

I cannot prevent the machine from sleeping/going into suspend.

Settings>Power:

Settings>Power>Screen Blank - 15 minutes

Settings>Power>Automatic Power Saver - OFF

Settings>Power>Automatic Suspend - OFF

Settings>Privacy:

Settings>Privacy>Screen>Blank Screen Display - 15 minutes

Settings>Privacy>Screen>Automatic Screen Lock - OFF

Settings>Privacy>Screen>Automatic Screen Lock Display - 3 Minutes (grayed out)

Settings>Privacy>Screen>Lock Screen On Suspend - OFF

Using dconf Editor, I have set up org.gnome.settings-daemon.plugins.power as follows:

ALS Sensor - disabled

idle-brightness - 30

idle-dim - enabled

lid-close-ac-action - blank

lid-close-battery-action - blank

lid-close-suspend-with-external-monitor - disabled

Power-button-action - interactive

power-saver-profile-on-low-battery - disabled

sleep-inactive-ac-timeout - 0

sleep-inactive-ac-type - nothing

sleep-inactive-batter-timeout - 0

sleep-inactive-bettery-type - nothing

After approximately 15 minutes, the external monitor starts to go to sleep, and eventually shuts off. Desired behavior.

However, around that time - the computer also goes into suspend mode, and any activity it was doing is also suspended (I run Logitech Media Server on my home server, and this computer acts as a client for it. The music stops).

If I use the keyboard and mouse to bring the computer out of suspend, I am successful - however, my ethernet connection will be lost, along with my external speakers as well. These are connected to a Dell D3100 dock, which is connected to this computer via USB. For more information on this, please see:

Additionally, I set sleep-inactive-ac-timeout to 0 per the description:

"The amount of time in seconds the computer on AC power needs to be inactive before it goes to sleep. A value of 0 means never."

When initially modifying this setting, the current value was set to 3600.

I have noticed that after the computer suspends and I bring it out of suspension - if I open org.gnome.settings-daemon.plugins.power in dconf Editor, the value I set to 0 has reset back to 3600.

Finally - I see no way to modify this behavior in the BIOS.

I would like to be able to prevent this machine from suspending, while at the same time having the external monitor go to sleep after about 15 minutes of inactivity. If that is impossible, I'd like to be able to prevent this machine from suspending; I'll turn off the monitor manually when I walk away from the computer.

Thanks in advance for assistance.

1 Like

Anything from this askubuntu thread help?:

That's weird that sleep-inactive-ac-timeout resets itself...

Let's try something... start dconf-editor as sudo:

sudo su
dconf-editor

... set sleep-inactive-ac-timeout to 0, then exit dconf-editor.

Then start up dconf-editor normally (from the icon) and check to be sure it's still 0.

Then let the machine sit for awhile. My thinking is that somehow the administrator-privilege account is triggering the suspend.

If that doesn't work, try in dconf-editor, at the top of org > gnome > settings-daemon > plugins > power, set the "active" slider to off and check whether it suspends.

sudo su will not allow me to save any changes; I get the following error:

(dconf-editor:3310): dconf-WARNING **: 15:09:31.081: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)



Started on this page, actually. As so much of the info was very old, I started with dconf Editor. I figure if this approach fails, I'll evaluate the other options and proceed. Thanks for the response.

In the previous screenshots I provided - I don't see the "active" slider you reference.


Huh, definitely something weird there... it worked on my machine.

The only error I get is:
** (dconf-editor:1345022): WARNING **: 18:11:53.458: night-light-monitor.vala:149: Impossible to get cached property from proxy, night-light mode disabled.

In this image:

... go back one to just org/gnome/settings-daemon/plugins/power/, the 'active' slider should be at top.

It might be that dbus-launch is borked... in which case, reinstalling:

sudo apt search dbus-launch
dbus-x11/focal-updates,focal-security,now 1.12.16-2ubuntu2.3 amd64 [installed,automatic]
  simple interprocess messaging system (X11 deps)

sudo apt install dbus-x11 --reinstall

... might do the trick.

Reinstalled dbus-x11; now able to make the changes as root in dconf-editor.

Unfortunately - the issue remains.

Referencing:

suspend - How do I disable my system from going to sleep? - Ask Ubuntu

Try the following:

Disable Suspend - sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Works, however - cannot remote into computer; computer is set for remote login and screen sharing in Settings>Sharing>Remote Desktop.

Unit is also very sluggish when bringing the monitor back online.

This is an Asus laptop - I open the lid, power it on, and close the lid to use it with an external monitor, so I figure let's try something different.

Reenable Suspend - sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

sudo nano etc/systemd/logind.conf

Change the following:

#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend

to:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore

save changes, shut down.

Power on - good startup, achieve a desktop.

Allow the screen to sleep.

Monitor turns off - computer continues to stay on. Running LMS as a test - music continues to play.

So, supposedly - the unit isn't suspended. The only thing changed for the suspend is the action of the lid.

Here's the problem - while the external monitor is off, I cannot use remote desktop into the computer. tells me immediately that the connection is closed:

Even stranger - I have Settings>power>Screen Blank - 15 minutes enabled. If I have a remote connection established, and I just turn the external monitor off without waiting for 15 minutes - connection closes, even though the computer hasn't entered into any sort of suspend/blank screen mode.

Doing a search revealed the following:

Added in the recommended extension - "Allow Locked Remote Desktop."

Settings>power>Screen Blank - 1 minute enabled.

Shut down, Powered back on.

tested - RESOLVED.

Resolution:

edit etc/systemd/logind.conf for the lid handle switch as previously mentioned, and enable Allow Locked Remote Desktop extension to be able to remotely log into the machine once the screen is off.

Mark this closed.

2 Likes