OpenPrinting / OpenPrinting/foo2zjs
foo2ddst: missing "@PJL SET HOLD=OFF" causes Ricoh SP112 to accept job but never feed paper (hangs indefinitely)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Printer: Ricoh Aficio SP 112 (USB, serial X024M530950)
- OS: Armbian (Debian trixie), aarch64
- Package: printer-driver-foo2zjs 20200505dfsg0-3+b1 (Debian package)
- Driver/PPD: Ricoh SP 112 Foomatic/foo2ddst (recommended), grayscale
Symptom
- CUPS accepts the job, foomatic-rip/foo2ddst-wrapper run without errors,
all data is sent to the USB device without error. - The printer receives the job (confirmed by directly writing the raw
DDST stream to /dev/usb/lp0, bypassing CUPS entirely) but never feeds
paper. The status LED blinks continuously and the job never completes
on the printer side. - The built-in printer self-test (via the physical Start button) prints
fine, confirming the paper feed mechanism itself is not broken. - Printing the exact same document from Windows using Ricoh's official
driver works fine on the same printer/cable. - Printing via an alternative community CUPS filter
(https://github.com/vaginessa/ricoh-sp112-ppd, "pstoricohddst-gdi")
also works fine on the same printer.
Diagnosis
Comparing the PJL header emitted by foo2ddst.c against the working
pstoricohddst-gdi script, I found that foo2ddst never sends
"@PJL SET HOLD=OFF", while pstoricohddst-gdi always does:
@PJL SET COVER=OFF
@PJL SET HOLD=OFF <-- present in the working driver, missing in foo2ddst
I confirmed via grep -n HOLD foo2ddst.c that this PJL command is never
emitted anywhere in foo2ddst.c.
Fix
Adding this single line after the existing COVER=OFF line in foo2ddst.c
(~line 693, function that emits the PJL job header) resolves the issue
on my unit:
fprintf(fp, "@PJL SET COVER=OFF\r\n");
fprintf(fp, "@PJL SET HOLD=OFF\r\n"); // <-- added
After rebuilding foo2ddst with this change, the printer feeds paper and
prints correctly through CUPS as expected.
Notes
- This may only affect certain SP111/SP112 firmware revisions that
default job HOLD state differently; other users may not see this
since foo2ddst apparently works for other SP112 units. - I also tested disabling JBG_LRLTWO in the JBIG encoding options as an
earlier hypothesis; that change alone did NOT fix the issue. The
HOLD=OFF fix above is what actually resolved it. - Happy to test further patches or provide additional captured DDST
streams if useful.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in foo2ddst.c around line 693, in the function that emits the PJL job header, and compare its commands with the working pstoricohddst-gdi output described in the issue. Rebuild foo2zjs and print through CUPS to a Ricoh SP111/SP112; done means the job feeds paper and completes instead of hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100