Summary: | net-print/hplip-2.7.12-r1: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | John Masinter <john> |
Component: | [OLD] Printing | Assignee: | Printing Team <printing> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | smorg |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | new /etc/udev/rules.d/70-hpmud.rules file |
Description
John Masinter
2008-01-29 01:00:16 UTC
Created attachment 142085 [details] new /etc/udev/rules.d/70-hpmud.rules file I have been all day with same problem --different printer, same error messages -- but finally found a resolution. The attachment I am adding fixes this problem and goes in the /etc/udev/rules.d directory. I commented out the original lines and replaced it with the ones from http://launchpadlibrarian.net/9682810/C%3A%5Cdes%5Ctmp%5C55-hpmud.rules reference this bug - https://bugs.launchpad.net/ubuntu/+source/system-config-printer/+bug/147369 There were changes to the way hplip assigns permissions and ids devices - also ref this http://hplip.sourceforge.net/tech_docs/tarball_install.html I forgot, I am using net-print/hplip-2.7.12-r1 Thank you very much Ed for your comments and udev attachment. When I first researched this issue, I found many people had a problem with the usb device permissions, as setup by udev when the device is discovered. This was one of the first things I tried. New udev rules, and also, just "chmod 666" on the device. In my case, this did not change the behavior. To quadruple check, I tried your new udev rules just now, restarted udev, and it did set the usb device to: crw-rw-rw- 1 lp lp 189, 136 Jan 29 21:11 009 And my cupsd.conf specifies: Group lp So I think this is all good. But still I get the same error. I put cupsd in debug mode, and the log result of a print attempt can be viewed here: http://pastebin.org/17321 But I think the crux of the matter is this line from the log: D [29/Jan/2008:21:26:52 -0500] [Job 262] prnt/backend/hp.c 625: INFO: open device failed; will retry in 30 seconds... But it does not list the device name. The USB device is wide open: john@lisa~/tmp$ lsusb Bus 001 Device 001: ID 0000:0000 Bus 002 Device 009: ID 03f0:4c11 Hewlett-Packard Bus 002 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 john@lisa~/tmp$ ls -al /dev/bus/usb/002 total 0 drwxrwxrwx 2 root john 80 Jan 29 21:11 . drwxr-xr-x 5 root root 100 Jan 11 15:18 .. crwxrwxrwx 1 root usb 189, 128 Jan 11 15:18 001 crwxrwxrwx 1 root lp 189, 136 Jan 29 21:11 009 udev brought it up as "rw-rw---" but the cupsd conf sets group to 'lp' just like the device, so that should have worked "as is". From cupsd.conf: # execute external programs with this group Group lp But when that did not, I chmod'ed the device to 777, and restarted cups, and there was no change in the behavior. The code that the log message references from hp.c is this: /* Open hp device. */ while ((stat = hpmud_open_device(argv[0], ma.prt_mode, &hd)) != HPMUD_R_OK) { /* Display user error. */ device_event(argv[0], argv[1], 5000+stat, "error", RETRY_TIMEOUT); BUG("INFO: open device failed; will retry in %d seconds...\n", RETRY_TIMEOUT); sleep(RETRY_TIMEOUT); retry = 1; } But the log just does not display the device name. Perhaps it is the hplip device of "PSC_1500_series?serial=MY647C30Y104GG" rather than the literal usb device. I dont' know. Any tips appreciated. It works as USB backend! In other words, this works (setup with cups): HP_PSC_1500_series_USB_1 Description: HP PSC 1500 series Location: Local Printer Make and Model: HP PSC 1510 Foomatic/hpijs (recommended) Printer State: idle, accepting jobs, published. Device URI: usb://HP/PSC%201500%20series?serial=MY647C30Y104GG And this does NOT work (setup either with cups or hp-toolbox): PSC_1500 Description: HP Ink Jet Location: John's Desk Make and Model: HP PSC 1500 Foomatic/hpijs (recommended) Printer State: idle, accepting jobs, published. Device URI: hp:/usb/PSC_1500_series?serial=MY647C30Y104GG I had read that many users used this solution, and I had previously tried this by changing the device in cupsd.conf (and restarting cups of course). But at that time it did not fix it. I don't understand. This time I added the usb backend via cups, as you suggested, and it works. Now, more interesting... I left the previous hp:/ printer in tact, so I have two printers defined for same device, one using hp:/ (hplip) backend, and one using cups usb backend (non-hplip). Now, hp-toolbox reads ink levels from the hp:/ printer, but can not print to it. Also, once anything accesses the hp:/ printer, such as hp-toolbox or a print attempt to the hp:/ printer, then the previously working usb backend printer no longer works, with cups saying "device not connected." To fix this state I did this: -I deleted both printers. -killed /usr/share/hplip/hpssd.py (which was started by hp-toolbox, in trying to access the hp:/ device) -stopped cups -turned off the printer -start cups -start the printer -wait a minute for the usb device to be recognized -in cups, click "Administration", you will see two "news printers found", one as hplip backend, one as usb backend. -Added the usb backend printer again It works now! So in other words, I can print with usb backend, but this by-passes hplip and therefore does not allow use of hp-toolbox to check ink levels nor any other fancy stuff. Any ideas what's up with this? I think this is an hplip (or cups) bug. John, I'm going to propose we close this as UPSTREAM because that's really what it looks like to me and you've already filed a bug there. Apart from using safer udev rules there's not much we do to this package. Feel free to reopen when you have more info to help us make progress. Denis. I recently had the same problems with printing and in my case also the attached 70-hpmud.rules did not help. But instead of making the device open to anyone, I can successfully use hp printers by just changing the device owner (and group) to "lp" - thus leaving out the MODE="0666" stuff. Don't know why making the device less open works, though. So my working solution includes the following /etc/udev/rules.d/70-hpmud.rules. I should propably add that in the process of getting the hp printers to work on my system I upgraded to net-print/hplip-2.8.7 # Udev rules file for HP printer products. ACTION!="add", GOTO="hpmud_rules_end" SUBSYSTEM!="usb|usb_device", GOTO="hpmud_rules_end" SUBSYSTEM=="usb", ENV{DEVTYPE}!="usb_device" ,GOTO="hpmud_rules_end" # Check for AiO products (0x03f0xx11). ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??11", OWNER="lp", GROUP="lp" # Check for Photosmart products (0x03f0xx02). ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??02", OWNER="lp", GROUP="lp" # Check for Business Inkjet products (0x03f0xx12). ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??12", OWNER="lp", GROUP="lp" # Check for Deskjet products (0x03f0xx04). ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??04", OWNER="lp", GROUP="lp" # Check for LaserJet products (0x03f0xx17). ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??17", OWNER="lp", GROUP="lp" LABEL="hpmud_rules_end" |