You are not logged in.
Problem: cups will not detect usb printers
Solution:
The problem is caused by a new USB CUPS backend. For this backend the "usblp" kernel module must be unloaded.
1. the usblp module needs to be blacklisted
2.
Add udev rules to make the /dev/bus/usb/*/* files corresponding to printers have the permissions 664 and group ownership "lp".
I used this udev rule which sort-off works, however it overrides the virtualbox rules. I do not have a good understanding on udev, however.
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ID_USB_INTERFACES=":0701*:", GROUP="lp", MODE="660"
Finally the first print works, but the second one hangs with 100% cpu being used.
It appears that this bug is relevant: http://www.cups.org/str.php?L3318+Qversion:1.4
I am going to try to apply that patch and see what happens
EDIT:
Ubuntu bug ticket: https://bugs.launchpad.net/ubuntu/+sour … bug/420015 (where I found all this information)
Last edited by pyther (2009-09-04 18:49:31)
Offline
This looks good. I'll be away for two weeks, but: the bugtracker is open again, and tpowa might be able to take care of it. Also, is it really necessary to blacklist usblp? We could even disable it in the kernel config?
Anyway, this should go to the bugtracker, it's important IMO.
Offline
Fedora does a hell of patching and bugfixing again. They also add a udev rule in their post.install script. But i think the udev pkg is the proper place to fix it.
Offline
I have put it in the tracker: http://bugs.archlinux.org/task/15998
The only reason I see not to remove usblp is if another service used that module. I can't think of anything, but I've only played with cups.
@brain0 have a good vacation (well I hope that is why you are going to be away for 2 weeks :-) )
Offline
I have cups-1.4.0-2, which includes the patch mentioned in bugreport, and blacklisted usblp, and I am still only able to print one job.
After that I need to restart cups to be able to print anything else.
Without restarting cups my printer's light blinks once or twice, and than it stops doing anything else.
However, I don't have any unusual processes eating up my CPU.
Any ideas?
Offline
I had this same problem and posted mine in the pacman area but I did not know at the time it was a CUPS issue but after yesterday I found out what was causing it. To bad as my printer was printing great before a recent upgrade in CUPS.
Offline
jmdennis I have the same problem you mentioned @ http://bbs.archlinux.org/viewtopic.php?id=79781
I have blacklisted usblp and deleted my printer from cups to add it again but I can't see the usb option (even when having usblp added) and yes I have the latest packages. Should I try the udev rules mentioned by pyther - does this just involve putting those line in some "filename.rules" in /etc/udev/rules.d/ ??
ARCH64 | XMonad | Configs | myAURpkgs | ArchWiki Contribs | Screenies
Offline
Offline
Are you running testing? Are you using cups 1.4? If you are using cup 1.4, but not testing, well you shouldn't be running cups 1.4!
Yeps been using testing for a while and also using cups 1.4.0-2 and udev 146-2
ARCH64 | XMonad | Configs | myAURpkgs | ArchWiki Contribs | Screenies
Offline
Offline
-> tail -n 100 -f /var/log/cups/error_log
D [16/Sep/2009:00:45:45 +1000] [CGI] envp[31] = "CONTENT_LENGTH=91"
D [16/Sep/2009:00:45:45 +1000] [CGI] envp[32] = "CONTENT_TYPE=application/ipp"
D [16/Sep/2009:00:45:45 +1000] [CGI] Started /usr/lib/cups/daemon/cups-deviced (PID 10479)
I [16/Sep/2009:00:45:45 +1000] Started "/usr/lib/cups/daemon/cups-deviced" (pid=10479)
D [16/Sep/2009:00:45:45 +1000] cupsdSendCommand: 15 file=14
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/lpd (PID 10480)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/socket (PID 10481)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 10482)
D [16/Sep/2009:00:45:45 +1000] [CGI] list_devices
D [16/Sep/2009:00:45:45 +1000] [CGI] usb_find_busses=7
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/serial (PID 10483)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/ipp (PID 10484)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/snmp (PID 10485)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/parallel (PID 10486)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/scsi (PID 10487)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/http (PID 10488)
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/smb (PID 10489)
D [16/Sep/2009:00:45:45 +1000] Script header: Content-Type: application/ipp
D [16/Sep/2009:00:45:45 +1000] Script header:
D [16/Sep/2009:00:45:45 +1000] [CGI] Flushed attributes...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Found device "lpd"...
D [16/Sep/2009:00:45:45 +1000] [CGI] Flushed attributes...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Found device "socket"...
D [16/Sep/2009:00:45:45 +1000] Script header: MIME-Version: 1.0
D [16/Sep/2009:00:45:45 +1000] Script header: Content-Type: multipart/x-mixed-replace; boundary="CUPS-MULTIPART"
D [16/Sep/2009:00:45:45 +1000] Script header:
D [16/Sep/2009:00:45:45 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:45 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:45 +1000] [CGI] Flushed attributes...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Found device "ipp"...
D [16/Sep/2009:00:45:45 +1000] [CGI] Flushed attributes...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Found device "scsi"...
D [16/Sep/2009:00:45:45 +1000] [CGI] Flushed attributes...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Found device "http"...
D [16/Sep/2009:00:45:45 +1000] [CGI] Flushed attributes...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Found device "smb"...
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10480 (lpd) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10481 (socket) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10483 (serial) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10484 (ipp) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10486 (parallel) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10487 (scsi) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10488 (http) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10489 (smb) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:45 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:45 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:45 +1000] [CGI] usb_find_devices=10
D [16/Sep/2009:00:45:45 +1000] [CGI] Failed to set configuration 1 for 04a9:1712
D [16/Sep/2009:00:45:45 +1000] [CGI] Failed to claim interface 1 for 04a9:1712: Operation not permitted
D [16/Sep/2009:00:45:45 +1000] [CGI] Failed to set configuration 1 for 04a9:1712
D [16/Sep/2009:00:45:45 +1000] [CGI] Failed to claim interface 2 for 04a9:1712: Operation not permitted
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10482 (usb) exited with no errors.
D [16/Sep/2009:00:45:47 +1000] [cups-deviced] PID 10485 (snmp) exited with no errors.
D [16/Sep/2009:00:45:47 +1000] PID 10479 (/usr/lib/cups/daemon/cups-deviced) exited with no errors.
D [16/Sep/2009:00:45:47 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:47 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:47 +1000] [CGI] Got device list!
D [16/Sep/2009:00:45:47 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:47 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] PID 10478 (/usr/lib/cups/cgi-bin/admin.cgi) exited with no errors.
D [16/Sep/2009:00:45:47 +1000] cupsdReadClient: 15 WAITING Closing on EOF
D [16/Sep/2009:00:45:47 +1000] cupsdCloseClient: 15
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] cupsdSetBusyState: Not busy
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] Regular expression "[a-z]+://"
D [16/Sep/2009:00:45:47 +1000] [CGI] lang="en_AU.UTF8", locale="/en_AU"...
D [16/Sep/2009:00:46:31 +1000] cupsdReadClient: 11 WAITING Closing on EOF
D [16/Sep/2009:00:46:31 +1000] cupsdCloseClient: 11
D [16/Sep/2009:00:46:31 +1000] Report: clients=0
D [16/Sep/2009:00:46:31 +1000] Report: jobs=27
D [16/Sep/2009:00:46:31 +1000] Report: jobs-active=0
D [16/Sep/2009:00:46:31 +1000] Report: printers=0
D [16/Sep/2009:00:46:31 +1000] Report: printers-implicit=0
D [16/Sep/2009:00:46:31 +1000] Report: stringpool-string-count=175
D [16/Sep/2009:00:46:31 +1000] Report: stringpool-alloc-bytes=3936
D [16/Sep/2009:00:46:31 +1000] Report: stringpool-total-bytes=3592
and
-> egrep "usb" /var/log/cups/error_log
E [15/Sep/2009:22:58:33 +1000] Unable to fork /usr/lib/cups/backend/usb - Resource temporarily unavailable.
D [16/Sep/2009:00:42:11 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 9270)
D [16/Sep/2009:00:42:11 +1000] [CGI] usb_find_busses=7
D [16/Sep/2009:00:42:11 +1000] [CGI] usb_find_devices=10
D [16/Sep/2009:00:42:11 +1000] [cups-deviced] PID 9270 (usb) exited with no errors.
D [16/Sep/2009:00:44:14 +1000] [CGI] usb_find_busses=7
D [16/Sep/2009:00:44:14 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 9921)
D [16/Sep/2009:00:44:14 +1000] [CGI] usb_find_devices=10
D [16/Sep/2009:00:44:14 +1000] [cups-deviced] PID 9921 (usb) exited with no errors.
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 10482)
D [16/Sep/2009:00:45:45 +1000] [CGI] usb_find_busses=7
D [16/Sep/2009:00:45:45 +1000] [CGI] usb_find_devices=10
D [16/Sep/2009:00:45:45 +1000] [cups-deviced] PID 10482 (usb) exited with no errors.
ARCH64 | XMonad | Configs | myAURpkgs | ArchWiki Contribs | Screenies
Offline
Just as I thought I had fixed my issue... tried to print to today and my printer just hangs on processing.
Offline
Well you absolutely need usblp to be unloaded.
Secondly if you put cups logging in debug mode, do you see anything helpful?
So ye according to the error_log I posted I am getting the "Failed to claim interface 1 for 04a9:1712: Operation not permitted" like message that you mentioned in another thread and well it looks it is finding usb devices but just not displaying it when I choose "Add Printer".
Instead I get:
Local Printers: SCSI Printer
Discovered Network Printers:
Other Network Printers: LPD/LPR Host or Printer
Internet Printing Protocol (ipp)
Internet Printing Protocol (http)
AppSocket/HP JetDirect
Windows Printer via SAMBA
ARCH64 | XMonad | Configs | myAURpkgs | ArchWiki Contribs | Screenies
Offline
Offline
check the permissions on /dev/bus/usb/* are any owend by group lp? I'll try to post me hopeful info later.
Nope
-> ls /dev/bus/usb/*/*
crw-rw-r-- 1 root vboxusers 189, 0 2009-09-16 00:22 /dev/bus/usb/001/001
crw-rw-r-- 1 root vboxusers 189, 128 2009-09-16 00:22 /dev/bus/usb/002/001
crw-rw-r-- 1 root vboxusers 189, 256 2009-09-16 00:22 /dev/bus/usb/003/001
crw-rw-r-- 1 root vboxusers 189, 384 2009-09-16 00:22 /dev/bus/usb/004/001
crw-rw-r-- 1 root vboxusers 189, 512 2009-09-16 00:22 /dev/bus/usb/005/001
crw-rw-r-- 1 root vboxusers 189, 513 2009-09-16 00:22 /dev/bus/usb/005/002
crw-rw-r-- 1 root vboxusers 189, 640 2009-09-16 00:22 /dev/bus/usb/006/001
crw-rw-r-- 1 root vboxusers 189, 641 2009-09-16 00:22 /dev/bus/usb/006/002
crw-rw-r-- 1 root vboxusers 189, 768 2009-09-16 00:22 /dev/bus/usb/007/001
ARCH64 | XMonad | Configs | myAURpkgs | ArchWiki Contribs | Screenies
Offline
[167580.276153] usb 3-3: default language 0x0409
[167580.285157] usb 3-3: udev 6, busnum 3, minor = 261
[167580.285164] usb 3-3: New USB device found, idVendor=04f9, idProduct=0033
[167580.285169] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[167580.285173] usb 3-3: Product: HL-2140 series
[167580.285176] usb 3-3: Manufacturer: Brother
^^
Look for some output like this from dmesg (the product and manufacturer will most likely be different)
usb 3-3 indicates that the printer node is /dev/bus/usb/003/003
So as root change the group of the node to lp and see if that helps
chgrp lp /dev/bus/usb/003/003
Last edited by pyther (2009-09-15 20:25:48)
Offline
Cheers! that was it
ARCH64 | XMonad | Configs | myAURpkgs | ArchWiki Contribs | Screenies
Offline
File a bug report because udev needs to be updated to work. When you reboot your computer you'll have to do the same thing again. I'm guessing you'd want to post to the bug report I have on the bugtracker. http://bugs.archlinux.org/task/15998
Offline
dmesg output
usb 5-2: USB disconnect, address 2
usb 5-2: new full speed USB device using uhci_hcd and address 3
usb 5-2: configuration #1 chosen from 1 choice
But when I cd to /dev/bus/usb/005
and do ls... 002 is not present:
┌─[geota][/dev/bus/usb/005]
└─╼ ls
001 003
Any ideas?
Interesting... I switched usb ports on mobo...
usb 5-2: USB disconnect, address 3
usb 5-1: new full speed USB device using uhci_hcd and address 4
usb 5-1: configuration #1 chosen from 1 choice
┌─[geota][/dev/bus/usb/005]
└─╼ ls
001 004
Although 001 is there... it seems 003 disapeared... and 004 appeared... so I assuming 004 is my printer...
Checking the permissions of the the new 004 file shows that it is owned by root but the group is lp... so I guess that is not my issue.
Checking CUPS administration page after attempting to print a test page... and now the jobs are no longer hanging on processing they immediately go to stopped... restarting the job has no effect.
HP-LaserJet-1100-27 Printers - CUPS 1.4.0 geota 125k Unknown stopped
Without usblp loaded my printer file is non-existant... i.e. /dev/usb/lp0 does not exist... only when I load usblp does it appear... this fixes the issue print jobs immediately defaulting to the stopped status... now I am back to my old behavior of the print jobs hanging idefinately i.e. stuck on processing.
HP-LaserJet-1100-29 HP-LaserJet-1100 - CUPS 1.4.0 geota 205k 1 processing since Wed 16 Sep 2009 12:08:39 AM CDT
Herm... I tried blacklisting usplp and manually pointing CUPS to the new printer file file:/dev/usb/005/004
and now when I try and print the jobs don't even show up in the CUPS admin interface....
sigh even downgrading to 1.3.11 doesn't fix my issue... i re-point my printer /dev/usb/lp0 and jobs still hang on processing... this is rather odd because just a couple of days ago I was able to print just fine with usblp and cups 1.4
I fixed my issue by carefully re-doing the steps I did last time...
http://bbs.archlinux.org/viewtopic.php?id=79352
However I did it with 1.3.11 installed... I think it mightve been just a loose connection because with my mini-parralel to parralel to USB adapters it doesnt take much if any movement for it to get a bad connection... fiddling with the connection seemed to help... I am too lazy to try this with 1.4 and since it works with 1.3.11 I am just going to ignore the updates.. so tired of debuggin printing problems : ) but at least everything now works!
Last edited by ugkbunb (2009-09-16 05:51:56)
Offline
Offline
With 1.4 you can not have usblp loaded. So this means you are not suppose to have /dev/usb/lp0. Cups is suppose to be able to detect your printer automatically.
The thing is I distinctly remember having 1.4 installed and benig able to print with usblp loaded and with the CUPS pointed to /dev/usb/lp0... furthermore CUPS can't detect my printer automatically because of the parralel to USB cable I use.... for some reason it does not pass the model information along... *I figured out the latter from some extensive googling.
Offline
^^
It doesn't detect a printer -- but that it is because of my USB to Parallel adapter not properly passing the Printer model number... lsusb lists the adapter not the printer and hence CUPS is unable to detect my printer. I have to manually point it to my printer file then after I enable FileDevice with cupsctl I am able to print -- I am not at home atm... I will retry CUPS 1.4 when I get home and see if I am able to get it to detect/print either with or without usblp.
Offline
I had the same issues with a HP Deskjet F4180, I resolved in this way:
- Blacklisted usblp
- Added specified udev rule
- Compiled and installed CUPS 1.4.1 from ABS
So far looks like it works...
Offline