[Solved] laptop does not shutdown

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
peer
Posts: 493
Joined: 2017-03-26 10:14
Has thanked: 10 times
Been thanked: 25 times

[Solved] laptop does not shutdown

#1 Post by peer »

laptop: HP Pavilion G-series
os: Debian 12 XFCE

The shutdown process is not able to stop some processes:

Code: Select all

... job networking.service/stop running
... job networkmanager.service/stop running
... job wpa_supplicant.service/stop running
... job networking.service/stop running
After a while I get the following:

Code: Select all

[576.7-3785] systemd-shutdown[1] waiting for proces: 653 (Networkmanager), 654 (wpa_supplicant), 1723 (ifdown)
So it hangs and does not shutdown. I have to remove the battery to stop

What can be wrong and how can I solve this?
Last edited by peer on 2023-12-18 10:40, edited 1 time in total.

mrmazda
Posts: 418
Joined: 2023-06-02 02:22
Has thanked: 12 times
Been thanked: 49 times

Re: laptop does not shutdown

#2 Post by mrmazda »

Did shutdown ever work?

Is this a new installation?

Which type of connection do you use, wireless, or wired?

What steps did you take to try to shutdown?

When the error message and hang appear, and you press and keep pressed Ctrl-Alt-Del, does shutdown proceed with a shutdown or reboot?

peer
Posts: 493
Joined: 2017-03-26 10:14
Has thanked: 10 times
Been thanked: 25 times

Re: laptop does not shutdown

#3 Post by peer »

- shutdown did work in the past. The problem started last week
- this is an existing installation upgraded from debian 11
- wireless
- tried shutdown in xfce, power button and in terminal. Always the same problem. Googling and searching the forum did not lead to an answer.
- ctrl-alt-delete does not do anything

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2255
Joined: 2010-06-07 16:59
Has thanked: 43 times
Been thanked: 238 times

Re: laptop does not shutdown

#4 Post by FreewheelinFrank »

As a workaround, iwd may fix the issue.

https://bbs.archlinux.org/viewtopic.php?id=246942

Search for

Code: Select all

systemd-shutdown[1] waiting for process: (Networkmanager), (wpa_supplicant),  (ifdown)
for other instances of same problem and solution/workaround.

It seems to be a drop-in replacement for wpa_supplicant.

Not wanting to recommend anything risky without trying it myself, I tried switching myself, and it worked OK, at least in XFCE Testing with Connman.

Code: Select all

systemctl --now disable wpa_supplicant

Code: Select all

systemctl --now enable iwd
(Had to get root for the latter to work.)

And reboot.

This would seem to be easily reversible.

https://wiki.debian.org/WiFi/HowToUse

You may need a .conf file with Network Manager:

viewtopic.php?t=144729

Many other hits and useful information searching for Debian Forum & iwd.

peer
Posts: 493
Joined: 2017-03-26 10:14
Has thanked: 10 times
Been thanked: 25 times

Re: laptop does not shutdown

#5 Post by peer »

@FreewheelinFrank:
Thanks for your help!!
I looked at your suggestions and the first thing I tried to do was reconfiguring wpa-supplicant:

Code: Select all

sudo dpkg-reconfigure wpasupplicant
But this process also hangs. I got the message:

Code: Select all

could not execute systemctl: at /usr.bin/deb-systemd-ivoke line 145
Then I selected network-manager, network-manager-gnome and wpasupplicant in synaptic and tried to reinstall. This process also hangs and I got exactly the same error message.

I haven't tried the workaround because it seems hat there is something else that is causing the problem. I hope that someone can help me here firther.

undesign
Posts: 109
Joined: 2015-05-27 09:03
Has thanked: 8 times
Been thanked: 8 times

Re: laptop does not shutdown

#6 Post by undesign »

@peer: what kernel are you using? There was an issue with one of the late kernels, please take a look here: viewtopic.php?t=157738&sid=83a6c3bfbbc5 ... 48c9652247

Just boot with an older kernel and update your installation.

peer
Posts: 493
Joined: 2017-03-26 10:14
Has thanked: 10 times
Been thanked: 25 times

Re: laptop does not shutdown

#7 Post by peer »

the kernel is 6.1.0-15-amd64.
I will check the former kernel.
(At this moment I a making a backup so I will check later)
Last edited by peer on 2023-12-18 10:39, edited 1 time in total.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2255
Joined: 2010-06-07 16:59
Has thanked: 43 times
Been thanked: 238 times

Re: laptop does not shutdown

#8 Post by FreewheelinFrank »

peer wrote: 2023-12-18 09:22
I haven't tried the workaround because it seems hat there is something else that is causing the problem. I hope that someone can help me here firther.
Yes, the underlying problem is likely a kernel issue as undesign mentioned. It is a workaround. As this is an upgrade, I don't know if you will have an old kernel, or if you do, if it will work with the upgrade. Another option would be to try a newer kernel from backports. iwd is available if you are not able to find a working kernel, and it seems to be a direct replacement for wpa_supplicant, which doesn't seem to get on well with the kernel sometimes.

User avatar
sunrat
Administrator
Administrator
Posts: 7113
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 124 times
Been thanked: 608 times

Re: laptop does not shutdown

#9 Post by sunrat »

6.1.0.16 is in bookworm-updates now. It fixes the issues mentioned in the link undesign posted.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

peer
Posts: 493
Joined: 2017-03-26 10:14
Has thanked: 10 times
Been thanked: 25 times

Re: laptop does not shutdown

#10 Post by peer »

I tried kernel 6.1.0-13-amd64 and now the laptop does shutdown properly again.
Problem solved!

m4c-attack
Posts: 43
Joined: 2023-10-09 05:06
Has thanked: 51 times
Been thanked: 3 times

Re: [Solved] laptop does not shutdown

#11 Post by m4c-attack »

Dredging up an old thread in case my solution helps someone stuck in the mud... I was getting the same three networking-related services delaying shutdowns on my desktop. I finally remembered that I had recently inserted a cheap wireless USB adapter in the back of my device. Removing it stopped my device from hanging.

Post Reply