Slow shutdown on Ubuntu 16.04 LTS (Stopping thermal daemon/running fit make remote CUPS printers)
Solution 1
I found that the daemon responsible for the CUPS remote printers is the cups-browsed service.
When shutting down, it has a time out of 1m 30s. Stopping this service causes the shutdown process to take only few seconds.
I disabled it using this command line on Ubuntu GNOME 16.04:
sudo systemctl disable cups-browsed.service
And my shutdown process ends in a few seconds.
I got the idea from this Ask Ubuntu answer
Solution 2
If you depend on network printers, you could simply make systemd a bit more aggressive in stopping the process. By default, it waits up to 1m30s before forcefully shutting things down, but you can just do
$ sudo systemctl edit cups-browsed.service
and enter
[Service]
TimeoutStopSec=10
to set the timeout down to 10. Then a
$ sudo systemctl daemon-reload
should make it take effect (or restart your computer).
This works great for me at least.
EDIT: According to Xiaodong Qi's answer, cups-filters 1.11.4 has a fix for this, so upgrading past 17.04 Zesty (which has cups-filters 1.13.4) should be the simplest fix, though as commenters point out this workaround may still be needed :(
Solution 3
I have got the same Problem. It occurred after clean install Ubuntu 16.04. Finally I figured out, after lots of troubleshooting, that (after disable the Ubuntu boot splash screen) a certain stop-job was running that made the shutdown slow. (Thanks to Alex!) Then I got this error report:
a stop job is running for make remote cups printers available locally
Then I tried this:
sudo systemctl stop cups-browsed.service
sudo systemctl disable cups-browsed.service
To verify:
sudo systemctl status cups-browsed
sudo systemctl is-enabled cups-browsed
and it finally worked! Shutdown was now as good and fast as ever. (You can find this troubleshooting on: "The Annoying Cups Browsed" at the ec-cwang´s Blog!)
This might be important for those this solution is not helpful: How to find out your running stop jobs, just look up: "How do I disable the boot splash screen" on Ask Ubuntu. Then, if you start Ubuntu you get the typical Linux running command signs. If you shut Ubuntu down, mention the output. It shows you at the end what kind of stop job slows down your shutdown procedure.
Solution 4
I had a similar problem. After checking everything, I found out that if uncheck "enable wireless" (right button on wifi icon), and restart, it takes 5 seconds. If i leave wireless active shutdown takes about 1 minute.
I have a USB wifi adapter TP-LINK. Hope it helps you.
Solution 5
Almost identical problem after clean update from 15.10. I have finetuned different programs/properties including made an attemmpt installing my wifi cup printer. Most seems to work, but shutdown takes more then 3 minutes. Pressing f12 shows end endless textloop: OK Start showing plymouth reboot screen OK Stopped thermal daemon service. Can I somehow get a log of the shutdown proces? 2: SOLVED. After installing the printer correctly everything works.
Related videos on Youtube
ijustupdatednowwhat
Updated on September 18, 2022Comments
-
ijustupdatednowwhat over 1 year
After a clean install of Ubuntu 16.04 LTS, I am experiencing very slow shutdowns compared with 15.10. There seems to be one of two processes that hang upon shutdown. Startup is not affected at all. When pressing (esc) the following are shown. Either:
"Stopping thermal daemon services" hangs, or "A stop job is running for remote CUPS printers available locally", before a timer to 1 min 30 seconds is up, after which the machine finally shuts down.
Are there any other people experiencing this? This is most odd. What could be the reasons behind these two hangs?
-
Xiaodong Qi about 7 yearsPlease check my recent solution as this bug has been fixed with
cups-filters
v1.11.4-1 yet not released in the Ubuntu 16.04 official repository. Hope this helps.
-
-
ijustupdatednowwhat about 8 yearsThank you very much, I will try this when I have upgraded again (currently downgraded back to 15.10 due to other issues)
-
jvriesem almost 8 yearsThis worked for my non-clean 16.04 install! :-)
-
Kaos over 7 yearsI think 2 seconds is enough
-
xamox over 7 yearsThis was happening for a while, tested a few things like apport on/off, etc. This actually worked, thanks!
-
unhammer over 7 yearsProbably; I have it set to 5 myself. It depends on how conservative you want to be (e.g. if you click "print" and immediately shut down, who knows if that SIGKILL could drop a slow print job – OTOH most people might expect to have to wait a bit with shutting down after clicking print).
-
Rajesh Paul over 7 yearsThis works only for the next shutdown. Doesn't persist.
-
Rajesh Paul over 7 yearsThis works only for the next shutdown. Doesn't persist.
-
unhammer over 7 yearsRajesh Paul, that's odd; does
cat /etc/systemd/system/cups-browsed.service.d/override.conf
show the same contents as above? Is this also on Ubuntu 16.04? -
unhammer over 7 yearsFor some reason, the "code" formatting here turns some of my /-symbols into garbage; you can try
cd /etc/systemd/system/cups-browsed.service.d && cat override.conf
-
phil294 about 7 yearsvery likely the solution, since
.. stop cups-browsed.service
takes ages in the console. -
unhammer almost 7 yearsDoes that mean the bug is no more in 17.04, making these workarounds unnecessary?
-
Xiaodong Qi almost 7 yearsI haven't tried 17.04, but if you find the version number of CUPS-filter is newer than 1.11.4, the problem with CUPS should be fixed and then you don't need to go over the workaround.
-
unhammer almost 7 yearspackages.ubuntu.com/zesty/cups-filters seems that way =D
-
Ali almost 7 yearsI think disabling it altogether is not the solution if you really need this service. In my opinion the solution is given in unhammer's answer.
-
Ali almost 7 yearsI think disabling it altogether is not the solution if you really need this service. In my opinion the solution is given in unhammer's answer.
-
Ali almost 7 yearsAccording to cups-browsed causes shutdown hang/delay in Ubuntu 16.04 has been fixed by now in 16.04, yet it still hangs. I double checked, and I have the "fixed" package install. Weird. In my opinion the solution is given in unhammer's answer; that helped me.
-
Ali almost 7 yearsAccording to cups-browsed causes shutdown hang/delay in Ubuntu 16.04 has been fixed by now in 16.04, yet it still hangs. I double checked, and I have the "fixed" package install. Weird. In my opinion the solution is your answer; it really helped me.
-
ben almost 7 yearsNote about the "EDIT", this still happens in Zesty (at least on my dell XPS)
-
Xiaodong Qi almost 7 yearsMy personal guess is there might have been multiple issue with CUPS, or the fix doesn't really fix the problem for a broader case. The fixed bug is to shut down the service once the computer verified the printing service based on my understanding. @unhammer's answer basically set up a short shutdowntime if the service is still running when shutting down the computer. I'll report this to developers. Thanks!
-
Xiaodong Qi almost 7 yearsOk, bug reported here again. I appreciate if people encountered this issue after the last fix can report there. Thanks!
-
BenR about 6 yearsThis is working on 17.10
-
Enterprise over 4 yearsFYI: still an issue in Eoan 19.10