0

Everything was working fine, but suddenly i can't shutdown my ubuntu system. I've tried manually and from terminal but there is no difference. I also tried to change the grub file : sudo gedit etc/default/grub -made it so it looks like this- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force" but nothing changed.

I also tried GRUB_CMDLINE_LINUX_DEFAULT="" and trying to see which file blocks the shutdown after shutting down the system but in the end it showed Reached target Shutdown and immediately the screen turned black but the power was still on and the only way to shut it down was to press the power button for a long time.

After editing the etc/default/grub file i run the command sudo update-grub in both situations

The only thing i did was to change the root password to my system and then locking it again as it was by default. I don't know how this might affected my system.

Thank you in advance

==================================Edited====================================

The journalctl --system -b -1 command: https://pastebin.com/4J3zsxRg

2
  • I think the edited post answers your question. Dec 7, 2021 at 11:26
  • You pasted the journal incorrectly, there are redundancies and it basically only contains the first few lines. I edited my answer with a method for sharing the complete journal.
    – NovHak
    Dec 7, 2021 at 17:47

1 Answer 1

0

From man bootup :

SYSTEM MANAGER SHUTDOWN
       System shutdown with systemd also consists of various target units with some minimal ordering structure applied:

                                             (conflicts with  (conflicts with
                                               all system     all file system
                                                services)     mounts, swaps,
                                                    |           cryptsetup/
                                                    |           veritysetup
                                                    |          devices, ...)
                                                    |                |
                                                    v                v
                                             shutdown.target    umount.target
                                                    |                |
                                                    \_______   ______/
                                                            \ /
                                                             v
                                                    (various low-level
                                                         services)
                                                             |
                                                             v
                                                       final.target
                                                             |
                       _____________________________________/ \_________________________________
                      /                         |                        |                      \
                      |                         |                        |                      |
                      v                         v                        v                      v
           systemd-reboot.service   systemd-poweroff.service   systemd-halt.service   systemd-kexec.service
                      |                         |                        |                      |
                      v                         v                        v                      v
               reboot.target             poweroff.target            halt.target           kexec.target

       Commonly used system shutdown targets are emphasized.

       Note that systemd-halt.service(8), systemd-reboot.service, systemd-poweroff.service and systemd-kexec.service will transition the system and server manager (PID 1) into the second phase of
       system shutdown (implemented in the systemd-shutdown binary), which will unmount any remaining file systems, kill any remaining processes and release any other remaining resources, in a
       simple and robust fashion, without taking any service or unit concept into account anymore. At that point, regular applications and resources are generally terminated and released already,
       the second phase hence operates only as safety net for everything that couldn't be stopped or released for some reason during the primary, unit-based shutdown phase described above.

Which means reaching shutdown.target isn't enough. Generally, poweroff.target is the goal. Maybe something is preventing a umount() ? Once you boot back your system, you should check the system journal of your previous boot, especially towards the end : journalctl --system -b -1

Did you try waiting for some time, say, 5-15 minutes, to see if it doesn't ultimately power off ?

EDIT : To get and share the full journal of the previous boot :

  1. Type journalctl --system -b -1
  2. Once it displays, I'm assuming the default less pager is used : type s (lowercase), it will ask you for a filename to save the full journal in the current directory, type a name of your choosing and press enter
  3. Open the file with your preferred graphical text editor, mine is Emacs, but you may feel more comfortable with another one such as gedit
  4. Select all text, copy, and paste where needed. This will probably be too big to paste in your question, hence my advice to paste to a service such as Pastebin

REEDIT : I should have noticed earlier that you mentioned you set a password for the root user. YOU'RE NOT SUPPOSED TO DO THIS. On Ubuntu, for security reasons, root shall not have a password, and you're supposed to reach root privilege through the sudo command from an admin user session.

While I suppose setting a password for root should not be the cause of your problem per se, I can't say I'm sure about what would happen if you open a session as root... maybe there's some Ubuntu idiosyncrasy that will pose problems upon shutdown.

4
  • I added the output of the command in my question. Yes of course i waited 30 minutes and nothing happened. I also think that the last time i shut it down it showed up the poweroff.target in the end but i'm not sure because after that immediately the screen turns to black. Dec 7, 2021 at 11:25
  • I added the whole output from the journalctl --system -b -1 command with Pastebin as you suggested. Thank you very much. Dec 9, 2021 at 4:22
  • Looking at your journal, poweroff.target has been reached, so everything looks normal, but your computer still doesn't power off ? Looks like a transient BIOS issue to me... Did you have problems such as beeps at boot, the computer's time being incorrect at startup, or something electricity-related ? Do you have dual boot on this computer, and if yes, does the problem appear on the other OS too ?
    – NovHak
    Dec 9, 2021 at 15:33
  • Yes i have dualboot with windows 10, i use them very rarely. I don't have the same issue there the shutdown is working fine. Also i don't have any beep or any problem with the startup. If there is a problem with the BIOS what can i do to fix it? Dec 16, 2021 at 23:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .