Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

USB printer CUPS stalls on "Sending data to printer"

3,123 views
Skip to first unread message

Emanuel Berg

unread,
Jun 20, 2016, 7:20:44 PM6/20/16
to
I have a USB printer installed with CUPS and it
seems to check out but when I print it stalls!

$ lpstat -p

printer laser is idle. enabled since Tue 21 Jun 2016 01:14:56 CEST
Sending data to printer.

--
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
- so far: 55 Blogomatic articles -

William Unruh

unread,
Jun 20, 2016, 8:09:57 PM6/20/16
to
On 2016-06-20, Emanuel Berg <embe...@student.uu.se> wrote:
> I have a USB printer installed with CUPS and it
> seems to check out but when I print it stalls!
>
> $ lpstat -p
>
> printer laser is idle. enabled since Tue 21 Jun 2016 01:14:56 CEST
> Sending data to printer.
>

Not enough info. What kind of printer? What happens at the printer when
this happens?
You could enable debugging of cups
/etc/cupsd.conf
LogLevel debug.
/etc/cups-files.conf
ErrorLog /var/log/cups/error_log

restart cups and then look in /var/log/cups/error_log after you have
sent stuff to the printer.


Emanuel Berg

unread,
Jun 20, 2016, 8:28:45 PM6/20/16
to
William Unruh <un...@invalid.ca> writes:

> Not enough info. What kind of printer?

It is a Samsung laser printer, M202x series.

I found their driver, the ULD 1.00.35, and
install it for the ARM architecture.

Now instead it says:

printer laser is idle. enabled since Tue 21 Jun 2016 02:14:04 CEST
File "/usr/lib/cups/filter/rastertospl" not available: No such file or directory

William Unruh

unread,
Jun 20, 2016, 10:32:07 PM6/20/16
to
On 2016-06-21, Emanuel Berg <embe...@student.uu.se> wrote:
> William Unruh <un...@invalid.ca> writes:
>
>> Not enough info. What kind of printer?
>
> It is a Samsung laser printer, M202x series.
>
> I found their driver, the ULD 1.00.35, and
> install it for the ARM architecture.
>
> Now instead it says:
>
> printer laser is idle. enabled since Tue 21 Jun 2016 02:14:04 CEST
> File "/usr/lib/cups/filter/rastertospl" not available: No such file or directory
>
So I guess it would be a good idea to install that file.
Try googleing
rastertospl

Emanuel Berg

unread,
Jun 20, 2016, 10:48:58 PM6/20/16
to
William Unruh <un...@invalid.ca> writes:

>> It is a Samsung laser printer, M202x series.
>> I found their driver, the ULD 1.00.35, and
>> install it for the ARM architecture.
>> Now instead it says: printer laser is idle.
>> enabled since Tue 21 Jun 2016 02:14:04 CEST
>> File "/usr/lib/cups/filter/rastertospl" not
>> available: No such file or directory
>>
> So I guess it would be a good idea to install
> that file. Try googleing rastertospl

I found rastertospl it in the ULD archive, the
i386 directory.

Now when I do print it first says "... is now
printing ...", then

printer laser is idle. enabled since Tue 21 Jun 2016 04:44:59 CEST
Rendering completed

But still nothing is printed.

William Unruh

unread,
Jun 21, 2016, 6:57:31 AM6/21/16
to
On 2016-06-21, Emanuel Berg <embe...@student.uu.se> wrote:
> William Unruh <un...@invalid.ca> writes:
>
>>> It is a Samsung laser printer, M202x series.
>>> I found their driver, the ULD 1.00.35, and
>>> install it for the ARM architecture.
>>> Now instead it says: printer laser is idle.
>>> enabled since Tue 21 Jun 2016 02:14:04 CEST
>>> File "/usr/lib/cups/filter/rastertospl" not
>>> available: No such file or directory
>>>
>> So I guess it would be a good idea to install
>> that file. Try googleing rastertospl
>
> I found rastertospl it in the ULD archive, the
> i386 directory.
>
> Now when I do print it first says "... is now
> printing ...", then
>
> printer laser is idle. enabled since Tue 21 Jun 2016 04:44:59 CEST
> Rendering completed

Did you follow my adivce on enabling debugging in cups? It is pretty
voluminous in its debugging info, and in particualr you can follow each
step in the process. For example you can see that it sends it to
rastertospl and see what happens to it (or not) afterwards.
Are you sure that you installed the ARM version of that program? It
sounds like you did not since you said that you found it in the i386
directory. (Your computer IS an ARM computer, or is it an intel
computer? You cannot mix programs for the two.)

Emanuel Berg

unread,
Jun 21, 2016, 7:22:13 AM6/21/16
to
William Unruh <un...@invalid.ca> writes:

> directory. (Your computer IS an ARM computer,
> or is it an intel computer? You cannot mix
> programs for the two.)

You are right, the problem is the computer is
ARM. I have instead installed
printer-driver-splix and now it is a matter,
God willing, of telling CUPS to use it.

Emanuel Berg

unread,
Jun 21, 2016, 8:51:45 AM6/21/16
to
Here is a list [1] what printers work with
Linux and Splix - mine, ML-2026W, isn't on that
list, so I guess it won't work?

[1] http://splix.ap2c.org/

William Unruh

unread,
Jun 21, 2016, 11:25:24 AM6/21/16
to
On 2016-06-21, Emanuel Berg <embe...@student.uu.se> wrote:
> Here is a list [1] what printers work with
> Linux and Splix - mine, ML-2026W, isn't on that
> list, so I guess it won't work?
>
> [1] http://splix.ap2c.org/

I would try it anyway, since those lists are rarely complete.

I have no idea what splix is.

Note that one web page claims that in the driver package there are both
32 bit, 64 bit and arm versions of the file. Use the arm, rather than
the i386.

>

Emanuel Berg

unread,
Jun 21, 2016, 4:30:57 PM6/21/16
to
William Unruh <un...@invalid.ca> writes:

>> Here is a list [1] what printers work with Linux and Splix - mine, ML-2026W, isn't on that list, so I guess it won't work?
>> [1] http://splix.ap2c.org/
>
> I would try it anyway, since those lists are
> rarely complete.

I have now written this zsh [1] to test all
PPDs I've found thus far:

# try all PPDs on the system:
#
# $ test-ppd **/*.ppd
#
# and, in another pane:
#
# $ watch -t -n 0.1 lpstat -p
test-ppd () {
local -a ppds
ppds=($@)

local test_file=~/TEST-TEXT-FILE
local printer=laser

for p in $ppds; do
sudo lpadmin -p $printer -E -P $p
doprint $test_file
sleep 7
done
}

> I have no idea what splix is.

It is a bunch of drivers for CUPS and Samsung
printers. But my printer isn't on the list and
so far that seems to be correct because still
no luck.

> Note that one web page claims that in the
> driver package there are both 32 bit, 64 bit
> and arm versions of the file. Use the arm,
> rather than the i386.

This is a 32 bit, ARM system.

[1] http://user.it.uu.se/~embe8573/conf/.zsh/printers

Emanuel Berg

unread,
Jun 22, 2016, 10:48:30 AM6/22/16
to
I returned the printer for another, namely

HP LaserJet P1102w

This I added with

$ sudo lpadmin -p laser -E \
-v 'usb://HP/LaserJet%20Professional%20P%201102w?serial=000000000W470T1FPR1a' \
-P /usr/share/ppd/hplip/HP/hp-laserjet_professional_p1102w-hpijs.ppd

and

$ lpstat -p

says

printer laser is idle. \
enabled since Wed 22 Jun 2016 16:41:19 CEST

But when I print with

$ lpr -P laser TEXT_FILE

I get

printer laser now printing laser-528. \
enabled since Wed 22 Jun 2016 16:42:55 CEST
Filter failed

What now?

Emanuel Berg

unread,
Jun 22, 2016, 3:37:49 PM6/22/16
to
$ lpinfo -m | grep 1102w

drv:///hpijs.drv/hp-laserjet_professional_p_1102w-hpijs.ppd HP LaserJet Professional P 1102w hpijs, 3.14.6, requires proprietary plugin
drv:///hpcups.drv/hp-laserjet_professional_p_1102w.ppd HP LaserJet Professional P 1102w, hpcups 3.14.6, requires proprietary plugin
drv:///hpijs.drv/hp-laserjet_professional_p1102w-hpijs.ppd HP LaserJet Professional p1102w hpijs, 3.14.6, requires proprietary plugin
drv:///hpcups.drv/hp-laserjet_professional_p1102w.ppd HP LaserJet Professional p1102w, hpcups 3.14.6, requires proprietary plugin

