LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-12-2011, 05:59 AM   #1
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Cups 1.4.6 stopped printing, Slackware 13.37 64 bit + Multi-lib


My printer is a Brother HL2040 and has worked for over a year without problems. I dual boot with Mandriva 2010.2. The printer works fine in Mandy, same dirver.

I looked in the error log, and see errors like this one, any time I try to print from an application locally.

Quote:
Bad request line "" from localhost!
I tried test page, nothing prints. I looked at Completed Jobs, and every attempt to print is listed as completed, although the printer never starts.

I have not got any good ideas on how to trouble shoot this problem. Ideas?

Possibly related. I modified this file
Quote:
/etc/profile.d/lang.sh
following this web page -->http://duganchen.ca/writings/slackware/fonts

I'm not sure if this may have something to do with the printing problem or not. This is what the file looks like now.

Quote:
#!/bin/sh
# Set the system locale. (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
# locale -a

# en_US is the Slackware default locale:
#export LANG=en_CA

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968. These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#export LANG=C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly. In those cases, you can set LANG=C before
# starting them. Still, I'd avoid UTF unless you actually need it.
export LANG=en_US.UTF-8

# Another option for en_US:
#export LANG=en_US.ISO8859-1

# One side effect of the newer locales is that the sort order
# is no longer according to ASCII values, so the sort order will
# change in many places. Since this isn't usually expected and
# can break scripts, we'll stick with traditional ASCII sorting.
# If you'd prefer the sort algorithm that goes with your $LANG
# setting, comment this out.
export LC_COLLATE=C

# End of /etc/profile.d/lang.sh
Have I borked something here?
 
Old 06-14-2011, 09:45 AM   #2
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Well, I have been working on this for two days, and the longer I work on it, the stranger it gets.

Yesterday I couldn't print a thing locally, tried different users, looked at error logs. I fixed one small problem, however I'm sure that has nothing to do with my problems. Discovered the printer would print through Samba. ( the wifes stuff printed just fine ). I thought about deleting the printer and re-installing, but why if it works through samba?

Today I turned on my netbook, running Ubuntu 10.04 and cups. I had it configure to print to my system, tried to print, and voila, it did. Now for the interesting part, I don't understand. I now have three queues, the one I had yesterday named HL2040 ( that would not print locally ); another called Brother-HL2040, and a third one, called HL2040@192.168.1.13.

I only have the one printer, a HL2040 connected to my main system called duelie. 192.168.1.13 is the netbook. So, it appears to me as if the two cups systems talk to each other, and add printer definitions. I didn't create the two new ones. So now I send a print job on duelie to the print queue that wouldn't work yesterday, today it prints. Tried the one called Brother-HL2040 and it prints locally also.

What is going on? Have I got some sort of config problem???? Suggestions?
 
Old 06-14-2011, 10:30 PM   #3
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 501

Rep: Reputation: 136Reputation: 136
Check the URI used by CUPS for the print queues on the box physically attached to the printer. Is the printer connected via TCP/IP ethernet, parrallel port, or USB? How are the print queues configured to send the data (raw, etc.)?
 
Old 06-15-2011, 09:20 AM   #4
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Quote:
Check the URI used by CUPS for the print queues on the box physically attached to the printer.
The current uri
Quote:
usb://Brother/HL-2040%20series
It is connected via USB.

Quote:
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 04f9:0028 Brother Industries, Ltd Printer
Quote:
How are the print queues configured to send the data (raw, etc.)?
Where ( what file ) do I look in for that info?

BTW, this morning I booted, the other two print queues are not there in cups. Back to the original condition, I can not print locally.

O.K. I booted my netbook, ran testpage from it, and that works. I looked at the queues and now I have three again.

This is a guess on my part, the /etc/cups/printers.conf file...

Quote:
<DefaultPrinter HL2040>
Info HL2040
Location Computer room
MakeModel Brother HL2040 for CUPS
DeviceURI usb://Brother/HL-2040%20series
State Idle
StateTime 1308061480
Type 8392708
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 0 brlpdwrapperHL2040
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
Option fitplot true
Option printer-resolution (300, 300, 3)
</Printer>
The device URI in the config file is one that is disappearing on a cold boot.

Just another stab in the dark, the queue that doesn't disappear is called HL2040. Should I edit the file and change the device uri to
Quote:
usb://HL2040/HL-2040%20series
and what effect am I to have on remote printing from samba or cups?

Last edited by camorri; 06-15-2011 at 09:31 AM.
 
Old 06-16-2011, 02:35 AM   #5
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 501

Rep: Reputation: 136Reputation: 136
If you poke around "http://localhost:631/admin" you can check a bunch of settings and CUPS configurations. Are you configuring CUPS via the CUPS web interface "http://localhost:631/admin" or via a GUI (ie KDE)? Does it work when "root" but not as your normal user?

I would delete all the printers and queues, clear out residual config files on /etc/cups and use the web interface to reconfigure the printer for local use. Don't forget to check being in the correct group, permissions etc. You may what to check out "http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:cups" for some helpful hints - especially printer sharing. it might be that you have too many "servers" and not enough clients

I run HP printers (USB and ethernet) via HPLIP+CUPS so my URI and setup is different and hard to compare.
 
1 members found this post helpful.
Old 06-16-2011, 08:26 AM   #6
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Quote:
If you poke around "http://localhost:631/admin" you can check a bunch of settings and CUPS configurations. Are you configuring CUPS via the CUPS web interface "http://localhost:631/admin" or via a GUI (ie KDE)?
I have always used the web interface. I only use the the KDE interface to look at the print queue.

