macOS Sonoma 14.4 CUPS not working: Bad file descriptor [Fixed]

macOS Sonoma 14.4 CUPS not working: Bad file descriptor

macOS Sonoma 14.4 CUPS not working: Bad file descriptor

In this guide, we will make you aware of a nifty workaround that should help you fix the issue of CUPS not working: Bad file descriptor error on macOS Sonoma 14.4.  This standards-based, open-source printing system from the Cupertino giant is aimed at its own OS, macOS, and some UNIX-like operating systems.

These CUPS use the Internet Printing Protocol (IPP) and provide System V and Berkeley command-line interfaces, a web interface, as well as a C API to manage printers and print jobs. It supports printing to both local (parallel, serial, USB) and networked printers. And the icing on the cake? The printers can be shared from one computer to another, even over the Internet.

Moreover, CUPS uses PostScript Printer Description (PPD) files to describe printer capabilities and beholds and a wide variety of generic and device-specific programs that will help you convert and print many types of files. To make the installation process a breeze, CUPS comes preloaded with drivers to support many Dymo, EPSON, HP, Intellitech, OKIDATA, and Zebra printers.

So owing to such a wide variety of useful functionalities in its arsenal. it’s been quite a handy tool for IT professionals. However, with the latest macOS Sonoma 14.1 update, the CUPS is not working along the expected lines and is instead giving out the Bad File Descriptor error.

What is the CUPS Bad File Descriptor Error on Mac

Here are a few interesting and useful observations and in-depth analysis regarding this error that will help you to understand this complex issue. Make sure you go through each of these observations.

  • cupsctl is seemingly printing “cupsctl: Unable to connect to server: Bad file descriptor”
  • cupsctl -h localhost:631 is working well and good, so there’s some silver lining in the dark clouds.
  • As soon as we restart cupsd (sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist; sleep 2; sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist), cupsctl tends to work. Then it fails again with the same error message.
  • After removing the socket “sudo rm /private/var/run/cupsd” (think it gets automatically recreated) – cupsctrl works for a few seconds, but it ten again fails and ends up throwing the same error.
  • It looks as if /private/var/run/cupsd gets broken by something at regular intervals. And this ‘something’ is what we need to catch and fix it. So let’s get started.

Fix macOS Sonoma 14.4 CUPS not working: Bad file descriptor

After going through numerous user reports, we found one possible link among most of them: they were using Microsoft Defender for Endpoint on their Mac. So to rectify this issue, you have to workarounds: either give it full access or take the extreme approach and uninstall it from your Mac. Here’s how both these tweaks could be carried out:

FIX 1: Give Full Disk Access to Microsoft Defender for Endpoint

  1. Launch System Settings and select Privacy and Security from the left-hand side.
  2. Then choose Full Disk Access and enable the toggle next to Microsoft Defender for Endpoint.

    full disk access mac
    Reference Image
  3. However, if the app is not there, then hit the plus icon at the bottom, choose the app, and add it.
  4. Once added, enable the toggle next to it and then check if it rectifies the issue or not.

FIX 2: Uninstall Microsoft Defender for Endpoint

  1. Launch Finder and select Applications from the left-hand side.
  2. Then drag and drop Microsoft Defender for Endpoint to the Bin.

That’s it. These were the two different methods that should help you fix the CUPS not working: Bad file descriptor error on macOS Sonoma 14.4. As far as the official stance on this matter is concerned, the developers are aware of this issue, but they haven’t given out any ETA for the rollout of a fix. As and when that happens, we will update this guide accordingly. In the meantime, the aforementioned workarounds are your best bet.

Impact of this Error on Apps

This issue has impacted quite a few apps, including the popular PaperCut. Fortunately, the developer has shared a few nifty workarounds that should help you address this issue. Let’s have a look at those tweaks:

  1. To begin with, download the updated version of the configure-cups script from below, depending on the need:
    CASE 1: Print Provider (macOS print servers): DOWNLOAD LINK
    CASE 2: Direct Print Monitor (Direct print from macOS workstations): DOWNLOAD LINK
    CASE 3: Print Deploy with Direct Printing (if you are unable to upgrade to version 1.8.2587): DOWNLOAD LINK
  2. Then unzip the file and replace the content of the existing configure-cups script with the updated version in the following location [for Case 1 and Case 2]:
    /Applications/PaperCut MF/providers/print/mac/
    /Applications/PaperCut NG/providers/print/mac/
  3. On the other hand, the location for the Case 3 will be:
    /Applications/PaperCut Print Deploy Client/direct-print-monitor/providers/print/mac
  4. Just make sure that the file permissions remain unchanged.

Leave a Reply

Your email address will not be published. Required fields are marked *