OpenPrinting / cups-filters

filters, backends, driverless utility, ... - Everything which CUPS 2.x needs to be used on non-Mac systems
Apache License 2.0
160 stars 126 forks source link

Missing filter with ubuntu server edition #355

Open LAfricain opened 3 years ago

LAfricain commented 3 years ago

Hello, For a ricoh SP 211 on an Ubuntu server edition, the driver from this ppa is not working due to a missing filter. It's working perfectly on an desktop edition. I need your help because I have no idea which cups package is missing on the server edition. This is the /var/log/cups/error_log file:

E [16/Mar/2021:10:40:49 +0000] [Client 36] Unable to encrypt connection: A TLS fatal alert has been received.
E [16/Mar/2021:10:40:53 +0000] [Job 9] Unable to open raster stream - : Broken pipe
E [16/Mar/2021:10:40:54 +0000] [Job 9] Job stopped due to filter errors; please consult the /var/log/cups/error_log file for details.
D [16/Mar/2021:10:40:55 +0000] [Job 9] The following messages were recorded from 10:40:51 to 10:40:54
D [16/Mar/2021:10:40:55 +0000] [Job 9] Applying default options...
D [16/Mar/2021:10:40:55 +0000] [Job 9] Adding start banner page "none".
D [16/Mar/2021:10:40:55 +0000] [Job 9] Adding end banner page "none".
D [16/Mar/2021:10:40:55 +0000] [Job 9] File of type application/vnd.cups-pdf-banner queued by "ubuntu".
D [16/Mar/2021:10:40:55 +0000] [Job 9] hold_until=0
D [16/Mar/2021:10:40:55 +0000] [Job 9] Queued on "RICOH_SP_211SU" by "ubuntu".
D [16/Mar/2021:10:40:55 +0000] [Job 9] time-at-processing=1615891251
D [16/Mar/2021:10:40:55 +0000] [Job 9] 4 filters for job:
D [16/Mar/2021:10:40:55 +0000] [Job 9] bannertopdf (application/vnd.cups-pdf-banner to application/pdf, cost 32)
D [16/Mar/2021:10:40:55 +0000] [Job 9] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [16/Mar/2021:10:40:55 +0000] [Job 9] gstoraster (application/vnd.cups-pdf to application/vnd.cups-raster, cost 99)
D [16/Mar/2021:10:40:55 +0000] [Job 9] rastertolilo (application/vnd.cups-raster to printer/RICOH_SP_211SU, cost 100)
D [16/Mar/2021:10:40:55 +0000] [Job 9] job-sheets=none,none
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[0]="RICOH_SP_211SU"
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[1]="9"
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[2]="ubuntu"
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[3]="Test Page"
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[4]="1"
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[5]="job-uuid=urn:uuid:47bd4102-47b5-39bb-4500-06d5982f961d job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1615891251 time-at-processing=1615891251"
D [16/Mar/2021:10:40:55 +0000] [Job 9] argv[6]="/var/spool/cups/d00009-001"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[7]="CUPS_STATEDIR=/run/cups"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[8]="HOME=/var/spool/cups/tmp"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[10]="SERVER_ADMIN=root@ubuntu"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[11]="SOFTWARE=CUPS/2.3.1"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[13]="USER=root"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[14]="CUPS_MAX_MESSAGE=2047"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[15]="CUPS_SERVER=/run/cups/cups.sock"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[17]="IPP_PORT=631"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[18]="CHARSET=utf-8"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[19]="LANG=fr_FR.UTF-8"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[20]="PPD=/etc/cups/ppd/RICOH_SP_211SU.ppd"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[21]="RIP_MAX_CACHE=128m"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[22]="CONTENT_TYPE=application/vnd.cups-pdf-banner"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[23]="DEVICE_URI=usb://RICOH/SP%20211SU?serial=RH58C2C9"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[24]="PRINTER_INFO=RICOH SP 211SU"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[25]="PRINTER_LOCATION="
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[26]="PRINTER=RICOH_SP_211SU"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[27]="PRINTER_STATE_REASONS=none"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[28]="CUPS_FILETYPE=document"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-raster"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[30]="AUTH_I****"
D [16/Mar/2021:10:40:55 +0000] [Job 9] Started filter /usr/lib/cups/filter/bannertopdf (PID 49075)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Started filter /usr/lib/cups/filter/pdftopdf (PID 49076)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Started filter /usr/lib/cups/filter/gstoraster (PID 49077)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Started filter /usr/lib/cups/filter/rastertolilo (PID 49078)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Started backend /usr/lib/cups/backend/usb (PID 49079)
D [16/Mar/2021:10:40:55 +0000] [Job 9] execv failed: Exec format error
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49078 (/usr/lib/cups/filter/rastertolilo) stopped with status 108 (Exec format error)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Hint: Try setting the LogLevel to "debug" to find out more.
D [16/Mar/2021:10:40:55 +0000] [Job 9] pdftopdf: Last filter determined by the PPD: rastertolilo; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.
D [16/Mar/2021:10:40:55 +0000] [Job 9] OUTFORMAT=\"(null)\", so output format will be CUPS/PWG Raster
D [16/Mar/2021:10:40:55 +0000] [Job 9] Loading USB quirks from \"/usr/share/cups/usb\".
D [16/Mar/2021:10:40:55 +0000] [Job 9] PDF template file doesn\'t have form. It\'s okay.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Loaded 181 quirks.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Printing on printer with URI: usb://RICOH/SP%20211SU?serial=RH58C2C9
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49075 (/usr/lib/cups/filter/bannertopdf) exited with no errors.
D [16/Mar/2021:10:40:55 +0000] [Job 9] PDF interactive form and annotation flattening done via QPDF
D [16/Mar/2021:10:40:55 +0000] [Job 9] libusb_get_device_list=5
D [16/Mar/2021:10:40:55 +0000] [Job 9] STATE: +connecting-to-device
D [16/Mar/2021:10:40:55 +0000] [Job 9] STATE: -connecting-to-device
D [16/Mar/2021:10:40:55 +0000] [Job 9] Printer found with device ID: MFG:RICOH ;CMD:PDL,PCL,PJL;MODEL:SP 211SU;FW:V1.03;VSTATUS:IDLE;CLASS:Printer;DES:RICOH SP 211SU;SN:RH58C2C9;CMT:1B2C7001_1B2C7009; Device URI: usb://RICOH/SP%20211SU?serial=RH58C2C9
D [16/Mar/2021:10:40:55 +0000] [Job 9] Device protocol: 2
D [16/Mar/2021:10:40:55 +0000] [Job 9] Read 64 bytes of back-channel data...
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49076 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Sending data to printer.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Sent 0 bytes...
D [16/Mar/2021:10:40:55 +0000] [Job 9] Color Manager: Calibration Mode/Off
D [16/Mar/2021:10:40:55 +0000] [Job 9] Calling FindDeviceById(cups-RICOH_SP_211SU)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Found device /org/freedesktop/ColorManager/devices/cups_RICOH_SP_211SU
D [16/Mar/2021:10:40:55 +0000] [Job 9] Calling org.freedesktop.ColorManager.Device.Get(ProfilingInhibitors)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Calling FindDeviceById(cups-RICOH_SP_211SU)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Found device /org/freedesktop/ColorManager/devices/cups_RICOH_SP_211SU
D [16/Mar/2021:10:40:55 +0000] [Job 9] Calling GetProfileForQualifiers(Gray.PlainRecycled.600dpi...)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Failed to send: org.freedesktop.ColorManager.Device.NothingMatched:nothing matched expression \'Gray.PlainRecycled.600dpi,Gray.PlainRecycled.*,Gray.*.600dpi,Gray.*.*,*\'
D [16/Mar/2021:10:40:55 +0000] [Job 9] Failed to get profile filename for cups-RICOH_SP_211SU
D [16/Mar/2021:10:40:55 +0000] [Job 9] Color Manager: no profiles specified in PPD
D [16/Mar/2021:10:40:55 +0000] [Job 9] Color Manager: ICC Profile: None
D [16/Mar/2021:10:40:55 +0000] [Job 9] Ghostscript using Any-Part-of-Pixel method to fill paths.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Ghostscript command line: gs -dQUIET -dSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -sMediaType=PlainRecycled -r600x600 -dMediaPosition=2 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=3 -scupsPageSizeName=A4 -I/usr/share/cups/fonts -c \'<</.HWMargins[12.000000 12.000000 12.000000 12.000000] /Margins[0 0]>>setpagedevice\' -f -_
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[0]=\"CUPS_CACHEDIR=/var/cache/cups\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[1]=\"CUPS_DATADIR=/usr/share/cups\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[2]=\"CUPS_DOCROOT=/usr/share/cups/doc-root\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[3]=\"CUPS_FONTPATH=/usr/share/cups/fonts\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[4]=\"CUPS_REQUESTROOT=/var/spool/cups\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[5]=\"CUPS_SERVERBIN=/usr/lib/cups\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[6]=\"CUPS_SERVERROOT=/etc/cups\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[7]=\"CUPS_STATEDIR=/run/cups\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[8]=\"HOME=/var/spool/cups/tmp\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[9]=\"PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[10]=\"SERVER_ADMIN=root@ubuntu\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[11]=\"SOFTWARE=CUPS/2.3.1\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[12]=\"USER=root\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[13]=\"CUPS_MAX_MESSAGE=2047\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[14]=\"CUPS_SERVER=/run/cups/cups.sock\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[15]=\"CUPS_ENCRYPTION=IfRequested\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[16]=\"IPP_PORT=631\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[17]=\"CHARSET=utf-8\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[18]=\"LANG=fr_FR.UTF-8\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[19]=\"PPD=/etc/cups/ppd/RICOH_SP_211SU.ppd\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[20]=\"RIP_MAX_CACHE=128m\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[21]=\"CONTENT_TYPE=application/vnd.cups-pdf-banner\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[22]=\"DEVICE_URI=usb://RICOH/SP%20211SU?serial=RH58C2C9\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[23]=\"PRINTER_INFO=RICOH SP 211SU\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[24]=\"PRINTER_LOCATION=\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[25]=\"PRINTER=RICOH_SP_211SU\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[26]=\"PRINTER_STATE_REASONS=none\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[27]=\"CUPS_FILETYPE=document\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[28]=\"FINAL_CONTENT_TYPE=application/vnd.cups-raster\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] envp[29]=\"AUTH_INFO_REQUIRED=none\"
D [16/Mar/2021:10:40:55 +0000] [Job 9] Read 64 bytes of back-channel data...
D [16/Mar/2021:10:40:55 +0000] [Job 9] Start rendering...
D [16/Mar/2021:10:40:55 +0000] [Job 9] Processing page 1...
D [16/Mar/2021:10:40:55 +0000] [Job 9] Waiting for read thread to exit...
D [16/Mar/2021:10:40:55 +0000] [Job 9] Error: /ioerror in --showpage--
D [16/Mar/2021:10:40:55 +0000] [Job 9] Operand stack:
D [16/Mar/2021:10:40:55 +0000] [Job 9] true   (/tmp/gs_GJNK0M)   --nostringval--   1   true
D [16/Mar/2021:10:40:55 +0000] [Job 9] Execution stack:
D [16/Mar/2021:10:40:55 +0000] [Job 9] %interp_exit   .runexec2   --nostringval--   showpage   --nostringval--   2   %stopped_push   --nostringval--   showpage   showpage   false   1   %stopped_push   1990   2   3   %oparray_pop   1989   2   3   %oparray_pop   1977   2   3   %oparray_pop   showpage   1978   4   3   %oparray_pop   showpage   showpage   2   1   1   showpage   %for_pos_int_continue   1981   4   7   %oparray_pop   showpage   showpage   1840   3   9   %oparray_pop   showpage   showpage
D [16/Mar/2021:10:40:55 +0000] [Job 9] Dictionary stack:
D [16/Mar/2021:10:40:55 +0000] [Job 9] --dict:740/1123(ro)(G)--   --dict:1/20(G)--   --dict:80/200(L)--   --dict:80/200(L)--   --dict:135/256(ro)(G)--   --dict:315/325(ro)(G)--   --dict:33/64(L)--   --dict:6/9(L)--   --dict:7/20(L)--
D [16/Mar/2021:10:40:55 +0000] [Job 9] Current allocation mode is local
D [16/Mar/2021:10:40:55 +0000] [Job 9] Last OS error: Broken pipe
D [16/Mar/2021:10:40:55 +0000] [Job 9] GPL Ghostscript 9.50: Unrecoverable error, exit code 1
D [16/Mar/2021:10:40:55 +0000] [Job 9] Rendering completed
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49077 (/usr/lib/cups/filter/gstoraster) stopped with status 1.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Hint: Try setting the LogLevel to "debug" to find out more.
D [16/Mar/2021:10:40:55 +0000] [Job 9] Read 64 bytes of back-channel data...
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49079 (/usr/lib/cups/backend/usb) exited with no errors.
D [16/Mar/2021:10:40:55 +0000] [Job 9] End of messages
D [16/Mar/2021:10:40:55 +0000] [Job 9] printer-state=3(idle)
D [16/Mar/2021:10:40:55 +0000] [Job 9] printer-state-message="Rendering completed"
D [16/Mar/2021:10:40:55 +0000] [Job 9] printer-state-reasons=none

A French post is opened on the Ubuntu forum.

jschwender commented 3 years ago

this is a GDI printer. It requires a driver from manufacturer. It does not understand ANY standard format. you may try this: https://github.com/abhisekp/ricoh-sp100/tree/b9bcdb1ce45d982a89a5f672199ef7f305214ec0

LAfricain commented 3 years ago

Yes I know, my ppa provide this driver. But something is missing in the server edition, I would like to know which filter. It's working well on the desktop edition, probably the desktop install more package then the server. But I have no idea which one.

tillkamppeter commented 3 years ago

The problem is here:

D [16/Mar/2021:10:40:55 +0000] [Job 9] execv failed: Exec format error
D [16/Mar/2021:10:40:55 +0000] [Job 9] PID 49078 (/usr/lib/cups/filter/rastertolilo) stopped with status 108 (Exec format error)
D [16/Mar/2021:10:40:55 +0000] [Job 9] Hint: Try setting the LogLevel to "debug" to find out more.

It seems to be inside your rastertolilo filter. Perhaps you need to try running this filter manually from the command line, on both Desktop and Server editions.

tillkamppeter commented 3 years ago

Is there perhaps a mismatch of platforms? For example running amd64 code on an i386 system?

LAfricain commented 3 years ago

I don't think about a mismatching platform, on the same raspberry pi it's working with the desktop version, but not with the server version.

tillkamppeter commented 3 years ago

@LAfricain could you run your rastertolilo filter from the command line? Could you also run

file rastertolilo
tillkamppeter commented 3 years ago

Is perhaps your Desktop installation arm64 and your Server installation armhf (or vice versa)?

jschwender commented 3 years ago

The filter executable rastertolilo in your deb package is i386, although it is packed into a amd64 package. Are you seriously running this on an arm platform?

LAfricain commented 3 years ago

I have no idea about platform, I help a French user on the ubuntu french forum, the only thing I can say it's working with the desktop and not with the server edition. It's not a question about platform. For this reason I opened this issue. Sorry for the lack of help.

jschwender commented 3 years ago

Are you running the server edition and desktop edition both on a raspberry pi ?? Your ppa results in a package that installs an "all" architectures, but that does not mean that it will run on all architectures. The error message looks like a architecture / platform issue. Your binaries will only work on either i386 or on a amd64, nothing else.

LAfricain commented 3 years ago

Yes the problem is on the same computer, and is only with the server edition. The guy tested on two computers, with both server and desktop editions.

jschwender commented 3 years ago

please paste the output of uname -a from both computers, and maybe also lshw -c cpu

inifaress commented 3 years ago

Hi, I am the French guy. Here is the return of the commands. The first commands are those made from my Raspberry Pi, the 2nd are those made from my ubuntu Desktop 20.04. Thank you

Rpi Ubuntu 20.04 server :

pi@raspberrypi:~ $ uname -a Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux

pi@raspberrypi:~ $ sudo lshw -c cpu *-cpu:0 description: CPU product: cpu physical id: 0 bus info: cpu@0 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq *-cpu:1 description: CPU product: cpu physical id: 1 bus info: cpu@1 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq *-cpu:2 description: CPU product: cpu physical id: 2 bus info: cpu@2 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq *-cpu:3 description: CPU product: cpu physical id: 3 bus info: cpu@3 size: 1200MHz capacity: 1200MHz capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq

Ubuntu Desktop 20.04 :

inifaress@inifaress-Latitude-E5430-non-vPro:~$ uname -a Linux inifaress-Latitude-E5430-non-vPro 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

inifaress@inifaress-Latitude-E5430-non-vPro:~$ sudo lshw -c cpu

  *-cpu
       description: CPU
       produit: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
       fabricant: Intel Corp.
       identifiant matériel: 51
       information bus: cpu@0
       version: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
       emplacement: SOCKET 0
       taille: 1357MHz
       capacité: 3200MHz
       bits: 64 bits
       horloge: 100MHz
       fonctionnalités: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d cpufreq
       configuration : cores=2 enabledcores=2 threads=4

Thanks

inifaress commented 2 years ago

Hi @jschwender @tillkamppeter @LAfricain

This topic is a bit old but the problem is still present. So I allow myself to revive the topic. Thank you for your help

tillkamppeter commented 2 years ago

@inifaress the desktop is amd64, therefore the driver executable works on it, the server is ARM and therefore the driver executable does not work on it.

The problem here is that the manufacturer provides a binary-only (closed-source) driver executable for the i386 platform. Such binaries can only get executed on i386 and amd64 platforms, not on completely different processor platforms like ARM.

A solution here could be an emulator, a software running on processor platform X and emulating processor platform Y. There are many free emulators around, like emulating a Commodore Amiga on amd64 or ARM platforms. Perhaps we are lucky that there is an i386 emulator which can be run on an ARM, would be slow if this exists, but for printing it would be good enough.

kernelpanic123 commented 6 months ago

hi @tillkamppeter im on the same situation of @inifaress do you any idea of emulator that i can use on my raspbery pi to print thank you in advance

DannieDarko commented 3 days ago

You can use qemu to emulate an x86 environment. First you have to decide which distro to use. I just use the same debian my raspbian is based on by using lsb_release -c. But you can also define it manually.

# get qemu user mode binaries
sudo apt install -y qemu-user-static binfmt-support
# create x86 debian base system. Hint: for older distros like stretch use http://archive.debian.org/debian
sudo mkdir -p /opt/qemu
sudo debootstrap --foreign --verbose --no-check-gpg --arch=i386 --include=libcups2,libcupsimage2 --variant=minbase $(lsb_release -sc) /opt/qemu/debian-i386 http://deb.debian.org/debian
# copy qemu static binary to debootstrapped system
sudo cp $(grep interpreter /proc/sys/fs/binfmt_misc/qemu-i386 | cut -d' ' -f 2) /opt/qemu/debian-i386/usr/bin/
# initialize debootstrapped system
sudo chroot /opt/qemu/debian-i386 /debootstrap/debootstrap --verbose --no-check-gpg --second-stage

Now that you have your emulated x86 debian, you just need to copy the rastertolilo file.

sudo mkdir -p /opt/qemu/debian-i386/usr/lib/cups/filter
sudo cp rastertolilo /opt/qemu/debian-i386/usr/lib/cups/filter/
sudo chown -R root:root /opt/qemu/debian-i386/usr/lib/cups
sudo chmod +x /opt/qemu/debian-i386/usr/lib/cups/filter/rastertolilo

Now you may check if it works

sudo chroot /opt/qemu/debian-i386 /usr/lib/cups/filter/rastertolilo
# cancel it by pressing ctrl+c

Now that you got the cups filter working, create a helper script to execute it

echo | sudo tee /usr/lib/cups/filter/rastertolilo << EOF
#!/usr/bin/env sh
sudo -n chroot /opt/qemu/debian-i386 \$0
exit \$?
EOF
sudo chmod +x /usr/lib/cups/filter/rastertolilo

All you have left to do is to allow user lp (which usually runs print jobs for cups) to run chroot

echo "lp ALL=(ALL) NOPASSWD: /usr/sbin/chroot" | sudo tee /etc/sudoers.d/011_lp-chroot

And that's about it. Happy printing!

tillkamppeter commented 2 days ago

@DannieDarko Thank you very much! This is a great HOWTO for getting a proprietary closed-source driver working when you are on the "wrong" architecture.

DannieDarko commented 2 days ago

@tillkamppeter Thanks for the acknowledgement. I had the very same problem getting this Ricoh printer running with cups on a raspberry printserver some years ago. I ended up just using it as a shared raw printer and had the drivers installed in supported os like windows and macOS. These days I grew tired of not being able to use airprint and decided to give it another go. That's when I came up with the posted solution.