Suspend shutdown on linux When sleep is not possible

reference

Linux system construction and operation technology for professionals

(12/18) Consideration because it became useless again while re-installing linux and playing with various things

** Consideration 1 ** Some programs save the session when you log out, but for some reason you cannot save the session. When suspend fails, the sleep service is always in the Active state. In other words, the sleep service becomes Active when the session is not saved successfully. ** Consideration 2 ** When I purged, I also deleted something important for session management. What I think is suspicious is the auto-start application (daemon). It feels like an NVIDIA graphics or network daemon. ** Consideration 3 ** If you look at it a little and it seems unlikely that it will recover, you can play with the linux kernel.

I tried various things, but I think the best way is to lower the linux kernel one by one and check it.

Ubuntu has a convenient tool called ukuu that allows you to install the kernel with a GUI.


sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt update
sudo apt install ukuu

View the error log

If you look at the corresponding time in / var / log / syslog, you can see it in one shot.

The following is a shutdown error.

Dec 16 17:09:34 PC kernel: [22044.679009] traps: xfsm-shutdown-h[10988] general protection fault ip:7f199cbaf98d sp:7ffdd3909ed0 error:0 in libc-2.27.so[7f199cb18000+1e7000]

When sudo systemctl suspend is also not possible

It is scolded as follows.

Failed to suspend system via logind: There's already a shutdown or sleep operation in progress

It means that it is already shut down or sleep. What is the meaning of this?

Therefore, check the status of the sleep unit with the systemctl command.

systemctl list-unit-files | grep sleep
> sleep.target
systemctl status sleep.target
>Loaded: loaded (/lib/systemd/system/sleep.target; static; vendor preset: enabled)
   Active: active since Mon 2019-12-16 19:47:47 JST; 20min ago
     Docs: man:systemd.special(7)

Turn off sleep if status is active.

sudo systemctl disable sleep

I think I can sleep with this.

sudo systemctl suspend

answer

It was caused by xfce4-power-manager and light-locker. It seems that the suspend process is interrupted because the display does not turn off due to a malfunction of the light-locker. I have other things to do, so I decided this was fine for the time being.

sudo apt purge xfce4-power-manger light-locker

If that doesn't work,

The Linux kernel will be killed. If you can't suspend, you probably can't shut down, so you can always reboot with this command. ** Be sure to check if there are any unsaved items before executing the command. ** **

su
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

It was no good again (12/17)

There seems to be some people who can not suspend after updating the linux kernel with bbs of archlinux , This may be a kernel problem. https://bbs.archlinux.org/viewtopic.php?id=250863

Recommended Posts

Suspend shutdown on linux When sleep is not possible
Solution when HDMI audio output is not possible on Ubuntu 20.04.1 LTS
When import tkinter is not possible on Mac OS X 10.11.3 (El Capitan) + pyenv + Python 3.5.1.
What to do when Japanese is not displayed on matplotlib
Build Python environment on Ubuntu (when pip is not the default)
Windows Subsystem for Linux is not displayed
python note: when easy_install is not available
The one who is not on DVD
Log when I was worried that I could not connect to Wi-Fi on Linux
I want to be notified when the command operation is completed on linux!
CPU usage is 100% when using pygame on Ubuntu 16.04
[Linux] When "| (pipe)" cannot be hit on CentOS7
When searching is not working in GAE's Datastore