I'm trying to use my printer (an OKI C530dn) with my freshly-installed FreeBSD laptop. I am using CUPS for this, and I have set it up correctly. However, it's not working at all.

When I opened the CUPS web interface, I found the following error message:

Idle - "File "/usr/local/libexec/cups/filter/okijobaccounting" not available: No such file or directory"

I believe I am missing a filter of some description, but I couldn't find anything on FreshPorts. Does anyone have any suggestions or workarounds?
 
P.S.: some googleing gives me the impression you can just drop the linux filter file under /usr/local/libexec/cups/filter and FreeBSD recognizes it. You may have to enable linux compatibility of not yet done.
 
P.S.: some googleing gives me the impression you can just drop the linux filter file under /usr/local/libexec/cups/filter and FreeBSD recognizes it. You may have to enable linux compatibility of not yet done.

That fixed the original error, but now there's another issue and it still won't print.

When trying to print from LibreOffice, a dialog pops up reading:
Could not start printer.
Please check your printer configuration.

And, when trying to print a test page from the CUPS web interface, I get a message that says:
Unable to print test page:
No such file or directory

Any ideas?
 
Checking /var/log/cups...

Here are two lines from the error log:

E [08/Jan/2024:19:34:59 +0000] [Client 41] Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/OKI_DATA_CORP_C530) from localhost.
E [08/Jan/2024:19:35:20 +0000] [Client 41] Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/OKI_DATA_CORP_C530) from localhost.

And there was also this line from the access log:

localhost - - [08/Jan/2024:19:35:20 +0000] "POST /printers/OKI_DATA_CORP_C530 HTTP/1.1" 200 38489 Send-Document client-error-document-format-not-supported

I can't think what would be the problem. These are caused by attempting to print the built-in CUPS test page, so surely the document format should be supported?
 
I don't know what PPD you've used. A full log allows us to better find the issue.

Try adding additional filters:
pkg install cups-filters service cupsd restart #for current execution only: cupsctl --debug-logging

Other suggested packages are:
pkg install foomatic-db foomatic-db-engine foomatic-filters gutenprint
which may include drivers for your printer. See if a new printer with foomatic is discovered.

If it still doesn't work, delete your current settings and try a fresh copy.

FYI:
Driverless Printers not for c530dn.
 
Here's the PPD I used: C330PS.ppd

