[EN] A hang on reboot/shutdown when HP printers are installed on Ubuntu/Debian
This post is about how to bypass the problem of having an extremely painful hang (1min 30s) during reboot/shutdown when HP printers are installed on Ubuntu/Debian.
It prints out the message occasionally:
A stop job is running for make remote CUPS printers available locally.
The hang is basically caused by the service
cups-browsed, which does three main jobs: (1/2) to browse Bonjour/CUPS packets of remote printers and create/remove local raw queues pointing to these printers, (3) to broadcast local queues with the CUPS protocol. The details are described in this link.
I didn’t understand why it requires too much time when the service is going to be terminated. Perhaps this bypassing can cause some unexpected problems if there are on-going printer jobs on the local queue.
Open the file
Add the line
TimeoutStopSec = 1in the
Servicesection, which limits the maximum waiting time from 1m 30s to 1s.
[Unit] Description=Make remote CUPS printers available locally After=cups.service avahi-daemon.service Wants=cups.service avahi-daemon.service [Service] ExecStart=/usr/sbin/cups-browsed TimeoutStopSec=1 [Install] WantedBy=multi-user.target