LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 05-17-2010, 01:37 AM   #1
slackfriend
LQ Newbie
 
Registered: May 2008
Location: Berlin/ Germany
Distribution: Slackware 12/ 13
Posts: 6

Rep: Reputation: 1
Slackware64 -current: CUPS 1.4.3 and general printing related issues


[This thread is somewhat related to another thread in this forum, "Cups 1.4.2 and common problems", http://www.linuxquestions.org/questi...oblems-793787/. I open a new thread because the following is concerned with the newer CUPS 1.4.3 only. I haven' t made any tests with earlier versions of CUPS in Slackware64 -current.]

Hi,

I have spent some time with my Epson ink-jet printer (Stylus C46) and CUPS 1.4.3 and want to share my experiences.

(1) The first problem occurs when trying to configure the printer: Adding my printer and the corresponding gutenprint driver worked, but changing the default printer options to my needs (e.g. 360 dpi, four color standard mode) with the CUPS http-interface using Konqueror 4.4.3 (default) does not. Then employing Seamonkey 2.0.4 for this task (http://localhost:631/) was successful, Konqueror only shows the links to the 'advanced' printer options, e.g. "Printer Options Extra 2, Output Control Extra 1,...", but the links doesn't work.

(2) When trying to check the printer nozzles ("Print Self Test Page" in Cups' Maintenance menu), which is the cheapest form to test printer functions because it wastes less ink, I first had to generate an ordinary print-job or print a (perhaps more costly) test page ("Print Test Page" in Cups' Maintenance menu), else the nozzle check would not work.

(3) After finishing the printer configuration I shut down my machine (power off) and the printer (power off). I wait about 20 seconds and then again switched on the printer (power on) and, after that, my machine (power on). The following (cold) reboot leads to non-recognization of the printer by Cups. Only switching off the printer (power off) and then switching on (power on) again, while the machine is constantly running, would convince Cups to recognize the printer.

(4) Retrieving the ink-level from the printer using Cups' http-interface is obviously NOT provided. No option found in maintenance menu. KDE' s 'system-cofig printer 1.2.1' applet ("Printing" in KDE' s menu) offers such a function, but it does not work. ("Marker levels are not reported for this printer").

I agree to gargamel (posting #8 in the thread cited above), Cups' http-interface is confusing. More, it is also inconsistent, e.g. clicking the button "Jobs" leads to a page displaying "No jobs", and above that you'll find a button "Show all jobs". Activating this, one gets a list of all completed jobs. This is not an Apple' s highlight.


Ink-Level Retrieval
===================

The problem of retrieving the ink-level from an USB-connected printer on a newer Linux OS is concerned with the usage of kernel-space or user-space methods (please correct me if I am wrong). In Slackware 13.0 (CUPS 1.3.11) the USB-connection of the printer is made through a , udev-provided, device file, e.g. /dev/usb/lp0 for the first USB printer (kernel-space method). This implies loading of a kernel module 'usblp' (feature not compiled-in).

In Slackware 13.1 RC1 (CUPS 1.4.3) the USB-printer-connection is made also through a device file, /dev/usbdev5.2 on my machine, but no kernel module is required (user-space method). It is even forbidden to load the module 'usblp', Cups does NOT work when the module is loaded. Instead of using a kernel module, 'libusb' is employed. (I don't fully understand this new user-space method for now, and would be grateful to get a hint to an introduction to this topic.)

For ink-level retrieval from the printer, the command-line tools 'escputil' (comes with gutenprint, see 'man escputil') and 'ink' ('ink' requires 'libinklevel') could be used. Both tools need a loaded kernel module 'usblp'. Sources and SlackBuilds for ink and libinklevel can be downloaded for Slackware 13.0 from SBo. Building and using ink and libinklevel on my machine with Slackware 13.0 (32-bit) was without problems. escputil works also and provides additional options for nozzle check and nozzle (head) cleaning, which work flawlessly (the head-align function does NOT work for my printer).

But what to do on Slackware 13.1 RC1 (or 13.1 in the future)? Cups itself doesn't provide retrieval of the ink-level, it's nozzle-check function works only unreliably. Perhaps nozzle-cleaning can be performed. Loading of the kernel module 'usblp' is forbidden. CUPS 1.4.3 don't like this and refuses to work. As a workaround one can load usblp ('modprobe -v usblp') , start escputil to perform some functions ('escputil -r /dev/usblp0 -i' to retrieve ink-level (/dev/usblp0 is a link to /dev/usb/lp0)) and, after that, unload the kernel module ('rmmod -v usblp'). Don't forget this, or the printer wouldn't work anymore. In practice, after loading 'usblp' you have to wait a second before starting escputil or perhaps you get wasted output.

I think this is a much to complicated procedure. You need to be 'root' to load and unload the kernel module. You can make a small script for simplifying, but you have to login as 'root'. Such an effort is NOT acceptable, especially on a 'production'-machine. On a Ms-Windows system all this tasks can be perormed with one (or few) mouseclick(s).

As far as I know, there are no open source tools, working from user-space (wihout a loaded kernel module) to perform printer maintenance fuctions (ink-level retrieval, nozzle check, nozzle cleaning). Considering the todays' cost of ink, ink-level retrieval is strictly necessary. Besides that, you risk overheating of the nozzles - which means damaging of the print head, when they run out of ink.


Patching CUPS 1.4.3
===================

To solve the above problem (not only this, but also the problems with multi-function devices, mentioned in the thread cited above), Till Kamppeter has written a patch, http://www.cups.org/str.php?L3357 . The patch targets to use both access methods: 'libusb' and the 'usblp' kernel module. "The patch is already in use in the Debian and Ubuntu distributions for several months and there are no user complaints about it."

I tried to apply this patch to the original Slackware64 -current sources for cups-1.4.3, but had no success and got the following message:

Code:
root@m2:~/cups-1.4.3-with-usb-backend-patch/cups-1.4.3# patch -p0 < ../usb-backend-both-usblp-and-libusb.patch 

patching file backend/Makefile
patching file backend/ieee1284.c
Hunk #1 succeeded at 255 (offset -20 lines).
patching file backend/usb-hybrid.c
patching file backend/usb-libusb.c
patching file backend/usb-unix.c
Hunk #6 FAILED at 195.
Hunk #12 FAILED at 599.
2 out of 12 hunks FAILED -- saving rejects to file backend/usb-unix.c.rej
patching file backend/usb.c

root@m2:~/cups-1.4.3-with-usb-backend-patch/cups-1.4.3#
Starting Pat' s original unmodified SlackBuild after (incompletely) patching, leads to a compiling error. I don't have the knowledge to investigate the problem further, but I think there are others which have.

It is desirable to integrate this patch into Cups 1.4.3 used in the forthcoming Slackware 13.1. It would be a great benefit of the forthcoming release to provide the option to use open source tools for printer maintenance functions. I think it is not only a benefit, but a necessity, regarding the costs of ink and the risk of print-head damaging.

Martin
 
Old 05-17-2010, 04:35 AM   #2
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 223Reputation: 223Reputation: 223
Should not blame Slackware/Cups for Konq's inability to properly render pages. Trust me, the cups configuration page is not the only page Konqueror fails to process correctly

You did not apply the patch correctly, or you attempted to apply the wrong patch. Here's a section of the modified SlackBuild. I called the patch lp.patch, edited section is bold underlined.
Code:
cd $TMP
rm -rf cups-$VERSION
tar xvf $CWD/cups-$VERSION-source.tar.?z* || exit 1
cd cups-$VERSION

sed -i.orig -e 's#$exec_prefix/lib/cups#$libdir/cups#g' configure
patch -i $CWD/lp.patch -Np1 --verbose
./configure \
escputil has not worked properly 100% for any of my Epson printers since ~2004. Building libink, and ink does return the correct ink levels though. To clean the nozzles I print purge pages every now and then.

If you want it fixed, petition Epson to write, test, and release good quality Linux drivers. If you want Windows features and capabilities, use Windows. If you want better Linux support, vote with your wallet. Both HP and Lexmark release Linux drivers. I used to be a huge fan of Epson. Now I'm just a fan. My next printer will either be a Lexmark or HP. I'm leaning towards Lexmark just to try out their new found Linux enthusiasm.

Last edited by disturbed1; 05-17-2010 at 04:51 AM.
 
Old 05-17-2010, 06:21 AM   #3
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 728

Rep: Reputation: 168Reputation: 168
Quote:
Originally Posted by slackfriend View Post
It is desirable to integrate this patch into Cups 1.4.3 used in the forthcoming Slackware 13.1. It would be a great benefit of the forthcoming release to provide the option to use open source tools for printer maintenance functions. I think it is not only a benefit, but a necessity, regarding the costs of ink and the risk of print-head damaging.

Martin
And it looks like Pat saw this thread, incorporated the patch you found, and credited you in today's -current ChangeLog. Congrats and thanks for tracking down this fix!
 
Old 05-17-2010, 10:44 AM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,520

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Thanks Martin and thanks Pat for the update incorporating the patch by Till Kamppeter.
I have installed the latest package and removed my custom 80-libsane.rules from /etc/udev/rules.d. Printing and scanning is working for me with my Brother DCP-110C printer/scanner.
The scanner device - crw-rw-r-- 1 root scanner 189, 769 2010-05-18 00:30 /dev/bus/usb/007/002 and
the printer device - crw-rw---- 1 root lp 180, 0 2010-05-18 10:18 /dev/usb/lp0
 
Old 05-19-2010, 02:12 PM   #5
slackfriend
LQ Newbie
 
Registered: May 2008
Location: Berlin/ Germany
Distribution: Slackware 12/ 13
Posts: 6

Original Poster
Rep: Reputation: 1
Thanks to you all for your quick reply (I know I'm a little bit late now). Special thanks to Patrick Volkerding to incorporate Till Kamppeter's patch into the last cups package. This is how an open source community should work!

I have upgraded my system now, and the new package seems to work flawlessly with my printer (Epson Stylus C46), using the kernel module 'usblp'. However, there is at least one pitfall: setting the color model in printer options to 'RGB Color' does not work (and this is the default), one has to choose 'Grayscale' or 'CMYK' (others NOT tested), else the printer refuses to print. This is in opposite to earlier CUPS versions, e.g. v1.3.11 in Slackware 13.0. Perhaps this is a special property of the Stylus C46 linked to CUPS 1.4.3.

I also tested the new system-config-printer (s-c-p) 1.2.2 package: seems to work, but don't like to retrieve the ink level. But for this, ink, libinklevel and escputil (for the Epson printer above) work without problems. To use them all, the ordinary user must be a member of the group 'lp'. As in the CUPS' http-interface, the nozzle-check with s-c-p 1.2.2 only works, when following a print job. Will try to have a closer look to these problems.

@allend: If printing and scanning work with the listed devices, this means that both, libusb- and usblp-access are provided by the patched CUPS pkg. Thanks for this info. On my system, I get two ppd-files (and the corresponding icons in s-c-p) for the C46, but in the entry for the "libusb-printer" the state is shown as "Unplugged or turned off" (after the first or second reboot).

Martin
 
Old 05-23-2010, 07:22 PM   #6
slackfriend
LQ Newbie
 
Registered: May 2008
Location: Berlin/ Germany
Distribution: Slackware 12/ 13
Posts: 6

Original Poster
Rep: Reputation: 1
Inklevel retrieval (again) and more

After looking around on the web and some testing, it turns out, that all problems with printer maintenance functions (inklevel, nozzle-check and -cleaning) seem to come from interaction of the gutenprint-driver with cups. As Tim Waugh, the developer and maintainer of system-config-printer, argues, gutenprint does not report inklevels to cups (see email-correspondence with Jan-Pawel Wrozszinski, http://cyberelk.net/tim/software/sys...ge-7/#comments). Tim opened a bug on Red Hat Bugzila for this (see mailings cited above).

For Epson printers, you can always use escputil for all above mentioned printer maintenance functions. With my Epson Stylus C46 the maintenance functions (except print-head aligning) of escputil work with no problems, even without configuring the printer (no ppd-file, "raw" access to the usblp0-printer-device). You should not issue an escputil-command when the printer is busy, else the printer could be confused.

Unfortunately, there are today no usable modern GUI-frontends for escputil or libinklevel (see the list of links on the libinklevel-website, http://libinklevel.sourceforge.net/). Most of the existing applications doesn't fully work, are unmaintained or absolutely deprecated. But some work for libinklevel-frontends is underway.

In Slackware you may use system-config-printer to setup and configure your printer. The maintenance functions of s-c-p DOES NOT work in every system state, so the best way is: don't use them, use the maintenance-tool escputil instead of. If you are running KDE (as I do) you should be aware of the printer configuration module in KDE's System Settings. Deleting a printer with s-c-p or Cups' http-interface DOES NOT always 'automatically' remove the printer in KDE's System Settings. You may get it back after the next reboot. I think, because of this I had seen two ppd-files (and the corresponding printer icons) on my system, as mentioned in the posting above.

Martin
 
  


Reply

Tags
cups, epson, gutenprint, maintenance, printer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
font issues on slackware64-current SpelledJ Slackware 9 02-18-2010 10:16 AM
[SOLVED] slackware64-current and Amarok2 issues ... max242 Slackware 3 11-10-2009 05:20 AM
Samba + Cups Network Printing issues gruelius Linux - Networking 2 05-09-2007 12:24 AM
cups, kdeprint, printing in general fideli Linux From Scratch 2 01-26-2004 01:12 AM
Printing issues with cups/samba MDK9.2 mortalic Linux - Networking 0 10-16-2003 07:19 PM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration