LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-07-2015, 02:29 PM   #1
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Rep: Reputation: Disabled
Driver Problem with HP 520


My old HP 520 on parallel port (lp0) prints fine with driver CUPS+Gutenprint v5.2.9 under Slack 14.

I install the printer under Mint 17.1 Cinnamon with CUPS, which uses
CUPS+Gutenprint v5.2.10. Test page spews out a few lines of crap, then printer locks up in "Busy" state. Same for the other drivers CUPS offers for the 520. Same when a "Generic" printer is selected. Nothing to see in CUPS logs

HPLIP doesn't even see the printer on lp0, although it works fine with ENVY 4500 on USB.

Ideas anyone? Could a mere change from Gutenprint v5.2.9 to 5.2.10 really be to blame?
 
Old 08-08-2015, 06:27 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Check that Mint still provides parallel printing support

For reference, I get
Code:
lsmod |grep ppdev
ppdev                  17671  0 
parport                46360  2 ppdev,parport_pc
http://hplipopensource.com/node/217

Last edited by ferrari; 08-08-2015 at 06:32 AM.
 
Old 08-08-2015, 12:14 PM   #3
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Great idea. Here's what I get:
Quote:
>lsmod|grep ppdev
ppdev 17391 0
parport 40836 3 lp,ppdev,parport_pc
Problem may be that my userid is not a member of the 'lp' group, but something called 'lpadmin.' An 'lp' group does exist, so I'm adding myself to that group. Pressed for time now, but I'll check and post again. Thanks again for the hint.
 
Old 08-10-2015, 11:26 AM   #4
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Angry

Added group 'lp' to my user id. Still no joy. Tried 'enscript' on an ASCII file instead of 'lpr'; no Busy lockup but no printing either. Even 'cat [an ASCII file] > /dev/lp0 fails. This is making me crazy.
 
Old 08-10-2015, 04:21 PM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Can you show us how the CUPS printer URI is defined in /etc/cups/printers.conf? (It might be worth comparing that with your Slack configuration as well)

Is the printer detected if the CUPS parallel backend is executed manually?
Code:
/usr/lib/cups/backend/parallel
Some good diagnostic advice here:

https://wiki.ubuntu.com/DebuggingPri...l_port_printer
 
Old 08-11-2015, 09:27 AM   #6
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Wow, that was a revelation. /etc/cups/printers.conf shows
Quote:
DeviceURI ipps://Macintosh.local:631/printers/Brother_MFC_7340
! Don't have any idea how that got there.

Also, that URI you recommended looks very informative. Thank you. Now I'll re-re-configure my HP 520 in CUPS again, and also look into the AppArmor thing, which I am ignorant of.
 
Old 08-11-2015, 10:27 AM   #7
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Deleted all the print queues; readded the 520. Now printers.conf shows
Quote:
<DefaultPrinter HPDJ520>
UUID urn:uuid:9246d6c2-8746-3631-4a6a-6e2ae9015b07
Info HP DeskJet 520
Location Local
MakeModel HP DeskJet 520 Foomatic/pcl3 (recommended)
DeviceURI parallel:/dev/lp0
PPDTimeStamp *
State Idle
StateTime 1439303391
Type 8425476
Accepting Yes
Shared No
ColorManaged Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>
More info. I don't know if this is a good response or not.
Quote:
sudo /usr/lib/cups/backend/parallel
direct parallel:/dev/lp0 "unknown" "LPT #1" "" ""
Net result: no printing, printer locks in Busy state.

I think I need to run the diagnostics on my Slack install, to see what responses a working install gives.

Thanks again for your help.
 
Old 08-11-2015, 02:49 PM   #8
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
The printer should be detected (enumerated) by running the backend manually. Since that is not happening, you might want to check BIOS settings for the parallel port perhaps.

Another thing that I observed from examination of your printers.conf configuration is that you are using the foomatic driver. Maybe try the hpcups (HPLIP) or the gutenprint driver which are available for this model.
 
Old 08-11-2015, 03:11 PM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
To get more info about your parallel port, you could run
Code:
/sbin/lspci -v
and note whether the parport_pc driver is bound to it.
 
Old 08-12-2015, 01:37 PM   #10
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
My Slack distro (printing OK) gives the same response as Mint:
Quote:
$ /usr/lib/cups/backend/parallel
direct parallel:/dev/lp0 "unknown" "LPT #1" "" ""
Alas, the response to
Quote:
$ /sbin/lspci -v|grep parport
is empty on Slack and Mint as well.

I've determined that the problem lies with /dev/lp0. I have a file written in HP's PCL. Under Slack I can run
Quote:
$ cat [file in PCL] > /dev/lp0
and print it straight out. No CUPS involved. Under Mint the same command and file feeds a sheet, then prints nothing and the printer shows "Busy" until reset.

Permissions are the same for /dev/lp0 under Mint as for Slack. Access Control shows nothing special. I'm totally stumped.
 
Old 08-12-2015, 02:22 PM   #11
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Alas, the response to
Code:
$ /sbin/lspci -v|grep parport
is empty on Slack and Mint as well.
Okay, but I'd still like to know about the parallel port itself, so still worth comparing the hardware and driver associated. The Slack and Mint distros are installed in different machines right?

