CUPS does not print | Samsung CLP-315

I own a Samsung CLP-315 printer, which used to work flawlessly on Tumbleweed.

Recently, I downgraded to Leap 42.3 due to unrelated issues. Since then, I am not able to get this printer to work. No printing at all…

Some basic facts:

CUPS 1.7.5
openSUSE Leap 42.3

$ lsusb
Bus 001 Device 002: ID 04e8:328e Samsung Electronics Co., Ltd CLP-310 Color Laser Printer
$ ls -l /dev/usb/lp* /dev/bus/usb/*/* 
crw-rw-r--  1 root root 189,   0 28. Feb 09:27 /dev/bus/usb/001/001
crw-rw-rw-  1 root lp   189,   1 28. Feb 09:27 /dev/bus/usb/001/002
crw-rw-r--  1 root root 189,   2 28. Feb 09:27 /dev/bus/usb/001/003
crw-rw-r--  1 root root 189,   3 28. Feb 09:27 /dev/bus/usb/001/004
crw-rw-r--+ 1 root root 189,   4 28. Feb 09:27 /dev/bus/usb/001/005
crw-rw-r--  1 root root 189,   5 28. Feb 09:27 /dev/bus/usb/001/006
crw-rw-r--  1 root root 189,   6 28. Feb 09:27 /dev/bus/usb/001/007
crw-rw-r--  1 root root 189, 128 28. Feb 09:27 /dev/bus/usb/002/001
crw-rw-r--  1 root root 189, 256 28. Feb 09:27 /dev/bus/usb/003/001
crw-rw-r--  1 root root 189, 384 28. Feb 09:27 /dev/bus/usb/004/001
crw-rw-r--  1 root root 189, 385 28. Feb 09:27 /dev/bus/usb/004/002
crw-rw-r--  1 root root 189, 512 28. Feb 09:27 /dev/bus/usb/005/001
crw-rw----  1 root lp   180,   0 28. Feb 09:27 /dev/usb/lp0
$ sudo lpinfo -v
network ipp
file cups-pdf:/
network http
direct hp
network https
network ipps
network lpd
network beh
serial serial:/dev/ttyS0?baud=115200
direct pipe
network socket
network beh.pl
direct usb://Samsung/CLP-310%20Series?serial=1434BAFS105740W
network smb
direct hpfax

$ sudo usb_printerid /dev/usb/lp0
GET_DEVICE_ID string:
MFG:Samsung;CMD:SPLC,FWV;MDL:CLP-310 Series;CLS:PRINTER;STATUS:BUSY;
$ sudo lpinfo -m | grep CLP-3
Samsung-CLP-300.ppd.gz Samsung CLP-300 Foomatic/foo2qpdl (recommended)
lsb/usr/foo2zjs/Samsung-CLP-300.ppd.gz Samsung CLP-300 Foomatic/foo2qpdl (recommended)
uld-samsung/Samsung_CLP-300_Series.ppd Samsung CLP-300 Series
samsung/CLP-300splc.ppd.gz Samsung CLP-300 Series (SPL-C)
Samsung-CLP-310.ppd.gz Samsung CLP-310 Foomatic/foo2qpdl (recommended)
lsb/usr/foo2zjs/Samsung-CLP-310.ppd.gz Samsung CLP-310 Foomatic/foo2qpdl (recommended)
uld-samsung/Samsung_CLP-310_Series.ppd Samsung CLP-310 Series
samsung/CLP-310splc.ppd.gz Samsung CLP-310 Series (SPL-C)
Samsung-CLP-315.ppd.gz Samsung CLP-315 Foomatic/foo2qpdl (recommended)
lsb/usr/foo2zjs/Samsung-CLP-315.ppd.gz Samsung CLP-315 Foomatic/foo2qpdl (recommended)
uld-samsung/Samsung_CLP-320_Series.ppd Samsung CLP-320 Series
Samsung-CLP-325.ppd.gz Samsung CLP-325 Foomatic/foo2qpdl (recommended)
lsb/usr/foo2zjs/Samsung-CLP-325.ppd.gz Samsung CLP-325 Foomatic/foo2qpdl (recommended)
samsung/CLP-340splc.ppd.gz Samsung CLP-340 Series (SPL-C)
OpenPrintingPPDs/postscript/Samsung-CLP-350.Postscript.ppd.gz Samsung CLP-350 Foomatic/Postscript
OpenPrintingPPDs/ghostscript/Samsung-CLP-350.pxlcolor.ppd.gz Samsung CLP-350 Foomatic/pxlcolor
OpenPrintingPPDs/postscript/Samsung-CLP-350.Postscript-Samsung.ppd.gz Samsung CLP-350 Series PS
samsung/CLP-350ps.ppd.gz Samsung CLP-350 Series PS
uld-samsung/Samsung_CLP-350_Series.ppd Samsung CLP-350 Series PS
uld-samsung/Samsung_CLP-360_Series.ppd Samsung CLP-360 Series
Samsung-CLP-365.ppd.gz Samsung CLP-365 Foomatic/foo2qpdl (recommended)
lsb/usr/foo2zjs/Samsung-CLP-365.ppd.gz Samsung CLP-365 Foomatic/foo2qpdl (recommended)

I have two driver installed, the original Samsung driver which used to work previously and the foo2qpdl driver from here (compiled and installed according to the instructions given there).

Log with Samsung driver after trying to send a test page to printer: https://goo.gl/AvzZML
Log with foo2qpdl driver: https://goo.gl/S7LBc5

Any help will be greatly appreciated.

If you start by power-cycling the printer, and cancel all stale jobs with

cancel -a

can you then print a test page from CUPS successfully (with either driver)?

I note that both logs have the following messages present

Got USB transaction timeout during read.

This leads me wonder if it is a USB comms-related issue. I wonder if configuring the printer to use unidirectional communication might help here? Using the name of the printer try configuring with

lpadmin -p <printer> -o usb-unidir-default=true

Not sure if you did this already, but CUPS logging can be put into debug mode with

cupsctl --debug-logging

That might help yield more information about what is causing the problem.

Thank you for your reply.

I did

sudo lpadmin -p Samsung_CLP-310_Series -o usb-unidir-default=true

and

sudo lpadmin -p samsungclp310series -o usb-unidir-default=true

after clearing the printer cache. Printer is still dead.

The debugging level was already raised by manually setting the Loglevel to debug in /etc/cups/cupsd.conf

Here is the error_log output from CUPS.

I hate it to write but the printer works under Windows 10.

I couldn’t access that site (paste is password protected). Please use our https://paste.opensuse.org/ instead.

Did you try removing the printer queue in YaST, then readd it ? Is the self-compiled driver recompiles on Leap ?

EDIT: Just discovered a different driver installer from Samsung themselves. IIRC that worked fine on Leap for 3 different Samsung printers. If you want I can tar those and send you a link to download it from my Nextcloud instance.

The issue might simply be some leftover config ( TW has CUPS 2.2.6 ) that blocks working on Leap. Meanwhile it’s quite a downgrade.
BTW How did you perform the downgrade?

@deano_ferrari: Paste is now accessible.

@Knurpht:

  • Yes, I removed the printer queue in localhost:631
  • The downgrade was performed as a fresh install, so no leftovers from TW. The foo2 driver was therefore freshly compiled.
  • There are a lot of driver packages around from Samsung. The one I used was supposed to work. But I am of course open to give your driver a try.

The error_log seems to be a bit different than before you applied the unidirectional USB communication, but I note that there are numerous entries like this…

D [01/Mar/2018:23:44:46 +0100] Report: stringpool-total-bytes=271040
D [01/Mar/2018:23:44:46 +0100] [Job 95] Waiting for printer to become available.
D [01/Mar/2018:23:44:51 +0100] [Job 95] libusb_get_device_list=10
D [01/Mar/2018:23:44:51 +0100] [Job 95] Waiting for printer to become available.
D [01/Mar/2018:23:44:56 +0100] [Job 95] libusb_get_device_list=10
D [01/Mar/2018:23:44:56 +0100] [Job 95] Waiting for printer to become available.
D [01/Mar/2018:23:45:01 +0100] [Job 95] libusb_get_device_list=10
D [01/Mar/2018:23:45:01 +0100] [Job 95] Waiting for printer to become available.


If I’ve interpreted this correctly, the data never gets sent to the printer (as it’s not available) so the job never completes? I don’t know what the underlying cause of this is though. Is the printer connected via a USB 2 or 3 port? Not sure if this might make a difference or not, but I have encountered users reporting scanner problems when attached to USB 3 ports on occasion.

My computer is rather old so only USB 2.0 ports are available.

I’m not sure where the problem lies, but perhaps worth trying the following:

  1. Install the current stable kernel, and see if that helps with this strange comms behaviour. (The existing kernel can be left in place, in case you need to boot from it again.)

  2. Subscribe to the Printing repo with zypper and upgrade CUPS to see if that helps

https://download.opensuse.org/repositories/Printing/openSUSE_Leap_42.3/

If you need help with doing either of these let me know.

No luck.

Upgrading the kernel has no effect. Same for CUPS with the one Printing repo.

I deinstalled all drivers (foo2, splix, ULD), deleted CUPS, reinstalled CUPS and the Universal Linux Driver from Samsung which is supposed to work: Nothing.

Here is some data from the log file:

https://paste.kde.org/pur64m4oq/5ahscg

And that is what is installed in terms of CUPS:

rpm -qa | grep cups
cups-2.3b3-226.1.x86_64
libcupscgi1-2.3b3-226.1.x86_64
libcupsppdc1-2.3b3-226.1.x86_64
cups-libs-32bit-1.7.5-11.1.x86_64
libcupsimage2-2.3b3-226.1.x86_64
cups-pk-helper-0.2.5-9.1.x86_64
cups-filters-1.20.0-78.1.x86_64
libcups2-2.3b3-226.1.x86_64
cups-pk-helper-lang-0.2.5-9.1.noarch
cups-client-2.3b3-226.1.x86_64
libcupsmime1-2.3b3-226.1.x86_64
python3-cups-1.9.72-6.1.x86_64
cups-config-2.3b3-226.1.x86_64
python3-cupshelpers-1.5.7-9.2.noarch
cups-backends-1.1-296.2.noarch
cups-pdf-3.0.1-8.3.x86_64

Now you’re getting different errors. The cups-brf backend is a virtual braille printer backend (supplied as part of cups-filters). Not sure why the error though?

Does the following complete successfully (to produce a list of installed drivers available)?

sudo lpinfo -m

I note that ‘foo2qpdl-wrapper’ is not found…

D [06/Mar/2018:01:41:37 +0100] [Job 109] /bin/bash: foo2qpdl-wrapper: Kommando nicht gefunden.
D [06/Mar/2018:01:41:37 +0100] [Job 109] renderer exited with status 127
D [06/Mar/2018:01:41:37 +0100] [Job 109] Process is dying with \"Encountered error Broken pipe during fwrite\", exit stat 1
D [06/Mar/2018:01:41:37 +0100] [Job 109] Cleaning up...
D [06/Mar/2018:01:41:37 +0100] [Job 109] Killing kid3
D [06/Mar/2018:01:41:37 +0100] [Job 109] Sent 0 bytes...
D [06/Mar/2018:01:41:37 +0100] [Job 109] PID 26739 (/usr/lib/cups/filter/foomatic-rip) stopped with status 1.
D [06/Mar/2018:01:41:37 +0100] [Job 109] Hint: Try setting the LogLevel to "debug" to find out more.
D [06/Mar/2018:01:41:37 +0100] [Job 109] Waiting for read thread to exit...
D [06/Mar/2018:01:41:37 +0100] [Job 109] Read thread still active, aborting the pending read...
D [06/Mar/2018:01:41:37 +0100] [Job 109] Resetting printer.
D [06/Mar/2018:01:41:37 +0100] [Job 109] PID 26740 (/usr/lib/cups/backend/usb) exited with no errors.

This means that the foo2qpdl driver is not installed correctly/completely, so that needs to be reviewed again.

Output for

sudo lpinfo -m
lsb/usr/cupsfilters/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd Fuji Xerox
CUPS-PDF_noopt.ppd Generic CUPS-PDF Printer (no options)
CUPS-PDF.ppd Generic CUPS-PDF Printer (w/ options)
CUPS-PDF_opt.ppd Generic CUPS-PDF Printer (w/ options)
lsb/usr/cupsfilters/Generic-PDF_Printer-PDF.ppd Generic PDF Printer
Postscript-level1.ppd.gz Generic PostScript level 1 Printer Foomatic/Postscript (recommended)
Postscript-level2.ppd.gz Generic PostScript level 2 Printer Foomatic/Postscript (recommended)
lsb/usr/cupsfilters/HP-Color_LaserJet_CM3530_MFP-PDF.ppd HP Color LaserJet CM3530 MFP PDF
lsb/usr/cupsfilters/pxlcolor.ppd HP Color LaserJet Series PCL 6 CUPS
lsb/usr/cupsfilters/pxlmono.ppd HP LaserJet Series PCL 6 CUPS
lsb/usr/cupsfilters/HP-PhotoSmart_Pro_B8300-hpijs-pdftoijs.ppd HP PhotoSmart Pro B8300 CUPS/pdftoijs/hpijs
Postscript.ppd.gz Postscript Generic postscript printer
raw Raw Queue
lsb/usr/cupsfilters/Ricoh-PDF_Printer-PDF.ppd Ricoh PDF Printer
samsung/CLP-300splc.ppd.gz Samsung CLP-300 Series (SPL-C)
samsung/CLP-310splc.ppd.gz Samsung CLP-310 Series (SPL-C)
everywhere IPP Everywhere

I tried to get rid of the foo2zjs driver by

#make uninstall

but there were some files left. Deleting /usr/share/ppd/foo2zjs cleaned up the list above.

This driver doesn’t support your Samsung printer. Don’t you mean the foo2qpdl driver?

The foo2zjs driver is according to http://foo2qpdl.rkkda.com/ not the recommended one for my CLP-315. Nonetheless, there is only the foo2zjs tar available for download on that page.

After radically deleting all cups related folders and reinstalling all, I have now a much better looking error log, but still no luck with printing. The only installed driver is the one from Samsung which used to work before.

I found something interesting:

/usr/lib/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 86 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=11
DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPLC,FWV;MDL:CLP-310 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-310%20Series?serial=1434BAFS105740W
direct usb://Samsung/CLP-310%20Series?serial=1434BAFS105740W "Samsung CLP-310 Series" "Samsung CLP-310 Series" "MFG:Samsung;CMD:SPLC,FWV;MDL:CLP-310 Series;CLS:PRINTER;STATUS:BUSY;" ""

After trying to print a test page:

/usr/lib/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 86 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=11
DEBUG: Failed to detach "usblp" module from 04e8:328e

This led me to this interesting page: https://www.linuxquestions.org/questions/linux-kernel-70/kernel-usblp-module-conflict-between-kernel-help-and-cups-4175609221/

Blacklisting usblp seems not to work.

The development and maintenance of the foo2qpdl driver has ceased according to this openprinting.org page. The splix driver is also mentioned, but it won’t work without a colour profile from the printer manufacturer apparently. This leaves the Samsung Unified Linux driver as the only real choice here IMHO.

After radically deleting all cups related folders and reinstalling all, I have now a much better looking error log, but still no luck with printing. The only installed driver is the one from Samsung which used to work before.

The driver appears to be working, but the USB communication is broken…

D [06/Mar/2018:11:08:14 +0100] [Job 125] Device reset failed, error code: -4
I [06/Mar/2018:11:08:14 +0100] Expiring subscriptions...
D [06/Mar/2018:11:08:14 +0100] [Job 125] PID 2078 (/usr/lib/cups/backend/usb) stopped with status 1.
I [06/Mar/2018:11:08:14 +0100] [Job 125] Backend returned status 1 (failed)

I found something interesting:

/usr/lib/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 86 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=11
DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPLC,FWV;MDL:CLP-310 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-310%20Series?serial=1434BAFS105740W
direct usb://Samsung/CLP-310%20Series?serial=1434BAFS105740W "Samsung CLP-310 Series" "Samsung CLP-310 Series" "MFG:Samsung;CMD:SPLC,FWV;MDL:CLP-310 Series;CLS:PRINTER;STATUS:BUSY;" ""

After trying to print a test page:

/usr/lib/cups/backend/usb
DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 86 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=11
DEBUG: Failed to detach "usblp" module from 04e8:328e

This led me to this interesting page: https://www.linuxquestions.org/questions/linux-kernel-70/kernel-usblp-module-conflict-between-kernel-help-and-cups-4175609221/

Blacklisting usblp seems not to work.

A bug report needs to be submitted for this regression.

Here’s some advice about doing that
https://en.opensuse.org/openSUSE:Submitting_bug_reports
Here’s where you can submit a bug report
https://bugzilla.opensuse.org/index.cgi

Reporting a printing related bug seems to be very … demanding. I spent already too much time with this issue. I do not really believe that the real culprit is libusb because the printer has been working in Tumbleweed up to kernel 4.14 without problems. Kernels tested so far in 42.3: 4.4, 4.10 (15.0) and 4.15 (latest stable kernel).

I will therefore shop a new one for 120 € which is capable of LAN, PCL and PS, respectively.

Yes, it does take time and effort. However, you already have most of the diagnostic output needed to characterize the issue.

I do not really believe that the real culprit is libusb because the printer has been working in Tumbleweed up to kernel 4.14 without problems. Kernels tested so far in 42.3: 4.4, 4.10 (15.0) and 4.15 (latest stable kernel).

No its not libusb that has the issue, it’s likely with the CUPS usb backend itself (or perhaps usblp) as your output shows.

I will therefore shop a new one for 120 € which is capable of LAN, PCL and PS, respectively.

That’s a pragmatic option I suppose, and network printers are better for those sharing the device amongst several clients.

Haven’t read the entire thread, but I’m using a Samsung Laser printer, and downloaded their driver, since other (openprinting) wouldn’t work. This is a universal driver package, but when I search with 'locate 315 | grep -i CLP, it shows this output:


@knurpht-HP:~> locate 315 | grep -i clp
/usr/share/cups/model/samsung/clp315.ppd.gz
/usr/share/cups/model/samsung/clp315fr.ppd.gz
/usr/share/cups/model/samsung/clp315pt.ppd.gz

If you can’t find these, here’s a download link where you can pick them from my Nextcloud instance. https://owncloud.knurpht.nl/index.php/s/KQFjqWBpWkXxoWM

@Gertjan: The print filtering appears to be working or at least no errors generated (based on link to last error_log posted), but there is an apparent issue with communicating with the USB-connected printer.