Thank-you for the useful tips. I'll have a look at alienbobs tips.

I'll post back...
 
Old 06-16-2011, 04:09 PM   #7
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Well, I read through Alien Bobs cups stuff. Now I'm more confused than ever.

I deleted the print queue on my server system, the one with the HL2040 connected. Now I have absolutely no printing of any kind.

No matter how may things I try, no printing. I know this is a cups thing since the printer works fine on my other system ( same hardware dual boot ).

I do not understand the device URI's for a locally attached USB printer. I have looked at the cups doc, and I can not find an explanation that makes sense to me.

I tried setting the device URI to 'usb:///dev/usblp0' I verified this is a sym link to /dev/usb/lp0. I tried 'file:///dev/usblp0' nothing allows for local printing. I let cups make the device URI, that doesn't work either.

Help anyone?
 
Old 06-16-2011, 06:56 PM   #8
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
More investigation. If I bring up my netbook, I can print to the printer if I send the job to cups on the netbook. I think it is sending back to the printer through samba.

It still will not print if the netbook is shutdown, and I send the job to the local printer I set up in cups. This is frustrating. I shouldn't need an external cups to print locally. I know something is wrong, but what???

This is the current printers.conf file on slackware 13.37.

Quote:
cat printers.conf
# Printer configuration file for CUPS v1.4.6
# Written by cupsd on 2011-06-16 19:42
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<DefaultPrinter HL2040>
Info Brother HL-2040 series
Location Computer room on Duelie
MakeModel Brother HL2040 for CUPS
DeviceURI usb://Brother/HL-2040%20series
State Idle
StateTime 1308267734
Type 8392708
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 0 brlpdwrapperHL2040
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
 
Old 06-17-2011, 12:22 AM   #9
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 501

Rep: Reputation: 136Reputation: 136
Ok. It looks ok (DeviceURI usb://Brother/HL-2040%20series) Is /etc/rc.d/rc.cups executable? try:

/usr/sbin/lpinfo -l -v

are you choosing the "recommended" printer? googling shows that may be a problem.

Maybe wipe CUPS and do reinstall?
 
Old 06-17-2011, 09:42 AM   #10
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Yes, /etc/rc.d/rc.cups is executable.

lpinfo dumps a lot of stuff.

Here is the HL2040 part.

Quote:
Device: uri = usb://Brother/HL-2040%20series
class = direct
info = Brother HL-2040 series
make-and-model = Brother HL-2040 series
device-id = MFG:Brother;CMD:PJL,HBP;MDL:HL-2040 series;CLS:PRINTER;
location =
Wipe cups, yes, I may have to do that. The weekend is almost here, sooo i may do that then...
 
Old 06-20-2011, 10:11 AM   #11
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
I removed cups, and re-installed. Same problem. I think this is some kind of a job routing problem. Here is why I think that.

If a job is sent from another system, it prints. That includes through samba and cups. So, I must have the correct driver installed, it is the same one supplied by Brother I have been using for several years. I just did a little test, I printed an e-mail from my netbook ( Ubuntu Cups 1.4.3 ). The same e-mail from the host system printed to the local definition does not print, when I show jobs, the one locally says 'completed' 'Pages Unknown'. Now, once the two cups servers have added the definitions from the netbook to the desktop ( Slackware 13.17 ) system, if I send the job to the cups server on the netbook, the job gets sent back and printed. This is working as a 'work around' however, needing another cups server running, I don't think should be necessary.

No clew what to try next. Anyone?
 
Old 06-21-2011, 02:43 PM   #12
dwblas
Member
 
Registered: Jun 2011
Posts: 51

Rep: Reputation: Disabled
Have you tried printing as root? I doubt that it is a permission problem, but you should eliminate it. Also, the printer has to be set as the default printer. I would use lpoption -d, but it is also in the GUI, but I don't know where. When I started, it was command line only and I never changed. Oh well.
 
Old 06-21-2011, 03:15 PM   #13
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Yes, I have tried as the root user, I can not get local printing to work. The printer is set as default.

I have made some changes to /etc/cups/cupsd.conf, as suggested by the info on Alien Bob's site. Now all my cups servers talk to each other.

I can print, if I turn on my netbook, and send the job to the printer definition on the Netbook. Cups there has always worked back to the printer. So the job goes to the netbook and back.

If I send the job locally, I see in http://localhost:631 job completed although nothing prints. Its like the job got spooled to /dev/null.
 
Old 06-22-2011, 11:43 AM   #14
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware 14.0 64-bit
Posts: 228

Rep: Reputation: 41
If you can start the print process and the machine sees the printer, but no output is printed, it is often an issue of a wrongly selected printer driver. Try to check if this printer driver works for you:

http://www.profv.de/brother/
 
1 members found this post helpful.
Old 06-22-2011, 01:30 PM   #15
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,831

Original Poster
Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
jostber,

Thank-you for your post. This ppd file fixed the problem. I can now print locally. I don't understand why the driver from Brother doesn't seem to work for me now. It has been reliable for a long time.
 
  


Reply

Tags
brother hl2040 ppd


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
printing with hplip doesn't work: /usr/lib/cups/backend/hp failed ToK Linux - Hardware 10 02-02-2011 04:45 PM
System stopped printing with cups/hal error msg RetiredInMaine Linux - Desktop 3 02-20-2007 06:19 PM
Cups stopped printing with Epson D68 moo-cow Linux - Hardware 1 05-08-2006 08:04 AM
CUPS SAMBA & multi-tray printing bohara Linux - Networking 0 12-30-2003 03:24 PM


All times are GMT -5. The time now is 11:09 AM.

Main Menu
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