4

I have Ubuntu 17.10. When I enable "Power Saving / Blank screen" and screen locks after N minutes, all running applications shut down. Is it normal? If no how can I fix it?

a153
  • 63
  • 1
  • 8

2 Answers2

2

You may be experiencing the problem described in this question, which I asked in response to your question because your question had attracted comments that did not address the problem.

In my case, the problem was that the Wayland X server was crashing immediately after blanking the screen. The solution was to switch to the legacy Xorg server, by choosing "Ubuntu on Xorg" as the session type when logging in. You do this by clicking the gear icon next to the "Sign In" button on the login screen, after selecting your user from the user list.

JKna
  • 93
1

Reference: https://help.ubuntu.com/stable/ubuntu-help/power-suspend.html

When you suspend the computer, you send it to sleep. All of your applications and documents remain open, but the screen and other parts of the computer switch off to save power. The computer is still switched on though, and it will still be using a small amount of power. You can wake it up by pressing a key or clicking the mouse. If that does not work, try pressing the power button.

Some computers have problems with hardware support which mean that they may not be able to suspend properly. It is a good idea to test suspend on your computer to see if it does work before relying on it.

First check if it's acting the way it should. The Official Documentation is a great resource for that.

If there is a problem, start by looking at your logging to understand what's happening. dmesg makes it easy. It grabs things from /var/log so you don't have to poke around as much.

user@hostname:~ $ dmesg
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Initializing cgroup subsys cpuset

You can also use grep to look for log entries relating to power stuff. This shows the format difference for syslog from grep. dmesg is counting the time from startup, so 5.000000 would be five seconds after the kernel starts.

user@hsotname:~ $ sudo cat /var/log/syslog | grep -iE "power|sleep|shutdown"
Jan 15 21:56:49 hostname systemd[11559]: Starting Shutdown.
Jan 15 21:56:49 hostname systemd[11559]: Reached target Shutdown.

Reference: https://help.ubuntu.com/community/LinuxLogFiles

Reference: https://unix.stackexchange.com/questions/37313/how-do-i-grep-for-multiple-patterns

musicman1979
  • 1,167
  • 1
  • 10
  • 26