Score:0

Stop ubuntu (20.04 AND 21.10) from shutting down automatically from lock screen?

in flag

Ubuntu is now auto shutting down after some period if I do not log in (hard wired keyboard) i.e. if I leave the desktop in the lock screen.

I do not yet understand why.

It does not shutdown if I log in.

I have also notices that it the screen sleep fails for a while now (while logged in).

I have it set to auto-reboot on power failure and want it to behave as a server.

Something has changed in settings. Going away now and want desktop to autoreboot on power failures (it does) but then it seems to shut down if I don't log in to the desk top. What could be triggering this? How to debug? What setting?

Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal

Screenshot from

last -x

isn't clear to me. enter image description here

I am running through various tests but one thing I am wondering is if the "root" settings are coming in to play when in the log in screen and how I can view those easily if so?

UPDATE: This problem persists after update to

Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:    21.10
Codename:   impish

Still looking for ideas. It would be good to understand what is non-default and start removing that. I will basically have to start from scratch with a clean install if this persists.

UPDATE:

This seems relevant How to stop NetworkManager to put Ubuntu server to sleep? as I see this in the /var/log/syslog before the shutdown occurs

NetworkManager[1239]: <info>  [1642455626.3604] manager: sleep: sleep requested (sleeping: no  enabled: yes)

See this: https://www.unixtutorial.org/disable-sleep-on-ubuntu-server/

vanadium avatar
cn flag
Check Power settings: is you computer set to automatically suspend?
mathtick avatar
in flag
@vanadium no it is set to "off" i.e. no suspend automatically
André avatar
cn flag
@mathtick did you solve your problem? If so, what was the issue? I have a similar problem (automatic **reboot** from lock-screen). `journalctl -e -b -1` does not show any sign of fatal error. System hibernation/suspension is disabled.
mathtick avatar
in flag
I don't remember now. I think I had to give up. I have some note about turn on automatic login for a while.
mathtick avatar
in flag
And I have this in a note https://discourse.ubuntubudgie.org/t/lockscreen-not-working-after-update-to-21-10/5394/40
mathtick avatar
in flag
I'm on 22.04 now. And I *think* it's ok but not sure.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.