Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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?
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.
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.
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.
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)
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:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.