Epson DX4850 usb printer does not work after upgrading from 7.04 to 7.10

Bug #154833 reported by Martin Lubich
4
Affects Status Importance Assigned to Milestone
gutenprint (Ubuntu)
Invalid
Undecided
Unassigned
sane-backends (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: cupsys-driver-gutenprint

I have an epson multifunction device (printer, scanner, mass storage ) attached
to usb acting as secondary printer and scanner. Additional I have a samsung ml-1520 laser
printer attached to usb too.

After upgrading from 7.04 to 7.10 the espon dx 4850 stopped working. All print jobs get
queued but are not delivered to the device itself. The samsung works without problems.

Using the cups administration via the web interface (localhost:631) i deleted the
epson and reinstalled it using the function 'Find New Printers'. I was given the
only choice 'EPSON USB2.0 MFP(Hi-Speed) (Gutenprint USB Printer #1)' which I chose and
assigned as driver 'Epson Stylus DX4800 - CUPS+Gutenprint v5.0.1'.
The printer status page tells me that the device uri is epson:/dev/usb/lp0, which is
correct in my case.

When trying to print a test page from the printer admin page the job gets started, but
no page is actually printed. The job is held and the printer status reads
"Unable to open parallel port device file: Permission denied", which in itself is
quite puzzling, since I have an usb device.

I switched on the debug switch for cups and started a new test page. I have found
a probable cause of the problem in the cups error log.

I [19/Oct/2007:22:23:50 +0200] [Job 394] Started filter /usr/lib/cups/filter/pstops (PID 7846)
I [19/Oct/2007:22:23:50 +0200] [Job 394] Started filter /usr/lib/cups/filter/pstoraster (PID 7847)
I [19/Oct/2007:22:23:50 +0200] [Job 394] Started filter /usr/lib/cups/filter/rastertogutenprint.5.0 (PID 7849)
I [19/Oct/2007:22:23:50 +0200] [Job 394] Started backend /usr/lib/cups/backend/epson (PID 7850)
D [19/Oct/2007:22:23:50 +0200] Discarding unused job-state event...
D [19/Oct/2007:22:23:50 +0200] cupsdProcessIPPRequest: 13 status_code=0 (successful-ok)
E [19/Oct/2007:22:23:50 +0200] PID 7850 (/usr/lib/cups/backend/epson) stopped with status 1!
E [19/Oct/2007:22:23:50 +0200] [Job 394] Unable to open parallel port device file: Permission denied

The epson backend obviously terminated and thus no data is send to the printer.
Starting the epson backend by hand always leads the the above mentioned error message
abount not being able to open the parallel port device file, without stating the actual
device itself.

Next I substituted the epson backend with the folowing script to be able to strace the
actual epson backend during print operation:

#!/bin/sh

echo strace -v -o /tmp/trace /usr/lib/cups/backend/epson.orig $@ > /tmp/epson_call
strace -v -o /tmp/trace /usr/lib/cups/backend/epson.orig $@

Both dump files have owner and group set to lp.

The epson backend gets called with the parameters
401 martin Test Page 1 job-uuid=urn:uuid:fe4a98a3-b547-3089-792e-deda7ba5a46a

The trace ( after the obligatory loading ) is quite short and reads like this

....
brk(0) = 0x804d000
brk(0x806e000) = 0x806e000
open("job-uuid=urn:uuid:fe4a98a3-b547-3089-792e-deda7ba5a46a", O_RDONLY) = -1 ENOENT (No such file or directory)
dup(2) = 5
fcntl64(5, F_GETFL) = 0x1 (flags O_WRONLY)
close(5) = 0
write(2, "ERROR: unable to open print file"..., 60) = 60
exit_group(1) = ?

This again seems to indicate that the epson backend is taking the job id literally and tries to open it
as file, which obviously fails.

After having done all this digging i am now at an end with my knowledge.

Could you please have a look into this.

As a side remark: Since this printer is a multifunction device, it gets also detected
as a scanner. This leads to having the created device node (/dev/usb/lp0) getting group
ownership of scanner. I had to tweak the lp account be in group scanner as well to be able
to print in 7.04.

regards
Martin Lubich

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

Thanks for your bug report.
Please provide the output of the printing bug info script as described here: https://wiki.ubuntu.com/PrintingBugInfoScript.

Changed in gutenprint:
assignee: nobody → pascal-devuyst
status: New → Incomplete
Revision history for this message
Martin Lubich (mlubich) wrote :

Here is the output from the printing debug info script

The replacement script mentioned above does not work correctly as it is messing up the parameters.
I did some further investigation using the source code of the epson backend. I found, that it uses the cups supplied function httpSeparate to extract the device string from the uri supplied in argv[0]. httpSeparate then returns a null string for the device, because the uri is not setup correctly. The supplied uri reads epson:/dev/usb/lp0 instead of somethng like epson:///dev/usb/lp0. The uri is generated by epson backend when looking for new printers, so it seems that here may be a good starting point to investigate further.

Changed in gutenprint:
assignee: pascal-devuyst → nobody
status: Incomplete → New
Revision history for this message
Martin Lubich (mlubich) wrote :

Ok, I have figured out the underlying problem.

It all boils down to a permission problem. Sorry for the misleading information about the uri being improper.

As mentoined in my original report, I have a multifunction device, which also acts as scanner. This property
results in giving the device node /dev/usb/lp0 a group ownership of scanner. This happens through the sane udev rule file /etc/udev/rules.d/45-libsane.rules, where a mask of 664 and a GROUP of scanner is set for this device.
In feisty it was sufficient to add the group scanner to the lp system account as additional group, but now the group for executing external programs out of cups is fixed to lp (or configurable via cupsd.conf, but only one group can be specified.).
Changing the mask from 664 to 666 in /etc/udev/rules.d/45-libsane.rules solved the problem and i am now back to printing again.
But this is a more basic problem in regard to multifunction devices in general, where as soon as you have a ultifunction device you won't be able to print anymore.
My fix for the time being is to leave the /etc/udev/rules.d/45-libsane.rules file untouched and create a new file /etc/udev/rules.d/99-epsonscanner.rules which acts last and sets the mask to 666.

I hope this information helps.

regards
Martin Lubich

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

Adding sane-backends task.

Changed in sane-backends:
status: New → Confirmed
Revision history for this message
Fionn (fbe) wrote :

I found to be hit by exactly the same problem! Why is this still "undecided"? The printer is basically no longer working and I would greatly appreciate at least a workaround. :-)

Revision history for this message
Fionn (fbe) wrote :

Sorry, looks like I overlooked the solution and posted too fast. The udev rules fixed this for me.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10?

Changed in sane-backends:
importance: Undecided → Low
status: Confirmed → Incomplete
Daniel T Chen (crimsun)
Changed in gutenprint:
status: New → Incomplete
Revision history for this message
rfvuhbtg (rfvuhbtg) wrote :

I don't know, but I can also confirm it in 8.04.

I was having all kinds of problems using my Epson Stylus CX4800. Wouldn't print. Wouldn't let me have permission to check ink levels, even as root.

I can't be 100% sure that it was the exact same problem, but the workaround given here fixed my problem instantly.

Revision history for this message
Victor Vargas (kamus) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in sane-backends (Ubuntu):
status: Incomplete → Invalid
Changed in gutenprint (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.