And here are the logs:
Code:
E [08/Jan/2024:17:48:42 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
E [08/Jan/2024:18:03:19 +0000] OKI_DATA_CORP_C530: File \"/usr/local/libexec/cups/filter/okijobaccounting\" not available: No such file or directory
W [08/Jan/2024:18:03:49 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-Gray..\' already exists
W [08/Jan/2024:18:03:49 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-CMYK..\' already exists
E [08/Jan/2024:18:03:49 +0000] OKI_DATA_CORP_C530: File \"/usr/local/libexec/cups/filter/okijobaccounting\" not available: No such file or directory
E [08/Jan/2024:19:04:21 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
E [08/Jan/2024:19:04:21 +0000] OKI_DATA_CORP_C530: File \"/usr/local/libexec/cups/filter/okijobaccounting\" not available: No such file or directory
W [08/Jan/2024:19:04:21 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [08/Jan/2024:19:32:31 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [08/Jan/2024:19:32:31 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
W [08/Jan/2024:19:33:39 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-Gray..\' already exists
W [08/Jan/2024:19:33:39 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-CMYK..\' already exists
W [08/Jan/2024:19:33:47 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-Gray..\' already exists
W [08/Jan/2024:19:33:47 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-CMYK..\' already exists
W [08/Jan/2024:19:34:06 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-Gray..\' already exists
W [08/Jan/2024:19:34:06 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'OKI_DATA_CORP_C530-CMYK..\' already exists
E [08/Jan/2024:19:34:59 +0000] [Client 41] Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/OKI_DATA_CORP_C530) from localhost.
E [08/Jan/2024:19:35:20 +0000] [Client 41] Returning IPP client-error-document-format-not-supported for Send-Document (ipp://localhost:631/printers/OKI_DATA_CORP_C530) from localhost.
E [08/Jan/2024:20:26:46 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [08/Jan/2024:20:26:46 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [09/Jan/2024:11:17:58 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [09/Jan/2024:11:17:58 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [11/Jan/2024:13:17:53 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [11/Jan/2024:13:17:53 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [12/Jan/2024:11:19:55 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [12/Jan/2024:11:19:55 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [12/Jan/2024:14:42:11 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [12/Jan/2024:14:42:12 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [12/Jan/2024:15:10:55 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [12/Jan/2024:15:10:55 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [19/Jan/2024:14:27:18 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [19/Jan/2024:14:27:18 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [22/Jan/2024:10:07:31 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [22/Jan/2024:10:07:31 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [22/Jan/2024:11:37:22 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [22/Jan/2024:11:37:22 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [22/Jan/2024:13:48:39 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [22/Jan/2024:13:48:39 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [22/Jan/2024:15:31:43 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [22/Jan/2024:15:31:43 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [24/Jan/2024:18:10:55 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [24/Jan/2024:18:10:55 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [24/Jan/2024:18:16:30 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [24/Jan/2024:18:16:30 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [24/Jan/2024:18:26:04 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [24/Jan/2024:18:26:04 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [24/Jan/2024:18:31:40 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [24/Jan/2024:18:31:40 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
E [27/Jan/2024:16:14:21 +0000] Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf.
W [27/Jan/2024:16:14:21 +0000] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
Code:
localhost - edan [08/Jan/2024:18:03:01 +0000] "POST /admin/ HTTP/1.1" 200 60 - -
localhost - - [08/Jan/2024:18:03:01 +0000] "POST / HTTP/1.1" 401 91 CUPS-Get-Devices successful-ok
localhost - edan [08/Jan/2024:18:03:01 +0000] "POST / HTTP/1.1" 200 1575 CUPS-Get-Devices -
localhost - edan [08/Jan/2024:18:03:01 +0000] "POST /admin/ HTTP/1.1" 200 3391 - -
localhost - edan [08/Jan/2024:18:03:07 +0000] "POST /admin HTTP/1.1" 200 155 - -
localhost - edan [08/Jan/2024:18:03:07 +0000] "POST /admin HTTP/1.1" 200 3482 - -
localhost - edan [08/Jan/2024:18:03:09 +0000] "POST /admin HTTP/1.1" 200 305 - -
localhost - - [08/Jan/2024:18:03:09 +0000] "POST / HTTP/1.1" 200 734 CUPS-Get-PPDs -
localhost - edan [08/Jan/2024:18:03:09 +0000] "POST /admin HTTP/1.1" 200 3820 - -
localhost - edan [08/Jan/2024:18:03:19 +0000] "POST /admin HTTP/1.1" 200 62557 - -
localhost - - [08/Jan/2024:18:03:19 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:18:03:19 +0000] "POST /admin/ HTTP/1.1" 200 61019 CUPS-Add-Modify-Printer successful-ok
localhost - edan [08/Jan/2024:18:03:19 +0000] "POST /admin HTTP/1.1" 200 64838 - -
localhost - edan [08/Jan/2024:18:03:22 +0000] "POST /admin/ HTTP/1.1" 200 100 - -
localhost - edan [08/Jan/2024:18:03:22 +0000] "POST /admin/ HTTP/1.1" 200 14707 - -
localhost - edan [08/Jan/2024:18:03:48 +0000] "POST /admin HTTP/1.1" 200 656 - -
localhost - - [08/Jan/2024:18:03:49 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:18:03:49 +0000] "POST /admin/ HTTP/1.1" 200 60945 CUPS-Add-Modify-Printer successful-ok
localhost - edan [08/Jan/2024:18:03:48 +0000] "POST /admin HTTP/1.1" 200 2636 - -
localhost - - [08/Jan/2024:19:33:03 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:19:33:07 +0000] "POST /admin/ HTTP/1.1" 200 95 - -
localhost - edan [08/Jan/2024:19:33:07 +0000] "POST /admin/ HTTP/1.1" 200 2253 - -
localhost - edan [08/Jan/2024:19:33:09 +0000] "POST /admin/ HTTP/1.1" 200 118 - -
localhost - - [08/Jan/2024:19:33:09 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:19:33:09 +0000] "POST /admin/ HTTP/1.1" 200 134 CUPS-Delete-Printer successful-ok
localhost - edan [08/Jan/2024:19:33:09 +0000] "POST /admin/ HTTP/1.1" 200 2004 - -
localhost - edan [08/Jan/2024:19:33:14 +0000] "POST /admin/ HTTP/1.1" 200 60 - -
localhost - - [08/Jan/2024:19:33:14 +0000] "POST / HTTP/1.1" 401 91 CUPS-Get-Devices successful-ok
localhost - edan [08/Jan/2024:19:33:14 +0000] "POST / HTTP/1.1" 200 1575 CUPS-Get-Devices -
localhost - edan [08/Jan/2024:19:33:14 +0000] "POST /admin/ HTTP/1.1" 200 3391 - -
localhost - edan [08/Jan/2024:19:33:20 +0000] "POST /admin HTTP/1.1" 200 155 - -
localhost - edan [08/Jan/2024:19:33:20 +0000] "POST /admin HTTP/1.1" 200 3482 - -
localhost - edan [08/Jan/2024:19:33:22 +0000] "POST /admin HTTP/1.1" 200 305 - -
localhost - - [08/Jan/2024:19:33:22 +0000] "POST / HTTP/1.1" 200 734 CUPS-Get-PPDs -
localhost - edan [08/Jan/2024:19:33:22 +0000] "POST /admin HTTP/1.1" 200 3820 - -
localhost - edan [08/Jan/2024:19:33:39 +0000] "POST /admin HTTP/1.1" 200 62587 - -
localhost - - [08/Jan/2024:19:33:39 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:19:33:39 +0000] "POST /admin/ HTTP/1.1" 200 61019 CUPS-Add-Modify-Printer successful-ok
localhost - edan [08/Jan/2024:19:33:39 +0000] "POST /admin HTTP/1.1" 200 64868 - -
localhost - edan [08/Jan/2024:19:33:41 +0000] "POST /admin/ HTTP/1.1" 200 100 - -
localhost - edan [08/Jan/2024:19:33:41 +0000] "POST /admin/ HTTP/1.1" 200 14707 - -
localhost - edan [08/Jan/2024:19:33:47 +0000] "POST /admin HTTP/1.1" 200 654 - -
localhost - - [08/Jan/2024:19:33:47 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:19:33:47 +0000] "POST /admin/ HTTP/1.1" 200 60943 CUPS-Add-Modify-Printer successful-ok
localhost - edan [08/Jan/2024:19:33:47 +0000] "POST /admin HTTP/1.1" 200 2634 - -
localhost - edan [08/Jan/2024:19:33:53 +0000] "POST /admin/ HTTP/1.1" 200 100 - -
localhost - edan [08/Jan/2024:19:33:53 +0000] "POST /admin/ HTTP/1.1" 200 14707 - -
localhost - edan [08/Jan/2024:19:34:06 +0000] "POST /admin HTTP/1.1" 200 656 - -
localhost - - [08/Jan/2024:19:34:06 +0000] "POST /admin/ HTTP/1.1" 401 0 - -
localhost - edan [08/Jan/2024:19:34:06 +0000] "POST /admin/ HTTP/1.1" 200 60945 CUPS-Add-Modify-Printer successful-ok
localhost - edan [08/Jan/2024:19:34:06 +0000] "POST /admin HTTP/1.1" 200 2636 - -
localhost - - [08/Jan/2024:19:34:59 +0000] "POST /printers/OKI_DATA_CORP_C530 HTTP/1.1" 200 222 Create-Job successful-ok
localhost - - [08/Jan/2024:19:34:59 +0000] "POST /printers/OKI_DATA_CORP_C530 HTTP/1.1" 200 38489 Send-Document client-error-document-format-not-supported
localhost - - [08/Jan/2024:19:34:59 +0000] "POST /jobs/ HTTP/1.1" 200 179 Cancel-Job successful-ok
localhost - - [08/Jan/2024:19:35:20 +0000] "POST /printers/OKI_DATA_CORP_C530 HTTP/1.1" 200 222 Create-Job successful-ok
localhost - - [08/Jan/2024:19:35:20 +0000] "POST /printers/OKI_DATA_CORP_C530 HTTP/1.1" 200 38489 Send-Document client-error-document-format-not-supported
localhost - - [08/Jan/2024:19:35:20 +0000] "POST /jobs/ HTTP/1.1" 200 179 Cancel-Job successful-ok
localhost - edan [08/Jan/2024:21:10:08 +0000] "POST /admin/ HTTP/1.1" 200 60 - -
localhost - - [08/Jan/2024:21:10:08 +0000] "POST / HTTP/1.1" 401 91 CUPS-Get-Devices successful-ok
localhost - edan [08/Jan/2024:21:10:08 +0000] "POST / HTTP/1.1" 200 1253 CUPS-Get-Devices -
localhost - edan [08/Jan/2024:21:10:08 +0000] "POST /admin/ HTTP/1.1" 200 3114 - -

Sorry for not replying sooner.
 
Does that log show debugging level?

Unknown directive IdleExitTimeout on line 32 of /usr/local/etc/cups/cupsd.conf
What does line 32 say?
sed '32q;d' /usr/local/etc/cups/cupsd.conf

cupsd.conf()
IdleExitTimeout seconds
Specifies the length of time to wait before shutting down due to
inactivity. The default is "60" seconds. Note: Only applicable
when cupsd(8) is run on-demand (e.g., with -l).

C330PS.ppd:
*cupsVersion: 1.1
*cupsManualCopies: False
*cupsFilter: "application/vnd.cups-postscript 0 okijobaccounting"
*OKJobAccount: False

⚠️ And, check the current situation of CUPS and PPD at the link:
Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103

Have you tried PPD from okc321 package or official website?
Have you tried removing PPD and adding foomatic and gutenprint to discover new printers?
 
A stab in the dark, but have you possibly tried the ppd ipp anywhere, e.g.,

lpadmin -p myoki -E -v ipp://<printerIP-address>/ipp/print -m everywhere ?

In theory that should handle most printers. And, for printing pdfs with no special options, there's always netcat

nc <printer-ip> 9100 < myfile.pdf

As I almost always just print pdfs, I don't know much about other formats, and I do think you need to pkg install cups-filters, but as I said in the first sentence, this is just a stab in the dark.
 
If you look at the code in the C330PS.ppd, the bulk of it is generic postscript. It does have some OKI specific external commands like job accounting and "smoothing" algorithms.. The code calls for the OKI specific commands will not be found in FreeBSD.

CUPs does it's own job accounting. although it is disabled by default.

Essentially, this boils down to your printing needs. Using the generic postscript driver, as @dizzy suggested, will give you fast reliable printing, duplex v simplex and paper tray selection. You likely will not be able to access image smoothing protocols directly but you can manipulate images prior to printing with GIMP, Krita, ImageMagick etc.
 
If you look at the code in the C330PS.ppd, the bulk of it is generic postscript. It does have some OKI specific external commands like job accounting and "smoothing" algorithms.. The code calls for the OKI specific commands will not be found in FreeBSD.

CUPs does it's own job accounting. although it is disabled by default.

Essentially, this boils down to your printing needs. Using the generic postscript driver, as @dizzy suggested, will give you fast reliable printing, duplex v simplex and paper tray selection. You likely will not be able to access image smoothing protocols directly but you can manipulate images prior to printing with GIMP, Krita, ImageMagick etc.
I'll try it with the generic driver and see if it works.

If not, there are always other machines I can try to print from.
 
You're also using IPP according to your previous error logs which wont work for Postscript or PCL
HP's jet direct port is a stable networking protocol available as a CUPs configuration option. I'm currently using it with a postscript ppd.

Code:
socket://PrinterIPAddress:9100
 
Oki has published a PPD file for the C530dn. So you can set up the printer in CUPS by downloading and configuring it as a PostScript printer with this PPD file and using the HP Jetdirect port socket://PrinterIPAddress:9100 suggested by shepper above.

[I tried to figure out if this printer would work with driverless IPP and could not come to a sound conclusion. The specs suggest that it supports Bonjour and IPP, but neither AirPrint nor PWG are mentioned, so further investigation needed. No matter, HP's Jetdirect protocol is supported and is a good solution.]
 
[I tried to figure out if this printer would work with driverless IPP and could not come to a sound conclusion. The specs suggest that it supports Bonjour and IPP, but neither AirPrint nor PWG are mentioned, so further investigation needed. No matter, HP's Jetdirect protocol is supported and is a good solution.]
[specs link]
Network & protocols
All major network protocols supported via ethernet card with internal web server for printer and network card set-up and management. TCP/IP: ARP, IPv4/v6, ICMPv4/v6, TCP, UDP, LPR, FTP, TELNET, HTTP(IPP), BOOTP, DHCP, SNMPv1/v3, DNS, DDNS, UPnP, Bonjour, WINS, SSL/TLS, SMTP, POP3, SNTP, WSDPrint, LLTD, JetDirect protocols, NetBIOSoverTCP; NetWare3.x, 4.x, 5.x and 6 with full NDS and NDPS support:- PServer, RPrinter, NDPS supported via dedicated OKI NDPS Gateway; AppleTalk: ELAP, AARP, DDP, AEP, NBP, ZIP, RTMP, ATP, PAP; NetBEUI: SMB, NetBIOS; Other: EAP

FYI: 🔗
This page shows printers that support the AirPrint™ and/or IPP Everywhere™ standards for driverless printers. These printers also often support Mopria® as used on Android OS and Microsoft Windows®, and Wi-Fi Direct Print Services for printing directly via Wi-Fi.
 
Driverless Printers not for c530dn.
OK, I see you have covered a lot of the territory, quite well, and that the OKI C530dn does not work with IPP Everywhere (driverless).

There's no point in worrying about future CUPS versions (3.0) removing direct support for PPDs. The CUPS architecture has to continue to support legacy printers like the C530dn. The PPD handling will get moved out of the direct support of CUPS (and into a Printer Application). I say cross that bridge when you get to it (it's been coming for a long time), and there's a lot of printers that will continue to need PPDs.

I think we might agree that using an OKI C530dn PPD file, and the Jetdirect port socket://PrinterIPAddress:9100 is the simplest good solution.

 
Back
Top