Skip to main content

Fixing 100% cupsd 100% CPU on Ubuntu

·2 mins

Some time ago I started noticing the fans on my Linux machine running noisly even at idle. This happened intermittently, and each time I’d open up the process list and see cupsd pegged at 100% CPU. I’d kill it, it’d start itself back up and be fine for a while, but then it’d eventually come back. At some point I realized it was happening after having woken the computer from sleep. This was one of my long-time consistent annoyances as a Mac user: mysterious background daemons that would go haywire for unknown reasons and crank on the CPU until they’re killed (sometimes coming back on their own), but one that I hadn’t yet had at all in five years of primarily using Linux. Alas.

The results on Google were not especially helpful in sorting this out (which is why I’m writing this), and I was about to just write a script to kill cupsd automatically when resuming from suspend rather than dealing with it properly, until I stumbled on a StackExchange question about the CUPS Snap being installed automatically with Chromium. Sure enough, I had two copies of CUPS running, one the default system one, the other from a Snap.

I went ahead and uninstalled the Snap. I figured it might complain about uninstalling a Chromium dependency without uninstalling Chromium itself, but it just worked… and that was the end of the regular non-Snap cupsd process pinning my CPU every day. For some unknown reason, having two copies of CUPS running caused the non-Snap version to break. We’ll probably never know why!

I can no longer print to my actual printer in Chromium (which is odd since it works from Firefox, which is also a Snap…?), but that doesn’t matter to me. Reinstalling the Chromium Snap—and, I imagine, updating it—brings back the dreaded CUPS Snap, and there doesn’t seem to be a way to disallow that, but at least for now there’s a known culprit and a clear way to avoid it—installing a non-Snap Chromium, which is sadly a whole topic of its own.

Despite all that, using a Linux desktop computer every day has been incredibly smooth these past few years, and I’m thrilled that it seems to be becoming more popular.