Slow shutdown on Ubuntu 16.04 LTS (Stopping thermal daemon/running fit make remote CUPS printers)

87,036

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.

Share:
87,036

Related videos on Youtube

ijustupdatednowwhat
Author by

ijustupdatednowwhat

Updated on September 18, 2022

Comments

  • ijustupdatednowwhat
    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
      Xiaodong Qi about 7 years
      Please 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
    ijustupdatednowwhat about 8 years
    Thank you very much, I will try this when I have upgraded again (currently downgraded back to 15.10 due to other issues)
  • jvriesem
    jvriesem almost 8 years
    This worked for my non-clean 16.04 install! :-)
  • Kaos
    Kaos over 7 years
    I think 2 seconds is enough
  • xamox
    xamox over 7 years
    This was happening for a while, tested a few things like apport on/off, etc. This actually worked, thanks!
  • unhammer
    unhammer over 7 years
    Probably; 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
    Rajesh Paul over 7 years
    This works only for the next shutdown. Doesn't persist.
  • Rajesh Paul
    Rajesh Paul over 7 years
    This works only for the next shutdown. Doesn't persist.
  • unhammer
    unhammer over 7 years
    Rajesh 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
    unhammer over 7 years
    For 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
    phil294 about 7 years
    very likely the solution, since .. stop cups-browsed.service takes ages in the console.
  • unhammer
    unhammer almost 7 years
    Does that mean the bug is no more in 17.04, making these workarounds unnecessary?
  • Xiaodong Qi
    Xiaodong Qi almost 7 years
    I 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
    unhammer almost 7 years
  • Ali
    Ali almost 7 years
    I 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
    Ali almost 7 years
    I 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
    Ali almost 7 years
    According 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
    Ali almost 7 years
    According 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
    ben almost 7 years
    Note about the "EDIT", this still happens in Zesty (at least on my dell XPS)
  • Xiaodong Qi
    Xiaodong Qi almost 7 years
    My 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
    Xiaodong Qi almost 7 years
    Ok, bug reported here again. I appreciate if people encountered this issue after the last fix can report there. Thanks!
  • BenR
    BenR about 6 years
    This is working on 17.10
  • Enterprise
    Enterprise over 4 years
    FYI: still an issue in Eoan 19.10