Sometimes it is necessary to load the parport_pc driver with options (to match the parameters reported by lspci)

eg in /etc/modprobe.d/parport.conf
Code:
options parport_pc io=0x378 irq=none
* The required parameters are specific to the parallel port device

Quote:
I've determined that the problem lies with /dev/lp0. I have a file written in HP's PCL. Under Slack I can run
Code:
$ cat [file in PCL] > /dev/lp0
and print it straight out. No CUPS involved. Under Mint the same command and file feeds a sheet, then prints nothing and the printer shows "Busy" until reset.

Permissions are the same for /dev/lp0 under Mint as for Slack. Access Control shows nothing special. I'm totally stumped.
That's a good test of the parallel port hardware and printer cable. Assuming it's the same cable, that really only leaves the hardware (and possibly the device driver).

Did you get a chance to check the BIOS settings for the parallel port? (eg ECP mode)
 
Old 08-13-2015, 02:35 PM   #12
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
First off, sincere thanks for sticking with me on this.

The 2 distros are on the same machine.

The BIOS reports that the parallel port is ECP. FYI, other choices with this BIOS are EPP, Bi-Directional, Output Only.

The answer may lie in the kernel compile config. I got this hint from a Linux Documentation doc on the parport module, BTW. The Mint kernel has CONFIG_PARPORT_PC_FIFO=y, whereas the Slack kernel has CONFIG_PARPORT_PC_FIFO=n. No doubt that's why dmesg reports different results for parport0 under Mint and Slack:

Quote:
Mint: parport0 PC-Style at 0x378 (0x778) irq 7 using FIFO [PCSPP, TRISTATE, COMPAT, ECP]
Slack: parport0 PC-Style at 0x378 (0x778) irq 7 [PCSPP, TRISTATE]
When time permits I'm going to follow the suggestion in the Linux Doc and add this to the parport_pc module params:
Code:
 io=0x378 irq=7 dma=none
We'll see.
 
Old 08-13-2015, 03:47 PM   #13
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
First off, sincere thanks for sticking with me on this.
I'm glad to be of whatever help I can be. I'm curious about the issue (and hopeful resolution)... and it may help others too.

Quote:
The answer may lie in the kernel compile config. I got this hint from a Linux Documentation doc on the parport module, BTW. The Mint kernel has CONFIG_PARPORT_PC_FIFO=y, whereas the Slack kernel has CONFIG_PARPORT_PC_FIFO=n. No doubt that's why dmesg reports different results for parport0 under Mint and Slack:
Yes, I think that is the crux of the issue.

Quote:
When time permits I'm going to follow the suggestion in the Linux Doc and add this to the parport_pc module params:
Code:

io=0x378 irq=7 dma=none

We'll see.
Yes, it will be interesting to see if it makes a difference. Make sure the base address and irq parameters do match what is reported in 'lspci' though. You dmesg output already convinces me that the module is correctly configured. It is that FIFO kernel configuration that is the likely issue here IMHO.
 
Old 08-13-2015, 08:09 PM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,804

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Now that I've looked, I see numerous other threads and bug reports describing similar situations

https://bugs.launchpad.net/ubuntu/+s...ux/+bug/339752
https://bugzilla.kernel.org/show_bug.cgi?id=56721
https://bugs.archlinux.org/task/35850
...and lot's more if one cares to search

The ArchLinux user found that changing the parallel port BIOS config to 'Bi-Directional' was sufficient to get things working.

You mentioned that your BIOS config was set to ECP. That usually requires a DMA channel to be selected ie I'm not sure that dma=none will work.

For reference, I have
Code:
# dmesg|grep parport
[   15.357162] parport_pc 00:01: reported by Plug and Play ACPI
[   15.357251] parport0: PC-style at 0x378 (0x778), irq 7, dma 1 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
[ 9146.896746] parport_pc 00:01: disabled
[ 9147.653327] parport_pc 00:01: activated
 
Old 08-14-2015, 11:22 AM   #15
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Problem solved! You alerted me to the ECP use of DMA...my BIOS gave no clue that a DMA channel was involved. So I took the easy way out and just set the parallel port to "Bi-Directional," per the reference you found. Now both Slack and Mint show:

Quote:
dmesg|grep par
parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE,EPP]
Mint prints via CUPS or via 'cat [a PCL file] > /dev/lp0'

I've had that HP 520 for a long long time, and I hated to see it become a paperweight.

Again, thanks for your continuing interest and your help. It renews my faith in the Linux community.
 
  


Reply



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
need dwl 520 wireless lan card driver alvi2 Linux - Wireless Networking 12 06-18-2007 03:38 PM
DWL-520+ driver install DaGGer Linux - Hardware 9 05-01-2005 10:19 PM
D-Link AirPlus DWL-520+, no Driver! The Yetti Linux - Wireless Networking 1 01-02-2005 10:50 AM
no connection with DWL-520 using linux-wlan-nx driver das111 Linux - Wireless Networking 8 10-21-2004 07:52 AM
Driver Installation - Dlink DWL-520+ Timepilot Linux - Newbie 12 08-03-2004 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:02 PM.

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
Open Source Consulting | Domain Registration