Cannot shutdown since upgrade [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Post Reply
VolvoBirkenstock
Growing Hen
Posts: 189
Joined: Sun Mar 31, 2013 5:34

Cannot shutdown since upgrade [Solved]

Post by VolvoBirkenstock » Sat Jan 27, 2018 23:31

Hello, Gurus of Sabayon.

I have a problem which I consider to be very serious. I updated/upgraded my desktop today, running sabayon-weekly, and the system will not shutdown. My system fails to shutdown if I attempt to shutdown from the Application Launcher, or if I "su root" in an xterm (e.g. "konsole") and then perform "shutdown -h now", "shutdown -r now" or "reboot".

There is a minor difference between the outcome of the above approaches. If I attempt to shutdown from the Application Launcher, I am logged off the system and presented with a login window. If I attempt to shutdown from an xterm after "su root" and then "shutdown -h now", nothing happens.

I see that /sbin/shutdown and /sbin/reboot are now both linked to /bin/systemctl.

Code: Select all

lrwxrwxrwx 1 root root 16 Jan 27 14:51 /sbin/reboot -> ../bin/systemctl
lrwxrwxrwx 1 root root 16 Jan 27 14:51 /sbin/shutdown -> ../bin/systemctl
I then performed "man systemctl" and noticed that I might be able to execute commands like

Code: Select all

systemctl reboot
systemctl poweroff
systemctl halt
When I execute "systemctl reboot" as root within an xterm, I see the following output:

Code: Select all

Failed to reboot system via logind: Unit reboot.target not found.
Failed to start reboot.target: Unit reboot.target not found.
When I execute "systemctl poweroff" as root within an xterm, I see the following output:

Code: Select all

Failed to power off system via logind: Unit poweroff.target not found.
Failed to start poweroff.target: Unit poweroff.target not found.
When I execute "systemctl halt" as root within an xterm, I see the following output:

Code: Select all

Failed to halt system via logind: Unknown method 'Halt' or interface 'org.freedesktop.login1.Manager'.
Failed to start halt.target: Unit halt.target not found.
Up until performing the upgrade today, I was able to dual boot. I do not know if I can still do that because I can't shutdown.

Can you please provide me with instructions for further information you might need, or instructions for how I can force a shutdown or reboot?

Thank you very much in advance.
Last edited by VolvoBirkenstock on Sun Jan 28, 2018 1:34, edited 1 time in total.

4fff618
Baby Hen
Posts: 11
Joined: Fri Jul 13, 2012 23:45

Re: Cannot shutdown since upgrade

Post by 4fff618 » Sat Jan 27, 2018 23:50

Hi, i had the same problem, searching online i found this:

https://unix.stackexchange.com/question ... off-target

but it didnt work for me, but then i tried:

Code: Select all

systemctl enable poweroff.target
and power off works!
.
.
.
but now i have a problem, when i turn on my machine later today, it boots only to CLI, and, for some reason, to an old version of the kernel (4.8 - i was in the 4.11), the recovery mode doesnt give me internet, and in the the normal mode the keyboard is unusable (it seems that the screen ir refreshing constantly and thats blocks some keys sometimes)

i have a solution for this problem: in recovery mode user kernel-switcher to change to kernel 4.14, and then install nvidia-drivers again using equo. If you not have internet in recovery mode do a systemctl restart NeworkManager.
It appears that was a problem with the Nvidia drivers update after all.
**sorry for my bad english**

VolvoBirkenstock
Growing Hen
Posts: 189
Joined: Sun Mar 31, 2013 5:34

Re: Cannot shutdown since upgrade

Post by VolvoBirkenstock » Sun Jan 28, 2018 1:34

Thank you very much, 4fff618 !!!

I ran the command

Code: Select all

systemctl enable poweroff.target
as root, and that fixed the issue. I want to note that the above systemctl command formed a soft-link from the ctrl-alt-del.target to the reboot.target in /lib/systemd/system/ on my desktop.

I also upgraded my laptop and want to note that the files in /lib/systemd/system/ with the following names are NOT soft-links, but are standalone files. The following files ARE also soft-links on my desktop, and it was my desktop that could not shutdown until now: ctrl-alt-del.target, default.target, runlevel0.target, runlevel1.target, runlevel2.target, runlevel3.target, runlevel4.target, runlevel5.target, runlevel6.target.

On my desktop, ctrl-alt-del.target soft-links to reboot.target. On my laptop, a diff between ctrl-alt-del.target and reboot.target illustrates no difference in file content.

Here is the list of all target soft-links on my desktop:

Code: Select all

lrwxrwxrwx 1 root root 13 Jan 27 14:51 ctrl-alt-del.target -> reboot.target
lrwxrwxrwx 1 root root 16 Jan 27 14:51 default.target -> graphical.target
lrwxrwxrwx 1 root root 15 Jan 27 14:51 runlevel0.target -> poweroff.target
lrwxrwxrwx 1 root root 13 Jan 27 14:51 runlevel1.target -> rescue.target
lrwxrwxrwx 1 root root 17 Jan 27 14:51 runlevel2.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Jan 27 14:51 runlevel3.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Jan 27 14:51 runlevel4.target -> multi-user.target
lrwxrwxrwx 1 root root 16 Jan 27 14:51 runlevel5.target -> graphical.target
lrwxrwxrwx 1 root root 13 Jan 27 14:51 runlevel6.target -> reboot.target
I am marking this thread as Solved.

Again, thank you very much!

gentmixer
Simple Hen
Posts: 59
Joined: Wed Jan 17, 2018 17:21

Re: Cannot shutdown since upgrade [Solved]

Post by gentmixer » Sun Jan 28, 2018 5:01

Hi...
There are only real files in /lib/systemd/.../ for managing kernel. Probably we are more interested in /usr/lib/systemd/.../ (really /lib64/; you have a 64bit system, I suppose). The systemd scripts located there aren't symlinks but real files too... You should look for the real "default.target", "shutdown.target" (and alike) in /usr/lib/systemd/user/ (because these are invoked by user). In the /usr/lib/systemd/system/ and /etc/systemd/ are located symlinks to them only. Two symlinks from different directories would invoke the same real file. The content of real script is important; symlinks are for purpose of administration.
Install maybe "locate" (mlocate) package, after "updatedb" should be easier to localize all files using terminal and to see them in file manager...
Your trouble was related to the mismatch of kernels, modules and drivers rather.
And I agree, "systemd" is complicated and works like a supervisor (more like a beast from Redmond). New developers generation want to create some matrix-like Linux...

Ryuno-Ki
Old Dear Hen
Posts: 494
Joined: Mon Feb 27, 2012 22:15
Location: Southern Germany
Contact:

Re: Cannot shutdown since upgrade [Solved]

Post by Ryuno-Ki » Tue Jan 30, 2018 20:39

According to Enlik, the following command helps on shutdown:

Code: Select all

systemctl daemon-reload
He mentioned, that there is „systemctl daemon-reexec” also but he hadn't toyed around with it, yet.

Enlik, would you elaborate? I take note to put it on the wiki later (this year).
German Wiki translator ◆ Want to contribute on the wiki? Ask the Bureaucrats!
Please, mark solved threads ◆ Posts unread and unansweredPackage requests

Post Reply