$ sudo lpinfo -v | grep LaserJet

direct hp:/usb/HP_LaserJet_Professional_P_1102w?serial=000000000W470T1FPR1a
direct usb://HP/LaserJet%20Professional%20P%201102w?serial=000000000W470T1FPR1a

This code tests all combinations (4*2 = 8) but
the result is inconclusive. It says different
things each time, for the same combinations.

One thing is certain: no printout!

test-all-printers () {
local test_file=~/DO_THIS
local test_printer

for p in {1..8}; do
test_printer=laser-$p
echo "Testing $test_printer..."
lpr -P $test_printer $test_file
done
}

add-all-printers () {
local -a devices
devices=("${(@f)$(sudo lpinfo -v | \grep LaserJet | cut -d ' ' -f 2)}")

local -a models
models=("${(@f)$(sudo lpinfo -m | \grep 1102w | cut -d ' ' -f 1)}")

local number=1
for m in $models; do
for d in $devices; do
sudo lpadmin \
-p laser-${number} \
-E \
-v $d \
-m $m
number=$(( number + 1 ))
done
done
}

Source: http://user.it.uu.se/~embe8573/conf/.zsh/printers

Emanuel Berg

unread,
Jun 22, 2016, 4:10:52 PM6/22/16
to
I found some foomatic stuff in the repos but no
PPD files.

However this file

/usr/share/foomatic/db/source/printer/HP-LaserJet_Pro_P1102w.xml

say:

This printer is supported by the foo2zjs
free software printer driver.

And I do have

/usr/bin/foo2zjs

but how do I set that up with CUPS?

Emanuel Berg

unread,
Jun 22, 2016, 6:13:21 PM6/22/16
to
IT WORKS!

Foomatic did it! :)

This is the package that was missing:

foomatic-db-compressed-ppds

And this is the function that added
the printer! (Both versions work!)

Man, it feels like we just summited K2!

Thanks a lot!

test-foomatic () {
local -a devices
devices=("${(@f)$(sudo lpinfo -v | \grep LaserJet | cut -d ' ' -f 2)}")

local foomatic='foo2zjs:0/ppd/foo2zjs/HP-LaserJet_Pro_P1102w.ppd'
local name=laser-foomatic

local number=1
for d in $devices; do
sudo lpadmin \
-p ${name}-$number \
-E \
-v $d \
-m $foomatic
number=$(( number + 1 ))
done
}

Source: http://user.it.uu.se/~embe8573/conf/.zsh/printers

William Unruh

unread,
Jun 23, 2016, 3:44:22 PM6/23/16
to
On 2016-06-22, Emanuel Berg <embe...@student.uu.se> wrote:
> I returned the printer for another, namely
>
> HP LaserJet P1102w
>
> This I added with
>
> $ sudo lpadmin -p laser -E \
> -v 'usb://HP/LaserJet%20Professional%20P%201102w?serial=000000000W470T1FPR1a' \
> -P /usr/share/ppd/hplip/HP/hp-laserjet_professional_p1102w-hpijs.ppd
>
> and
>
> $ lpstat -p
>
> says
>
> printer laser is idle. \
> enabled since Wed 22 Jun 2016 16:41:19 CEST
>
> But when I print with
>
> $ lpr -P laser TEXT_FILE
>
> I get
>
> printer laser now printing laser-528. \
> enabled since Wed 22 Jun 2016 16:42:55 CEST
> Filter failed
>
> What now?

For the third and last time, we are not mind readers, so you must
do\some debugging. I told you how to switch on debugging for cups so you
can find out aht that means and which filter is having trouble.
Why in the world do you not do it? Or maybe you just want to keep
returing your printers until you find one that works. That should waste
lots of time and money.
>

Emanuel Berg

unread,
Jun 23, 2016, 6:11:26 PM6/23/16
to
William Unruh <un...@invalid.ca> writes:

> For the third and last time, we are not mind
> readers ... Or maybe you just want to keep
> returing your printers until you find one
> that works. That should waste lots of time
> and money.

If you don't "mind", I have another proposal:
you do it, and pay for it as well!

Because as you handle your time and money so
well, I reckon by now you have a lot of both!

:)
0 new messages