Weird Printer Issue After Data Migration in macOS 12 Monterey

Tag: Engineering

Published on: 14 Oct 2022


TL;DR

If you migrated your data via Time Machine backup, but forgot to disable SIP in the new machine, it could cause issues preventing the printing system from working normally. To solve the problem, simply disable SIP.

Weird Issue with the new Laptop

After receiving my new MacBook Air with the M2 chip, I migrated my old data to it and started to use it as my main machine. However what bothers me the most is that AirPrint never works on this machine - whatever I print will stuck in the printing queue for some time and disappear afterwards without any notice. From the beginning I douted the problem lies within the printer itself but it is able to accept printing jobs happily from other devices within the network. Today I got some time so I decided to give it a closer look.

Quite obviously, the first thing I tried is to remove and re-add the printer via settings. However the following error keeps popping up showing it’s not possible to connect to the printer: printer_issue but pinging the printer works and I’m able to use the browser to access the management page of the printer.

Since macOS still relies on the CUPS server to manage the printers and jobs etc., I decided to directly check the Web interface of CUPS. To do so, enable the web access first:

cupsctl WebInterface=yes

Then, go to http://localhost:631 and you will be able to see the home page of CUPS.

Things look good so far, but it got interesting when I click on Printers, I was shown with Internal Server Error. The same also happens for other sections of the management page. Something must be run with the binaries so I checked also the server log:

cupsctl LogLevel=debug2
tail -f /var/log/cups/error_log

Here I spotted a line showing /usr/libexec/cups/daemon/cups-exec was called and terminated afterwards with signal 9 (aka SIGKILL). Calling it directly from the terminal also shows the same result. At this point it seems the OS is interferring, terminating the execution whenever it is executed. After some trial and errors I realized that it could be the system integrity protection and disabling it solved the problem.

Since I wasn’t able to find any solution anywhere, I decided to document this in case someone runs into the same issue in the future.


© Chengxin Wang. All rights reserved.