Score:1

wpa_supplicant never shuts down when I switch off Ubuntu 22.10

ph flag

I have a running wpa_supplicant on Ubuntu 22.10 as also I can see when I run the commands:

$ systemctl list-unit-files --state=enabled
...
wpa_supplicant.service                                  enabled enabled
...
$ systemctl status wpa_supplicant
wpa_supplicant.service - WPA supplicant
     Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled; preset: enabled)
     Active: active (running) since Thu 2022-11-03 05:32:41 GMT; 1h 14min ago
   Main PID: 1159 (wpa_supplicant)
      Tasks: 1 (limit: 38321)
     Memory: 5.5M
        CPU: 24ms
     CGroup: /system.slice/wpa_supplicant.service
             └─1159 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
...

However when I switch off the machine I can see from the screen messages that it's trying to close down the wpa_supplicant job in a sort of loop forcing me to switch off the machine pressing manually. How can I fix that?

David avatar
cn flag
Shutting down the machine with the power button is never s good idea. How long are you wanting for this service to shut down?
Randomize avatar
ph flag
Max wait time 10 mins before I switch off.
David avatar
cn flag
Have you tried to kill the pid?
Randomize avatar
ph flag
I cannot access any shell at that point
David avatar
cn flag
There is no messages in the question so no would have know what the services were stopping it from shutting down. Details count. Now you have an answer it needs to be as an answer not part of the question so others will know the issue was resolved. At the bottom of the question there is an answer you own question button. Use this and put the answer in there for all to see.
Score:1
ph flag

Ok I have found the reason and solution. I have removed the packages "tlp" and "tlp-rdw" which optimize the battery life on a laptop. On my Desktop machine I assume it is not needed so I safely removed them and now I can switch off the machine quickly. It was causing the hang chain: Network manager wait on -> wpa_supplicant wait on -> tlp. I saw this after I waited for over 20 mins until a log message related to tlp has been shown.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.