Bugzilla – Bug 920937
Something lets CUPS backend "usb" sometimes no longer detect USB printers on openSUSE Tumbleweed (worked on openSUSE 13.2)
Last modified: 2015-07-21 15:07:00 UTC
Created attachment 625584 [details] snapshot of "Add new printer" output although USB printer is connected When i try to add a printer that is connected via USB, Yast and CUPS only present serial, parallel and network connectivity. They do not detect any USB connected printer If i check the USB using Kinfocenter or "Yast/Hardware Information" or "lsusb", they all show the printer is connected and give the correct device information about the printer. I'm up to date with all Tumbleweed packages so i tried this on an old laptop that has an older version of tumbleweed (still used kernel 3.18) and it detects the USB printer fine. I updated this laptop to the latest Tumbleweed and it now also fails. "lsusb" output Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 007: ID 04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 002: ID 09da:000a A4Tech Co., Ltd. Optical Mouse Opto 510D / OP-620D Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 04a9:2213 Canon, Inc. CanoScan LiDE 50/LiDE 35/LiDE 40 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 046d:c31d Logitech, Inc. Media Keyboard K200 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
What CUPS packages do you have installed? What is the output of rpm -qa | grep ^cups What do the following commands (run them as root) output? lsusb -v -d 04e8:329f lpinfo -v /usr/lib/cups/backend/usb If /usr/lib/cups/backend/usb outputs nothing, run as root strace -o /tmp/cups-backend-usb.strace -f /usr/lib/cups/backend/usb and attach /tmp/cups-backend-usb.strace as MIME type text/plain to this bug report.
CUPS rpm -qa | grep ^cups cups-libs-2.0.2-1.1.x86_64 cups-filters-ghostscript-1.0.58-4.1.x86_64 cups-filters-1.0.58-4.1.x86_64 cups-filters-foomatic-rip-1.0.58-4.1.x86_64 cups-client-2.0.2-1.1.x86_64 cups-filters-cups-browsed-1.0.58-4.1.x86_64 cups-libs-32bit-2.0.2-1.1.x86_64 cups-pk-helper-0.2.5-5.2.x86_64 cups-2.0.2-1.1.x86_64 lsusb -v -d 04e8:329f - no data returned lpinfo -v network http network ipp network https network socket serial serial:/dev/ttyS0?baud=115200 network ipps network lpd direct hp direct parallel:/dev/lp0 network smb /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=10
Is this useful? I'm just using the stock openSuse configuration, i've not changed anything. cat /usr/lib/systemd/system/configure-printer@.service [Unit] Description=Configure Plugged-In Printer Requires=cups.socket After=cups.socket [Service] ExecStart=/usr/lib/udev/udev-configure-printer add "%i" more /usr/lib/udev/rules.d/70-printer* # Low-level USB device add trigger ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="configure-printer@usb-$env{BUSNUM}-$env{DEVNUM}.service" # Low-level USB device remove trigger ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:0701*:*", RUN+="udev-configure-printer remove %p"
Not sure if this is relevent. These 2 files are different sizes, have different build times BUT the same version number Details of udev-configure-printer on failed Tumbleweed system. Version: 1.5.4-1.1 Build Time: Sat 24 Jan 2015 21:58:28 GMT Installed Size: 40.2 KiB details of udev-configure-printer on older working Tumbleweed system. Version: 1.5.4-1.1 Build Time: Sat 24 Jan 2015 21:53:43 GMT Installed Size: 39.2 KiB
(In reply to Johannes Meixner from comment #1) I've same/simialr problem... > rpm -qa | grep ^cups cups-filters-cups-browsed-1.0.58-4.1.x86_64 cups-2.0.2-1.1.x86_64 cups-filters-1.0.58-4.1.x86_64 cups-libs-2.0.2-1.1.x86_64 cups-pk-helper-0.2.5-5.2.x86_64 cups-filters-foomatic-rip-1.0.58-4.1.x86_64 cups-libs-32bit-2.0.2-1.1.x86_64 cups-filters-ghostscript-1.0.58-4.1.x86_64 cups-client-2.0.2-1.1.x86_64 > lsusb -v -d 04e8:329f atmarama:/home/gour # lsusb -v -d 0482:0011 Bus 004 Device 002: ID 0482:0011 Kyocera Corp. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.01 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0482 Kyocera Corp. idProduct 0x0011 bcdDevice 0.00 iManufacturer 1 Kyocera Mita iProduct 2 Kyocera Mita FS-920 iSerial 3 XLG6548890 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered > lpinfo -v atmarama:/home/gour # lpinfo -v network http network https network ipp network ipps serial serial:/dev/ttyS0?baud=115200 network lpd network socket direct parallel:/dev/lp0 network smb > /usr/lib/cups/backend/usb atmarama:/home/gour # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 72 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=15 DEBUG2: Printer found with device ID: ID:FS-920;MFG:Kyocera;CMD:PCLXL,PostScript Emulation,PCL5E,PJL;MDL:FS-920;CLS:PRINTER;DES:Kyocera Mita FS-920; Device URI: usb://Kyocera/FS-920?serial=XLG6548890 direct usb://Kyocera/FS-920?serial=XLG6548890 "Kyocera FS-920" "Kyocera FS-920" "ID:FS-920;MFG:Kyocera;CMD:PCLXL,PostScript Emulation,PCL5E,PJL;MDL:FS-920;CLS:PRINTER;DES:Kyocera Mita FS-920;" ""
(In reply to Saša Janiška from comment #5) > I've same/similar problem... Forgot to say that I experience this problem after I upgraded to Tumbleweed, although it works on my netbook running TW, but probably not updated to the same level.
Saša Janiška, in your case lsusb -v -d 0482:0011 lists the printer and also /usr/lib/cups/backend/usb list is as direct usb://Kyocera/FS-920?serial=XLG6548890 ... but somehow lpinfo -v does not show it, lpinfo -v should show direct usb://Kyocera/FS-920?serial=XLG6548890 Ian Powell, I have no idea why in your case according to your comment#0 your lsusb output contains Bus 002 Device 007: ID 04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer but lsusb -v -d 04e8:329f returns no data. I am not at all a USB (or libusb) expert so that I cannot debug lower-level USB (or libusb) issuse but something sems to be somehow wrong here...
Update for lsusb -v -d 04e8:329f - forgot to turn printer on this morning lsusb -v -d 04e8:329f Bus 002 Device 004: ID 04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04e8 Samsung Electronics Co., Ltd idProduct 0x329f CLP-325 Color Laser Printer bcdDevice 1.00 iManufacturer 1 (error) iProduct 2 (error) iSerial 3 (error) bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 10 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 10 can't get device qualifier: Resource temporarily unavailable can't get debug descriptor: Resource temporarily unavailable cannot read device status, Resource temporarily unavailable (11) (In reply to Johannes Meixner from comment #7) > Saša Janiška, > in your case > lsusb -v -d 0482:0011 > lists the printer and also > /usr/lib/cups/backend/usb > list is as > direct usb://Kyocera/FS-920?serial=XLG6548890 ... > but somehow > lpinfo -v > does not show it, lpinfo -v should show > direct usb://Kyocera/FS-920?serial=XLG6548890 > > > Ian Powell, > I have no idea why in your case according to your comment#0 > your lsusb output contains > Bus 002 Device 007: ID 04e8:329f Samsung Electronics Co., > Ltd CLP-325 Color Laser Printer > but > lsusb -v -d 04e8:329f > returns no data. > > > I am not at all a USB (or libusb) expert so that > I cannot debug lower-level USB (or libusb) issuse > but something sems to be somehow wrong here...
(In reply to Johannes Meixner from comment #7) > I am not at all a USB (or libusb) expert so that > I cannot debug lower-level USB (or libusb) issuse > but something sems to be somehow wrong here... What about this one: https://bugzilla.novell.com/show_bug.cgi?id=735404 ?
On my openSUSE 13.2 system it works for all CUPS versions at least for my particular USB all-in-one printer device: ------------------------------------------------------------------------------ # cat /etc/os-release NAME=openSUSE VERSION="13.2 (Harlequin)" VERSION_ID="13.2" PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)" ... # lsusb Bus 001 Device 004: ID 04b8:082c Seiko Epson Corp. Storage Device # lsusb -d 04b8:082c -v Bus 001 Device 004: ID 04b8:082c Seiko Epson Corp. Storage Device ... idVendor 0x04b8 Seiko Epson Corp. idProduct 0x082c Storage Device bcdDevice 1.00 iManufacturer 1 EPSON iProduct 2 USB2.0 MFP(Hi-Speed) ... bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 7 USB2.0 Mass Storage ... bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional iInterface 6 USB2.0 Printer ... # rpm -qa | grep ^cups cups-filters-foomatic-rip-1.0.62-1.1.x86_64 cups-devel-1.5.4-165.1.x86_64 cups-client-1.5.4-21.6.1.x86_64 cups-libs-32bit-1.5.4-21.3.1.x86_64 cups-filters-cups-browsed-1.0.62-1.1.x86_64 cups-libs-1.5.4-21.6.1.x86_64 cups-pk-helper-0.2.5-4.1.4.x86_64 cups-backend-kerberized-smb-1.0-6.1.x86_64 cups-filters-ghostscript-1.0.62-1.1.x86_64 cups-1.5.4-21.6.1.x86_64 # /usr/lib/cups/backend/usb direct usb://EPSON/Stylus%20Photo%20R360 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" # rpm -Uhv cups-1.7.5-2.1.x86_64.rpm cups-client-1.7.5-2.1.x86_64.rpm cups-libs-1.7.5-2.1.x86_64.rpm cups-devel-1.7.5-2.1.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:cups-libs-1.7.5-2.1 ################################# [ 13%] 2:cups-client-1.7.5-2.1 ################################# [ 25%] 3:cups-1.7.5-2.1 warning: /etc/cups/cupsd.conf created as /etc/cups/cupsd.conf.rpmnew ################################# [ 38%] 4:cups-devel-1.7.5-2.1 ################################# [ 50%] Cleaning up / removing... 5:cups-1.5.4-21.6.1 ################################# [ 63%] 6:cups-client-1.5.4-21.6.1 ################################# [ 75%] 7:cups-devel-1.5.4-165.1 ################################# [ 88%] 8:cups-libs-1.5.4-21.6.1 ################################# [100%] # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 110 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=4 DEBUG2: Printer found with device ID: MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360; Device URI: usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 direct usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" # rpm -Uhv cups-2.0.2-169.1.x86_64.rpm cups-client-2.0.2-169.1.x86_64.rpm cups-devel-2.0.2-169.1.x86_64.rpm cups-libs-2.0.2-169.1.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:cups-libs-2.0.2-169.1 ################################# [ 13%] 2:cups-client-2.0.2-169.1 ################################# [ 25%] 3:cups-2.0.2-169.1 warning: /etc/cups/cupsd.conf created as /etc/cups/cupsd.conf.rpmnew ################################# [ 38%] 4:cups-devel-2.0.2-169.1 ################################# [ 50%] Cleaning up / removing... 5:cups-1.7.5-2.1 ################################# [ 63%] 6:cups-client-1.7.5-2.1 ################################# [ 75%] 7:cups-devel-1.7.5-2.1 ################################# [ 88%] 8:cups-libs-1.7.5-2.1 ################################# [100%] # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=4 DEBUG2: Printer found with device ID: MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360; Device URI: usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 direct usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" ------------------------------------------------------------------------------ Just by gut feeling I don't think it is an issue in CUPS because if CUPS could no longer detect USB printers in general there should be some issue reports at CUPS upstream.
Does YaST/Printer use the CUPS backend to detect printers? The title of this bug has been changed to only refer to the CUPS backend.
https://en.opensuse.org/YaST_Printer#Connection (excerpt): -------------------------------------------------------------------------- The YaST printer module does not implement any printer autodetection on its own. It only shows those printer connections which were already autodetected by CUPS (i.e. what the CUPS command line tool "lpinfo -l -v" shows when you run it as root, see https://en.opensuse.org/SDB:CUPS_in_a_Nutshell When CUPS cannot detect a local printer connection, it cannot send data to it so that it cannot print. Therefore it would not make sense when the YaST printer module would somehow show local printer connections which are not autodetected by CUPS. -------------------------------------------------------------------------- https://en.opensuse.org/SDB:CUPS_in_a_Nutshell (excerpt): -------------------------------------------------------------------------- For older CUPS versions upon start-up, cupsd successively executes all backends in /usr/lib/cups/backend/ in order to determine which of the backends are available on the respective system. Only the available backends can be used for the configuration of queues. The available backends are displayed with "lpinfo -v". For nowadays CUPS versions not the cupsd itself but the separated cups-deviced is run that also executes all backends in /usr/lib/cups/backend/ when a "lpinfo -v" command is run (and cups-driverd is run when a "lpinfo -m" command is run, see "man cups-deviced" and "man cups-driverd"). --------------------------------------------------------------------------
Also on my openSUSE Tumbleweed system it works at least for my particular USB all-in-one printer device: ------------------------------------------------------------------------------ # cat /etc/os-release NAME=openSUSE VERSION="20150227 (Tumbleweed)" VERSION_ID="20150227" PRETTY_NAME="openSUSE 20150227 (Tumbleweed) (x86_64)" # lsusb Bus 001 Device 002: ID 04b8:082c Seiko Epson Corp. Storage Device # lsusb -d 04b8:082c -v Bus 001 Device 002: ID 04b8:082c Seiko Epson Corp. Storage Device ... bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 7 USB2.0 Mass Storage ... bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional iInterface 6 USB2.0 Printer ... # rpm -qa | grep ^cups cups-libs-32bit-2.0.2-1.1.x86_64 cups-pk-helper-0.2.5-5.2.x86_64 cups-libs-2.0.2-1.1.x86_64 cups-client-2.0.2-1.1.x86_64 cups-filters-1.0.58-4.1.x86_64 cups-filters-ghostscript-1.0.58-4.1.x86_64 cups-filters-foomatic-rip-1.0.58-4.1.x86_64 cups-2.0.2-1.1.x86_64 cups-filters-cups-browsed-1.0.58-4.1.x86_64 # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 72 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=2 DEBUG2: Printer found with device ID: MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360; Device URI: usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 direct usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" ------------------------------------------------------------------------------ Accordingly the YaST printer module shows it in its "Add New Configuration" dialog at "Specify the Connection" with the following values: - Model EPSON Stylus Photo R360 - Connection usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 - Description EPSON Stylus Photo R360 This is not a general issue. Only sometimes it does not work.
(In reply to Johannes Meixner from comment #13) > This is not a general issue. > > Only sometimes it does not work. Can you try to uninstall all CUPS-related stuff and then re-try to install your device on TW from the scratch?
Saša Janiška, I have no idea what you mean with comment#14. I have installed my openSUSE Tumbleweed system from scratch.
(In reply to Johannes Meixner from comment #15) > I have installed my openSUSE Tumbleweed system from scratch. OK. That's what I wanted you to try. ;)
Is there is something of interest in /var/log/cups/error_log ? First set "LogLevel debug" in /etc/cups/cupsd.conf then stop the cupsd then do as root rm /var/log/cups/* afterwards start the cupsd then run as root lpinfo --include-schemes usb -v then do as root cp /var/log/cups/error_log /tmp/cups-error_log.lpinfo-v.usb finally attach /tmp/cups-error_log.lpinfo-v.usb as MIME type text/plain to this bug report.
Created attachment 626167 [details] result of Add Printer in CUPS not finding USB connected printer result of Add Printer in CUPS not finding USB connected printer
Created attachment 626177 [details] As per your debug instructions I followed your instructions after deleting and reinstalling CUPS 2.02
I must be missing something important regarding USB config. i've just done lpinfo -v and it does not show any USB, i have no idea why its showing "direct hp" as i'm not using anything "hp" >lpinfo -v network ipps serial serial:/dev/ttyS0?baud=115200 network https network socket network http network lpd network ipp direct pipe network beh network smb direct parallel:/dev/lp0 direct hp network ipp://192.168.1.250 network dnssd://Samsung%20CLP-320%20Series%20(SEC00159983F298)._pdl-datastream._tcp.local/ network socket://192.168.1.250
Created attachment 626249 [details] 'lpinfo --include-schemes usb -v' output (Saša Janiška) Here is log file from my machine...
Ian Powell, please do exactly as described in comment#17
Saša Janiška, in your attachment#626249 [details] there is (excerpt): --------------------------------------------------------------------------- D [11/Mar/2015:07:48:33 +0100] [Client 4] 2.0 CUPS-Get-Devices 1 ... D [11/Mar/2015:07:48:33 +0100] [CGI] argv[5] = "requested-attributes=all include-schemes='usb'" ... D [11/Mar/2015:07:48:33 +0100] [CGI] Started /usr/lib/cups/daemon/cups-deviced (PID 15747) ... D [11/Mar/2015:07:48:33 +0100] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 15748) D [11/Mar/2015:07:48:33 +0100] [CGI] Loading USB quirks from "/usr/share/cups/usb". D [11/Mar/2015:07:48:33 +0100] [CGI] Loaded 72 quirks. D [11/Mar/2015:07:48:33 +0100] [CGI] list_devices D [11/Mar/2015:07:48:33 +0100] [CGI] libusb_get_device_list=15 D [11/Mar/2015:07:48:33 +0100] [CGI] Failed to open device, code: -3 D [11/Mar/2015:07:48:33 +0100] [cups-deviced] PID 15748 (usb) exited with no errors. ... D [11/Mar/2015:07:48:33 +0100] PID 15747 (/usr/lib/cups/daemon/cups-deviced) exited with no errors. --------------------------------------------------------------------------- In contrast on my system it is --------------------------------------------------------------------------- D [10/Mar/2015:17:24:34 +0100] [Client 4] 2.0 CUPS-Get-Devices 1 ... D [10/Mar/2015:17:24:34 +0100] [CGI] argv[5] = "requested-attributes=all include-schemes='usb'" ... D [10/Mar/2015:17:24:34 +0100] [CGI] Started /usr/lib/cups/daemon/cups-deviced (PID 5264) ... D [10/Mar/2015:17:24:34 +0100] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 5265) D [10/Mar/2015:17:24:34 +0100] [CGI] Loading USB quirks from "/usr/share/cups/usb". D [10/Mar/2015:17:24:34 +0100] [CGI] Loaded 72 quirks. D [10/Mar/2015:17:24:34 +0100] [CGI] list_devices D [10/Mar/2015:17:24:34 +0100] [CGI] libusb_get_device_list=2 D [10/Mar/2015:17:24:34 +0100] [CGI] Flushed attributes... D [10/Mar/2015:17:24:34 +0100] [cups-deviced] Found device "usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1" ... D [10/Mar/2015:17:24:34 +0100] [cups-deviced] PID 5265 (usb) exited with no errors. ... D [10/Mar/2015:17:24:34 +0100] PID 5264 (/usr/lib/cups/daemon/cups-deviced) exited with no errors. --------------------------------------------------------------------------- I think the crucial difference when it does not work is the "Failed to open device, code: -3" message. When something runs as root but cannot open stuff, it indicates that special software is active that even prohibits root to do anything. Such special software is e.g. AppArmor or SELinux. Saša Janiška and Ian Powell, do you have software like AppArmor or SELinux installed that even limits what root can do?
FYI: The "Failed to open device, code: -3" message is in the CUPS 2.0.2 source file backend/usb-libusb.c ------------------------------------------------------------------------- /* * Try opening the printer... */ if ((errcode = libusb_open(printer->device, &printer->handle)) < 0) { fprintf(stderr, "DEBUG: Failed to open device, code: %d\n", errcode); return (-1); } ------------------------------------------------------------------------- This really indicates that something special on your systems prohibits that even root can open usb device node files. Or does perhaps on your systems somehow cups-deviced not run as root as it does on my system: ------------------------------------------------------------------------- # lpinfo -v &>/dev/null & sleep 1 ; ps auxw | grep deviced ... root 3743 ... /usr/lib/cups/daemon/cups-deviced ... -------------------------------------------------------------------------
FYI: In the "Failed to open device, code: -3" message the meaning of "code: -3" is that libusb_open has failed with LIBUSB_ERROR_ACCESS = -3 see http://libusb.sourceforge.net/api-1.0/group__dev.html#ga8163100afdf933fabed0db7fa81c89d1 and http://libusb.sourceforge.net/api-1.0/group__misc.html and LIBUSB_ERROR_ACCESS means Access denied (insufficient permissions) see http://libusb.sourceforge.net/api-1.0/group__misc.html#ggab2323aa0f04bc22038e7e1740b2f29efa131f3c2f6f2bb40bc6fb60ccb6f3152f
(In reply to Johannes Meixner from comment #23) > Saša Janiška and Ian Powell, > do you have software like AppArmor or SELinux installed > that even limits what root can do? Here is the result: atmarama:/home/gour # rpm -qa | grep armor apparmor-parser-2.9.1-4.1.x86_64 patterns-openSUSE-apparmor_opt-20150105-3.1.x86_64 perl-apparmor-2.9.1-4.1.x86_64 apparmor-abstractions-2.9.1-4.1.noarch libapparmor1-2.9.1-4.1.x86_64 patterns-openSUSE-apparmor-20150105-3.1.x86_64 apparmor-profiles-2.9.1-4.1.noarch yast2-apparmor-3.1.3-1.1.noarch apparmor-docs-2.9.1-4.1.noarch python3-apparmor-2.9.1-4.1.x86_64 apparmor-utils-2.9.1-4.1.noarch I must say I was not at all aware that AppArmor is installed. :-( However, I launched it and see that it is not enabled... Any hint? atmarama:/home/gour # rpm -qa | grep armor apparmor-parser-2.9.1-4.1.x86_64 patterns-openSUSE-apparmor_opt-20150105-3.1.x86_64 perl-apparmor-2.9.1-4.1.x86_64 apparmor-abstractions-2.9.1-4.1.noarch libapparmor1-2.9.1-4.1.x86_64 patterns-openSUSE-apparmor-20150105-3.1.x86_64 apparmor-profiles-2.9.1-4.1.noarch yast2-apparmor-3.1.3-1.1.noarch apparmor-docs-2.9.1-4.1.noarch python3-apparmor-2.9.1-4.1.x86_64 apparmor-utils-2.9.1-4.1.noa
Christian Boltz, it seems AppArmor may somehow prohibit that even root can open USB device node files which causes that CUPS cannot detect USB printers. Can you have a look what might go on regarding AppArmor here? Basically I don't know anything about AppArmor (or SELinux) so that I cannot help with AppArmor (or SELinux) issues. FYI: On my openSUSE Tumbleweed system where it works I do not have the actual AppArmor software installed (except libapparmor1 that is required by systemd): ------------------------------------------------------------------------ # rpm -qa | grep -i apparmor libapparmor1-2.9.1-4.1.x86_64 # rpm -e --test libapparmor1 error: Failed dependencies: libapparmor.so.1()(64bit) is needed by (installed) systemd-210-39.1.x86_64 libapparmor.so.1(APPARMOR_1.1)(64bit) is needed by (installed) systemd-210-39.1.x86_64 # rpm -q --requires systemd | grep -i apparmor libapparmor.so.1()(64bit) libapparmor.so.1(APPARMOR_1.1)(64bit) ------------------------------------------------------------------------
On my openSUSE Tumbleweed system where it had worked ((cf. comment#13) I installed with YaST the "AppArmor" software pattern and now (without any further changes) it does no longer work as before: ------------------------------------------------------------------------- # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 72 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=2 DEBUG2: Printer found with device ID: Device URI: usb://Unknown/Printer?serial=W69P10611212214330&interface=1 direct usb://Unknown/Printer?serial=W69P10611212214330&interface=1 "Unknown" "Unknown" "" "" # lpinfo --include-schemes usb -v direct usb://Unknown/Printer?serial=W69P10611212214330&interface=1 ------------------------------------------------------------------------- This shows that the AppArmor packages do make a difference.
Created attachment 626368 [details] As requested in comment 22 - cups-error_log.lpinfo-v.usb As per request in comment 22
The attachment#626368 [details] contains (excerpt): ------------------------------------------------------------------------- D [11/Mar/2015:15:18:33 +0000] [Client 4] 2.0 CUPS-Get-Devices 1 ... D [11/Mar/2015:15:18:33 +0000] [CGI] argv[5] = "requested-attributes=all include-schemes='usb'" ... D [11/Mar/2015:15:18:33 +0000] [CGI] Started /usr/lib/cups/daemon/cups-deviced (PID 4389) ... D [11/Mar/2015:15:18:33 +0000] [cups-deviced] Started backend /usr/lib/cups/backend/usb (PID 4390) D [11/Mar/2015:15:18:33 +0000] [CGI] Loading USB quirks from "/usr/share/cups/usb". D [11/Mar/2015:15:18:33 +0000] [CGI] Loaded 114 quirks. D [11/Mar/2015:15:18:33 +0000] [CGI] list_devices D [11/Mar/2015:15:18:33 +0000] [CGI] libusb_get_device_list=10 D [11/Mar/2015:15:18:33 +0000] [cups-deviced] PID 4390 (usb) exited with no errors. ... D [11/Mar/2015:15:18:33 +0000] PID 4389 (/usr/lib/cups/daemon/cups-deviced) exited with no errors. ------------------------------------------------------------------------- This is different because there is nothing like "Failed to open device, code: -3" I cannot see why it does not detect the USB printer in this case. Ian Powell, do you have software like AppArmor or SELinux installed?
In Yast/Services manager, AppArmor was disabled but Active. i made AppArmor Inactive, stopped and started Cups and tried to Add printer but still no USB detection. I'm just using Tumbleweed as "out of the box" configuration so i've not altered AppArmor or anything like it at all. I don;t have SELinux installed lpinfo -v - gave the same info as beofre i.e. no USB Here's your test for cups-deviced:- lpinfo -v &>/dev/null & sleep 1 ; ps auxw | grep deviced [1] 6422 root 6332 0.0 0.0 0 0 ? Z 15:26 0:00 [cups-deviced] <defunct> root 6396 0.0 0.0 0 0 ? Z 15:30 0:00 [cups-deviced] <defunct> root 6424 0.0 0.1 60292 4268 ? S 15:31 0:00 /usr/lib/cups/daemon/cups-deviced 1 0 15 4 requested-attributes=all root 6447 0.0 0.0 10496 1540 pts/0 S+ 15:31 0:00 grep --color=auto deviced (In reply to Johannes Meixner from comment #30) > The attachment#626368 [details] > contains (excerpt): > ------------------------------------------------------------------------- > D [11/Mar/2015:15:18:33 +0000] [Client 4] 2.0 CUPS-Get-Devices 1 > ... > D [11/Mar/2015:15:18:33 +0000] [CGI] > argv[5] = "requested-attributes=all include-schemes='usb'" > ... > D [11/Mar/2015:15:18:33 +0000] [CGI] > Started /usr/lib/cups/daemon/cups-deviced (PID 4389) > ... > D [11/Mar/2015:15:18:33 +0000] [cups-deviced] > Started backend /usr/lib/cups/backend/usb (PID 4390) > D [11/Mar/2015:15:18:33 +0000] [CGI] > Loading USB quirks from "/usr/share/cups/usb". > D [11/Mar/2015:15:18:33 +0000] [CGI] Loaded 114 quirks. > D [11/Mar/2015:15:18:33 +0000] [CGI] list_devices > D [11/Mar/2015:15:18:33 +0000] [CGI] libusb_get_device_list=10 > D [11/Mar/2015:15:18:33 +0000] [cups-deviced] > PID 4390 (usb) exited with no errors. > ... > D [11/Mar/2015:15:18:33 +0000] > PID 4389 (/usr/lib/cups/daemon/cups-deviced) exited with no errors. > ------------------------------------------------------------------------- > > This is different because there is nothing like > "Failed to open device, code: -3" > > I cannot see why it does not detect the USB printer in this case. > > Ian Powell, > do you have software like AppArmor or SELinux installed?
For me it works again after uninstalling the AppArmor packages that got installed when I installed the "AppArmor" software pattern (cf. comment#28) and a reboot to get rid of what apparmor.service may have done: ------------------------------------------------------------------------------ # systemctl list-units | grep -i armor apparmor.service loaded active exited LSB: AppArmor initialization # systemctl status apparmor.service apparmor.service - LSB: AppArmor initialization Loaded: loaded (/etc/init.d/boot.apparmor) Active: active (exited) since Wed 2015-03-11 14:29:55 CET; 2h 6min ago Process: 574 ExecStart=/etc/init.d/boot.apparmor start (code=exited, status=0/SUCCESS) Mar 11 14:29:55 linux-jtvr boot.apparmor[574]: Starting AppArmor ..done # rpm -qa --last | less yast2-apparmor-3.1.3-1.1.noarch Wed 11 Mar 2015 14:08:13 CET perl-apparmor-2.9.1-4.1.x86_64 Wed 11 Mar 2015 14:08:13 CET patterns-openSUSE-apparmor-20150105-3.1.x86_64 Wed 11 Mar 2015 14:08:13 CET apparmor-utils-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:13 CET apparmor-profiles-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:10 CET perl-SQL-Statement-1.405-5.2.noarch Wed 11 Mar 2015 14:08:09 CET perl-DBD-SQLite-1.42-1.3.x86_64 Wed 11 Mar 2015 14:08:09 CET audit-2.4.1-1.2.x86_64 Wed 11 Mar 2015 14:08:08 CET apparmor-abstractions-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:08 CET python3-apparmor-2.9.1-4.1.x86_64 Wed 11 Mar 2015 14:08:07 CET perl-Term-ReadKey-2.32-3.2.x86_64 Wed 11 Mar 2015 14:08:07 CET perl-PlRPC-0.2020-25.1.x86_64 Wed 11 Mar 2015 14:08:07 CET patterns-openSUSE-apparmor_opt-20150105-3.1.x86_64 Wed 11 Mar 2015 14:08:07 CET perl-Params-Util-1.07-9.1.x86_64 Wed 11 Mar 2015 14:08:06 CET perl-DBI-1.628-5.2.x86_64 Wed 11 Mar 2015 14:08:06 CET perl-Clone-0.36-3.1.x86_64 Wed 11 Mar 2015 14:08:06 CET libnotify-tools-0.7.6-5.2.x86_64 Wed 11 Mar 2015 14:08:06 CET libauparse0-2.4.1-1.2.x86_64 Wed 11 Mar 2015 14:08:05 CET apparmor-parser-2.9.1-4.1.x86_64 Wed 11 Mar 2015 14:08:05 CET perl-RPC-XML-0.77-6.2.noarch Wed 11 Mar 2015 14:08:04 CET perl-Net-Daemon-0.48-13.1.noarch Wed 11 Mar 2015 14:08:04 CET perl-MLDBM-2.05-5.2.noarch Wed 11 Mar 2015 14:08:04 CET apparmor-docs-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:04 CET epson-inkjet-printer-escpr-1.4.4-1.1.x86_64 Tue 10 Mar 2015 14:55:29 CET ... # rpm -qa --last | grep 'Wed 11 Mar 2015 14:08' | cut -d ' ' -f1 yast2-apparmor-3.1.3-1.1.noarch perl-apparmor-2.9.1-4.1.x86_64 patterns-openSUSE-apparmor-20150105-3.1.x86_64 apparmor-utils-2.9.1-4.1.noarch apparmor-profiles-2.9.1-4.1.noarch perl-SQL-Statement-1.405-5.2.noarch perl-DBD-SQLite-1.42-1.3.x86_64 audit-2.4.1-1.2.x86_64 apparmor-abstractions-2.9.1-4.1.noarch python3-apparmor-2.9.1-4.1.x86_64 perl-Term-ReadKey-2.32-3.2.x86_64 perl-PlRPC-0.2020-25.1.x86_64 patterns-openSUSE-apparmor_opt-20150105-3.1.x86_64 perl-Params-Util-1.07-9.1.x86_64 perl-DBI-1.628-5.2.x86_64 perl-Clone-0.36-3.1.x86_64 libnotify-tools-0.7.6-5.2.x86_64 libauparse0-2.4.1-1.2.x86_64 apparmor-parser-2.9.1-4.1.x86_64 perl-RPC-XML-0.77-6.2.noarch perl-Net-Daemon-0.48-13.1.noarch perl-MLDBM-2.05-5.2.noarch apparmor-docs-2.9.1-4.1.noarch # rpm -e $( rpm -qa --last | grep 'Wed 11 Mar 2015 14:08' \ | cut -d ' ' -f1 | tr '\n' ' ' ) # reboot # systemctl list-units | grep -i armor [no output] # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 72 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=2 DEBUG2: Printer found with device ID: MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1;MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360; Device URI: usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 direct usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" ------------------------------------------------------------------------------
I uninstalled Apparmor (except libarmor1 as it creates dependency issues for systemd) systemctl status apparmor.service apparmor.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" "" lpinfo -v (this igves slightly different results if you run it more than once) network https network socket direct pipe network ipp network lpd network http network ipps serial serial:/dev/ttyS0?baud=115200 network beh direct parallel:/dev/lp0 network smb direct hp network ipp://192.168.1.250 network dnssd://Samsung%20CLP-320%20Series%20(SEC00159983F298)._pdl-datastream._tcp.local/ network dnssd://Samsung%20CLP-320%20Series%20(SEC00159983F298)._printer._tcp.local/ network socket://192.168.1.250 lpinfo --include-schemes usb -v - no output at all (In reply to Johannes Meixner from comment #32) > For me it works again after uninstalling the AppArmor packages > that got installed when I installed the "AppArmor" software > pattern (cf. comment#28) and a reboot to get rid of what > apparmor.service may have done: > ----------------------------------------------------------------------------- > - > # systemctl list-units | grep -i armor > apparmor.service loaded active exited LSB: AppArmor initialization > > # systemctl status apparmor.service > apparmor.service - LSB: AppArmor initialization > Loaded: loaded (/etc/init.d/boot.apparmor) > Active: active (exited) since Wed 2015-03-11 14:29:55 CET; 2h 6min ago > Process: 574 ExecStart=/etc/init.d/boot.apparmor start > (code=exited, status=0/SUCCESS) > Mar 11 14:29:55 linux-jtvr boot.apparmor[574]: Starting AppArmor ..done > > # rpm -qa --last | less > yast2-apparmor-3.1.3-1.1.noarch Wed 11 Mar 2015 14:08:13 CET > perl-apparmor-2.9.1-4.1.x86_64 Wed 11 Mar 2015 14:08:13 CET > patterns-openSUSE-apparmor-20150105-3.1.x86_64 Wed 11 Mar 2015 14:08:13 CET > apparmor-utils-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:13 CET > apparmor-profiles-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:10 CET > perl-SQL-Statement-1.405-5.2.noarch Wed 11 Mar 2015 14:08:09 CET > perl-DBD-SQLite-1.42-1.3.x86_64 Wed 11 Mar 2015 14:08:09 CET > audit-2.4.1-1.2.x86_64 Wed 11 Mar 2015 14:08:08 CET > apparmor-abstractions-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:08 CET > python3-apparmor-2.9.1-4.1.x86_64 Wed 11 Mar 2015 14:08:07 CET > perl-Term-ReadKey-2.32-3.2.x86_64 Wed 11 Mar 2015 14:08:07 CET > perl-PlRPC-0.2020-25.1.x86_64 Wed 11 Mar 2015 14:08:07 CET > patterns-openSUSE-apparmor_opt-20150105-3.1.x86_64 Wed 11 Mar 2015 14:08:07 > CET > perl-Params-Util-1.07-9.1.x86_64 Wed 11 Mar 2015 14:08:06 CET > perl-DBI-1.628-5.2.x86_64 Wed 11 Mar 2015 14:08:06 CET > perl-Clone-0.36-3.1.x86_64 Wed 11 Mar 2015 14:08:06 CET > libnotify-tools-0.7.6-5.2.x86_64 Wed 11 Mar 2015 14:08:06 CET > libauparse0-2.4.1-1.2.x86_64 Wed 11 Mar 2015 14:08:05 CET > apparmor-parser-2.9.1-4.1.x86_64 Wed 11 Mar 2015 14:08:05 CET > perl-RPC-XML-0.77-6.2.noarch Wed 11 Mar 2015 14:08:04 CET > perl-Net-Daemon-0.48-13.1.noarch Wed 11 Mar 2015 14:08:04 CET > perl-MLDBM-2.05-5.2.noarch Wed 11 Mar 2015 14:08:04 CET > apparmor-docs-2.9.1-4.1.noarch Wed 11 Mar 2015 14:08:04 CET > epson-inkjet-printer-escpr-1.4.4-1.1.x86_64 Tue 10 Mar 2015 14:55:29 CET > ... > # rpm -qa --last | grep 'Wed 11 Mar 2015 14:08' | cut -d ' ' -f1 > yast2-apparmor-3.1.3-1.1.noarch > perl-apparmor-2.9.1-4.1.x86_64 > patterns-openSUSE-apparmor-20150105-3.1.x86_64 > apparmor-utils-2.9.1-4.1.noarch > apparmor-profiles-2.9.1-4.1.noarch > perl-SQL-Statement-1.405-5.2.noarch > perl-DBD-SQLite-1.42-1.3.x86_64 > audit-2.4.1-1.2.x86_64 > apparmor-abstractions-2.9.1-4.1.noarch > python3-apparmor-2.9.1-4.1.x86_64 > perl-Term-ReadKey-2.32-3.2.x86_64 > perl-PlRPC-0.2020-25.1.x86_64 > patterns-openSUSE-apparmor_opt-20150105-3.1.x86_64 > perl-Params-Util-1.07-9.1.x86_64 > perl-DBI-1.628-5.2.x86_64 > perl-Clone-0.36-3.1.x86_64 > libnotify-tools-0.7.6-5.2.x86_64 > libauparse0-2.4.1-1.2.x86_64 > apparmor-parser-2.9.1-4.1.x86_64 > perl-RPC-XML-0.77-6.2.noarch > perl-Net-Daemon-0.48-13.1.noarch > perl-MLDBM-2.05-5.2.noarch > apparmor-docs-2.9.1-4.1.noarch > > # rpm -e $( rpm -qa --last | grep 'Wed 11 Mar 2015 14:08' \ > | cut -d ' ' -f1 | tr '\n' ' ' ) > > # reboot > > # systemctl list-units | grep -i armor > [no output] > > # /usr/lib/cups/backend/usb > DEBUG: Loading USB quirks from "/usr/share/cups/usb". > DEBUG: Loaded 72 quirks. > DEBUG: list_devices > DEBUG: libusb_get_device_list=2 > DEBUG2: Printer found with device ID: > MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1;MDL:Stylus Photo > R360;CLS:PRINTER;DES:EPSON Stylus Photo R360; Device URI: > usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 > direct > usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 > "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" > "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1; > MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" > ----------------------------------------------------------------------------- > -
Please check your logs for AppArmor-related events. This means: - for recent issues (hint: just try again), just check dmesg output - /var/log/audit/audit.log if auditd is running - /var/log/messages if you have a traditional syslog daemon running - journalctl output if you only use journald (did someone say logging is easy nowadays? ;-) In all cases, grep for "apparmor" to find AppArmor-related messages. A more specific version is to grep for DENIED and ALLOW. That said - I'm slightly wondering about this bug being related to AppArmor. The apparmor-profiles package doesn't ship any profile that is related to cups, but maybe there's another package (I'm not aware of) that ships a profile related to cups. Please check with rpm -qf /etc/apparmor.d/* |grep -v ^apparmor-profiles (that should give you some lines with apparmor-abstractions, and possibly some other package names)
For now I can no longer work on it because of a security issue that has of course higher priority. Good to know that AppArmor is not expected to cause such issues. Perhaps AppArmor is false alarm and the real cause is something else? (Intentionally I wrote "AppArmor seems to prohibit...".) Because for Ian Powell there is nothing like "Failed to open device, code: -3" (cf. comment#30 versus comment#23) it indicates that the root cause is not an access permission issue. On the other hand after Ian Powell removed AppArmor, the CUPS backend "usb" detected his printer once which again seems to indicate that AppArmor makes a difference but his subsequent "lpinfo" call (that again runs the "usb" backend) did no longer detected his printer (see comment#33). In comment#33 "different results if you run it more than once" may indicate that the root cause is not AppArmor because I would expect that AppArmor either always allows something or always prohibits something but not that results differ when one does the same more than once. In general when results differ when one does the same more than once the usual root cause is something hardware related (or a timing issue in a software component) e.g. when hardware stuff depends on various subtle/fragile conditions. Perhaps bug#914575 is related or even the same issue? Currently it seems we are back at comment#7: I am not at all a USB (or libusb) expert so that I cannot debug lower-level USB (or libusb) issuse but something sems to be somehow wrong here...
(In reply to Johannes Meixner from comment #28) > This shows that the AppArmor packages do make a difference. For the sake of experiment I tried to configure my printer with the netbook also running TW. It's interesting to note that it also has AppArmor installed/disabled. I did try to install to same printer-related packages on the both machines and the end result is that my netbook detects printer while the desktop machine does not. I was comparing the versions of the packages including udev etc. and the only difference I could spot is that in regard to kernel, iow. Both desktop & netbook give the following output for: zypper se -s -v -i kernel-desktop: S | Name | Type | Version | Arch | Repository --+----------------+---------+------------+--------+------------------ i | kernel-desktop | package | 3.16.7-7.1 | x86_64 | (System Packages) name: kernel-desktop i | kernel-desktop | package | 3.19.0-2.4 | x86_64 | (System Packages) name: kernel-desktop but the difference is that 'uname -r' output is: a) desktop: 3.19.0-2-desktop b) netbook: 3.16.7-7-desktop The question is why the two versions are shown as installed and how to resolve it? Of course, now I'm curious about your kernel version? netbooK:
cat /var/log/audit/audit.log cat: /var/log/audit/audit.log: No such file or directory Only errors in /var/log/messages 2015-03-05T13:15:31.349482+00:00 LianLi org.fedoraproject.Config.Printing[1339]: import cups 2015-03-05T13:15:31.350221+00:00 LianLi org.fedoraproject.Config.Printing[1339]: ImportError: No module named 'cups' 2015-03-05T13:15:52.707946+00:00 LianLi org.fedoraproject.Config.Printing[1339]: import cups 2015-03-05T13:15:52.708065+00:00 LianLi org.fedoraproject.Config.Printing[1339]: ImportError: No module named 'cups' journalctl | grep cups No data rpm -qf /etc/apparmor.d/* |grep -v ^apparmor-profiles apparmor-abstractions-2.9.1-5.1.noarch apparmor-parser-2.9.1-5.1.x86_64 apparmor-abstractions-2.9.1-5.1.noarch apparmor-abstractions-2.9.1-5.1.noarch apparmor-abstractions-2.9.1-5.1.noarch Not sure if this is relevent. These 2 versions of udev-configure-printer are different sizes, have different build times BUT the same version number Details of udev-configure-printer on failed Tumbleweed system. Version: 1.5.4-1.1 Build Time: Sat 24 Jan 2015 21:58:28 GMT Installed Size: 40.2 KiB details of udev-configure-printer on older working Tumbleweed system. Version: 1.5.4-1.1 Build Time: Sat 24 Jan 2015 21:53:43 GMT Installed Size: 39.2 KiB (In reply to Christian Boltz from comment #34) > Please check your logs for AppArmor-related events. > > This means: > - for recent issues (hint: just try again), just check dmesg output > - /var/log/audit/audit.log if auditd is running > - /var/log/messages if you have a traditional syslog daemon running > - journalctl output if you only use journald > (did someone say logging is easy nowadays? ;-) > > In all cases, grep for "apparmor" to find AppArmor-related messages. A more > specific version is to grep for DENIED and ALLOW. > > That said - I'm slightly wondering about this bug being related to AppArmor. > The apparmor-profiles package doesn't ship any profile that is related to > cups, but maybe there's another package (I'm not aware of) that ships a > profile related to cups. Please check with > rpm -qf /etc/apparmor.d/* |grep -v ^apparmor-profiles > (that should give you some lines with apparmor-abstractions, and possibly > some other package names)
(In reply to Ian Powell from comment #37) > Only errors in /var/log/messages > 2015-03-05T13:15:31.349482+00:00 LianLi > org.fedoraproject.Config.Printing[1339]: import cups > 2015-03-05T13:15:31.350221+00:00 LianLi > org.fedoraproject.Config.Printing[1339]: ImportError: No module named 'cups' > 2015-03-05T13:15:52.707946+00:00 LianLi Wild guess: zypper in python-cups (or python3-cups) > journalctl | grep cups Just to be sure - did you also grep for "apparmor"? > rpm -qf /etc/apparmor.d/* |grep -v ^apparmor-profiles ok, no unexpected profiles - so it is very unlikely that AppArmor is involved here.
(In reply to Christian Boltz from comment #38) > (In reply to Ian Powell from comment #37) > > Only errors in /var/log/messages > > 2015-03-05T13:15:31.349482+00:00 LianLi > > org.fedoraproject.Config.Printing[1339]: import cups > > 2015-03-05T13:15:31.350221+00:00 LianLi > > org.fedoraproject.Config.Printing[1339]: ImportError: No module named 'cups' > > 2015-03-05T13:15:52.707946+00:00 LianLi > > Wild guess: zypper in python-cups (or python3-cups) no idea, all this is outside my scope of knowledge > > journalctl | grep cups > > Just to be sure - did you also grep for "apparmor"? I didn't but have now and nothign found > > rpm -qf /etc/apparmor.d/* |grep -v ^apparmor-profiles > > ok, no unexpected profiles - so it is very unlikely that AppArmor is > involved here.
(In reply to Ian Powell from comment #39) > > Wild guess: zypper in python-cups (or python3-cups) > > no idea, all this is outside my scope of knowledge I'm sure it is not ;-) - but maybe my comment wasn't clear enough. The long versin is: Please install the python-cups (and/or) python3-cups) package and try if you still hit this bug ;-) > > Just to be sure - did you also grep for "apparmor"? > > I didn't but have now and nothign found ok, then AppArmor is not involved here.
(In reply to Christian Boltz from comment #40) > (In reply to Ian Powell from comment #39) > > > Wild guess: zypper in python-cups (or python3-cups) > > > > no idea, all this is outside my scope of knowledge > > I'm sure it is not ;-) - but maybe my comment wasn't clear enough. > > The long versin is: > Please install the python-cups (and/or) python3-cups) package and try > if you still hit this bug ;-) ooops... python-cups was already installed, can't find a python3-cups in Tumbleweed repos to install > > > Just to be sure - did you also grep for "apparmor"? > > > > I didn't but have now and nothign found > > ok, then AppArmor is not involved here.
(In reply to Ian Powell from comment #41) > ooops... python-cups was already installed, can't find a python3-cups in > Tumbleweed repos to install Indeed, there's no python3 version of this package yet (I should have checked before writing about it ;-) python-cups only contains a python module for python 2.7, and exactly that seems to be the problem. /usr/share/dbus-1/services/org.fedoraproject.Config.Printing.service has Exec=/usr/bin/scp-dbus-service and that finally calls /usr/share/system-config-printer/scp-dbus-service.py which has a /usr/bin/python3 shebang line. I wouldn't be surprised if changing this line to /usr/bin/python (without "3") would work around the problem (please test!). The correct solution is obviously to provide a python3-cups package and to change the dependencies in the packages that currently require python-cups. That said, I'll pass this bug back to Johannes ;-) In exchange for the free debugging, I hope you can help me with testing an AppArmor profile for cups when it's ready ;-) Ubuntu has a profile we can steal, but I want to test it myself before pushing it out to more people. Oh, and if you want to learn something about AppArmor, just catch me at oSC15 ;-)
The root cause of this issue is very likely not in a "Printing" package but elsewhere so that this issue does not belong to the Bugzilla component "Printing". Reason: For me everything works for openSUSE 13.2 with any CUPS version (see comment#10) and apparently also for any user (no such issue report at all for openSUSE 13.2) and for me it also works on openSUSE Tumbleweed (see comment#13 - at least mostly see comment#28). In particular comment#36 ("netbook detects printer while the desktop machine does not") indicates that the root cause of this issue is not in a "Printing" package but in a hardware-dependant software which is usually the kernel or perhaps libusb. Again: I am not at all a USB (or libusb) expert so that I can neither debug nor fix lower-level USB (or libusb) issues. I even cannot decide in what software component the root cause is. Perhaps in the kernel or libusb but this is only a blind guess from me. Therefore it does not help to assign or re-assign such issues to me.
Christian Boltz, with probability one (http://en.wikipedia.org/wiki/Almost_surely) I will not get the time in the foreseeable future for any AppArmor testing. Ian Powell and Saša Janiška regarding lower-level USB (or libusb) issues: Perhaps on your systems where it does not work there are "interesting" messages related to usb in "the usual log files", cf. comment#34 (dmesg, /var/log/messages, journalctl, whatever-trendy-nowadays...)?
(In reply to Christian Boltz from comment #42) > (In reply to Ian Powell from comment #41) > > ooops... python-cups was already installed, can't find a python3-cups in > > Tumbleweed repos to install > > Indeed, there's no python3 version of this package yet (I should have > checked before writing about it ;-) python-cups only contains a python > module for python 2.7, and exactly that seems to be the problem. > > /usr/share/dbus-1/services/org.fedoraproject.Config.Printing.service has > Exec=/usr/bin/scp-dbus-service and that finally calls > /usr/share/system-config-printer/scp-dbus-service.py which has a > /usr/bin/python3 shebang line. I wouldn't be surprised if changing this line > to /usr/bin/python (without "3") would work around the problem (please > test!). I've changed it and still no joy. it also has this line in it "cups.require ("1.9.52")" > The correct solution is obviously to provide a python3-cups package and to > change the dependencies in the packages that currently require python-cups. this would be my preferred option > That said, I'll pass this bug back to Johannes ;-) > > In exchange for the free debugging, I hope you can help me with testing an > AppArmor profile for cups when it's ready ;-) Ubuntu has a profile we can > steal, but I want to test it myself before pushing it out to more people. > Oh, and if you want to learn something about AppArmor, just catch me at > oSC15 ;-) i've never switch AppArmor on so i have no clue what to do with it but if you give me a test plan i can follow, i'll be glad to help
(In reply to Johannes Meixner from comment #44) > Christian Boltz, > with probability one (http://en.wikipedia.org/wiki/Almost_surely) > I will not get the time in the foreseeable future > for any AppArmor testing. > > > Ian Powell and Saša Janiška > regarding lower-level USB (or libusb) issues: > Perhaps on your systems where it does not work there are "interesting" > messages related to usb in "the usual log files", cf. comment#34 > (dmesg, /var/log/messages, journalctl, whatever-trendy-nowadays...)? i've gone all through the log files but nothing jumps out but that possibly because i don;t really knwo what i'm looking for. /usr/lib/cups/backend/usb seems ot detect it but thats as far as it gets DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" ""
(In reply to Johannes Meixner from comment #44) > Christian Boltz, > with probability one (http://en.wikipedia.org/wiki/Almost_surely) > I will not get the time in the foreseeable future > for any AppArmor testing. > > > Ian Powell and Saša Janiška > regarding lower-level USB (or libusb) issues: > Perhaps on your systems where it does not work there are "interesting" > messages related to usb in "the usual log files", cf. comment#34 > (dmesg, /var/log/messages, journalctl, whatever-trendy-nowadays...)? i've just read an email in the opensuse forum that suggects that Kenerl 3.19 has borked USB storage - do you think this could be realted?
When the kernel has issues in its general USB functionality, it could of course be the root cause here but I guess that issues in USB storage are unrelated to issues in USB that are related to printers? Ian Powell and Saša Janiška, do you really have no usb related error messages in any of "the usual log places" on your systems? I think without usb related error messages it does not make much sense to let a kernel developer have a look, nevertheless: Oliver Neukum, this issue here is basically that under currently unknown circumstances the CUPS backend /usr/lib/cups/backend/usb does no longer detect USB printers on openSUSE Tumbleweed. Do you perhaps know of general USB issues in the kernel that is used on openSUSE Tumbleweed that could be the root cause of such issues?
(In reply to Johannes Meixner from comment #48) > When the kernel has issues in its general USB functionality, > it could of course be the root cause here but I guess that > issues in USB storage are unrelated to issues in USB that > are related to printers? > > Ian Powell and Saša Janiška, > do you really have no usb related error messages > in any of "the usual log places" on your systems? > I think without usb related error messages > it does not make much sense to let a kernel developer > have a look, nevertheless: i'll reboot with the printer turned on and create an attachement of the /var/log/messages and the cups error.log > > Oliver Neukum, > this issue here is basically that under currently unknown > circumstances the CUPS backend /usr/lib/cups/backend/usb > does no longer detect USB printers on openSUSE Tumbleweed. The output from /usr/lib/cups/backend/usb does detect a printer on the USB: - see comment 46 > Do you perhaps know of general USB issues in the kernel > that is used on openSUSE Tumbleweed that could be the > root cause of such issues?
Now I switched my printer on and here is what I see in dmesg: [19091.207968] usb 5-1: new full-speed USB device number 2 using uhci_hcd [19091.376235] usb 5-1: New USB device found, idVendor=0482, idProduct=0011 [19091.376241] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [19091.376246] usb 5-1: Product: Kyocera Mita FS-920 [19091.376249] usb 5-1: Manufacturer: Kyocera Mita [19091.376253] usb 5-1: SerialNumber: XLG6548890 [19091.406338] usblp 5-1:1.0: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x0482 pid 0x0011 [19091.406386] usbcore: registered new interface driver usblp [19117.736476] parport0: lp tried to release parport when not owner [19119.576408] parport0: lp already owner [19134.599791] parport0: lp tried to release parport when not owner Moreover, I'm suspicious why lpinfo -v lists serial serial:/dev/ttyS0?baud=115200 Running lpinfo -v again, I see another thing in dmesg: [19377.237491] parport0: lp tried to release parport when not owner [19377.237495] parport0: ppdev0 forgot to release port Any idea in regard?
Created attachment 626790 [details] /var/log/messages
Created attachment 626791 [details] /var/log/cups/error.log I deleted cups log, rebooted systems, tried to run "Add Printers" from cups admin.
FYI: I opened bug 922283 to make sure the issues I found in comment 42 (the missing python3-cups package) won't get lost. Ian, thanks for the offer to test the AppArmor profile. I'll come back to you when this bug is fixed - doing it now would mean mixing this bug with a possibly incomplete AppArmor profile, and that doesn't make debugging easier ;-)
(In reply to Christian Boltz from comment #53) > Oliver Neukum, > this issue here is basically that under currently unknown > circumstances the CUPS backend /usr/lib/cups/backend/usb > does no longer detect USB printers on openSUSE Tumbleweed. > > Do you perhaps know of general USB issues in the kernel > that is used on openSUSE Tumbleweed that could be the > root cause of such issues? No. If forced to take a wild guess, I'd revert 3f2cee73b650921b2e214bf487b2061a1c266504 Can you try to confirm that this is a kernel regression?
There has been an update to udev-configure-printer to 1.5.5-1.1 and that has not made any difference to the situation
I am also having problems with Printing package cups-2.0.2 yast will not find connected usb printers but > lpr file.pdf works! Some programs takes forever to show printing dialog (like okular, but printing works once the printer shows up) My problem might be related to cups-browsed https://bugzilla.opensuse.org/show_bug.cgi?id=921983
Yast reinstall and command line start of cups-browsed did not help But I am a bit supriced that all cups-filters* packages are version 1.0.67 and not (as I would expect) 2.0.2 Shouldn't there be a 2.0.2 version of cups-filters* packages on Tumbleweed/Printing, or are these independent from cups?
Only FYI regarding comment#56 and comment#57: The CUPS backend "usb" is totally unrelated to cups-browsed. CUPS and cups-filters are different upstream projects, e.g. see "rpm -qi cups | grep URL" versus "rpm -qi cups-filters | grep URL" and for details and background information see bug#735404 and in general see https://en.opensuse.org/Concepts_printing
Hi Dirk, would you help to have a look at here please? I'm not quite sure whether it is right to assign it to you, please feel free to reassign whenever necessary, thank you!
cups has just been updated to 2.0.2-2.1.x86_64 on my system and it has not made any difference to the issue.
Did a big refresh to fix this problem - backed printing to Thumbleweed default. Did not help... Noticed a file /etc/cups/cupsd.conf.rpmnew (save old) > cp -a /etc/cups/cupsd.conf{,.backup} > mv /etc/cups/cupsd.conf{.rpmnew,} restarted cups (yes I know I am old fashioned...) > rccups restart Works!
(In reply to Roger Larsson from comment #61) > Did a big refresh to fix this problem - backed printing to Thumbleweed > default. > > Did not help... > > Noticed a file /etc/cups/cupsd.conf.rpmnew (save old) > > cp -a /etc/cups/cupsd.conf{,.backup} > > mv /etc/cups/cupsd.conf{.rpmnew,} > > restarted cups (yes I know I am old fashioned...) > > rccups restart > > Works! Can you, please, provide diff between the two versions? My old conf file is gone, but patch would help in the attempt to restore it.
Almost no changes, nothing that I would have guessed anyway... --- cupsd.conf-rlsave2 2015-03-25 07:27:42.364955309 +0100 +++ cupsd.conf.rpmnew-rlnew2 2015-04-07 11:43:29.000000000 +0200 @@ -1,6 +1,4 @@ # -# "$Id: cupsd.conf.in 11025 2013-06-07 01:00:33Z msweet $" -# # Configuration file for the CUPS scheduler. See "man cupsd.conf" for a # complete description of this file. # @@ -8,9 +6,9 @@ # Log general information in error_log - change "warn" to "debug" # for troubleshooting... LogLevel warn +PageLogFormat # Only listen for connections from the local machine. -Listen *:631 Listen localhost:631 Listen /run/cups/cups.sock @@ -26,10 +24,7 @@ # Restrict access to the server... <Location /> -Allow @IF(enp7s0) -Allow @LOCAL -Order allow,deny -Allow 127.0.0.2 + Order allow,deny </Location> # Restrict access to the admin pages... @@ -164,20 +159,4 @@ </Limit> </Policy> # Explicitly set the CUPS 'default' policy to be used by default: -DefaultPolicy allowallforanybody -ErrorPolicy abort-job - -# -# End of "$Id: cupsd.conf.in 11025 2013-06-07 01:00:33Z msweet $". -# -# 2015-02-11,20:55:14 modify_cupsd_conf Allow @LOCAL -# 2015-02-11,20:56:23 modify_cupsd_conf Allow @LOCAL -# 2015-02-11,21:03:38 modify_cupsd_conf Allow @LOCAL -# 2015-02-11,21:06:09 modify_cupsd_conf Allow 255.255.0.0 @IF(enp7s0) @LOCAL -# 2015-02-11,21:09:59 modify_cupsd_conf Allow 255.255.0.0 @IF(enp7s0) @LOCAL -# 2015-02-11,21:24:11 modify_cupsd_conf Allow @IF(enp7s0) @LOCAL -# 2015-02-11,21:24:11 modify_cupsd_conf Listen all -# 2015-02-11,21:25:15 modify_cupsd_conf Allow @IF(enp7s0) @LOCAL -# 2015-02-17,19:35:07 modify_cupsd_conf Allow @IF(enp7s0) @LOCAL -# 2015-03-25,07:27:42 modify_cupsd_conf DefaultPolicy allowallforanybody -# 2015-03-25,07:27:42 modify_cupsd_conf ErrorPolicy abort-job +DefaultPolicy default
I've downgraded CUPS to 1.5.4 and it can now detect my printer on the USB port and allow to configure and print. I will now re-install 2.0.2 CUPS and see if that works
Reinstalled CUPS 2.0.2 and it does not detect USB connected printer
The 'usb' backend in our CUPS 1.5.4 uses the traditional method via the usblp kernel module to do its USB stuff while in contrast the 'usb' backend in CUPS 2.0.2 uses libusb. But the libusb-based 'usb' backend seems to work in very most cases - otherwise there would be more bug reports like this one. Therefore I think (but I am not at all a USB expert who could analyze lower-level USB issues) the libusb-based 'usb' backend is probably basically o.k. and the root cause of this issue here is something special.
(In reply to Ian Powell from comment #65) > Reinstalled CUPS 2.0.2 and it does not detect USB connected printer Thank you for confirming it. This issue is taking way too long that I'm without functional printer and I'm going to put Free/PC-BSD on my laptop to, at least, have working printer on one machine....but as Johannes is saying, Cups-2.x is somehow broken and not for production use.
Only FYI: Perhaps a possible workaround for experienced users when the libusb-based CUPS backend 'usb' does not work could be a selfmade "careless backend for a single USB printer" as described in https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS A precondition is that the usblp kernel module is loaded and that plain simple data transfer to the USB device works as described at "USB printers" in https://en.opensuse.org/SDB:Installing_a_Printer
CUPS now at 2.0.3 and still does not recognise printers connected via USB cable. Anybody got an ideas yet?
(In reply to Ian Powell from comment #69) > CUPS now at 2.0.3 and still does not recognise printers connected via USB > cable. Anybody got an ideas yet? My 'idea' is that I simply gave up on Linux and openSUSE and fully migrated to Free/PC-BSD where such basic things simply work...actually, atm everything does. :-) Thank you for support...it was interesting experience with openSUSE and time to move somewhere else (after 16ys). Sincerely, Gour
(In reply to Saša Janiška from comment #70) > (In reply to Ian Powell from comment #69) > > CUPS now at 2.0.3 and still does not recognise printers connected via USB > > cable. Anybody got an ideas yet? > > My 'idea' is that I simply gave up on Linux and openSUSE and fully migrated > to Free/PC-BSD where such basic things simply work...actually, atm > everything does. :-) > > Thank you for support...it was interesting experience with openSUSE and time > to move somewhere else (after 16ys). > > > Sincerely, > Gour I could always revert to cups 1.5 and it will work but as this is a development release of opensuse i'm using, i'm happy to stick with it and report bugs to help.
(In reply to Johannes Meixner from comment #30) > The attachment#626368 [details] > contains (excerpt): > ------------------------------------------------------------------------- > D [11/Mar/2015:15:18:33 +0000] [Client 4] 2.0 CUPS-Get-Devices 1 > ... > D [11/Mar/2015:15:18:33 +0000] [CGI] > argv[5] = "requested-attributes=all include-schemes='usb'" > ... > D [11/Mar/2015:15:18:33 +0000] [CGI] > Started /usr/lib/cups/daemon/cups-deviced (PID 4389) > ... > D [11/Mar/2015:15:18:33 +0000] [cups-deviced] > Started backend /usr/lib/cups/backend/usb (PID 4390) > D [11/Mar/2015:15:18:33 +0000] [CGI] > Loading USB quirks from "/usr/share/cups/usb". > D [11/Mar/2015:15:18:33 +0000] [CGI] Loaded 114 quirks. > D [11/Mar/2015:15:18:33 +0000] [CGI] list_devices > D [11/Mar/2015:15:18:33 +0000] [CGI] libusb_get_device_list=10 > D [11/Mar/2015:15:18:33 +0000] [cups-deviced] > PID 4390 (usb) exited with no errors. > ... > D [11/Mar/2015:15:18:33 +0000] > PID 4389 (/usr/lib/cups/daemon/cups-deviced) exited with no errors. > ------------------------------------------------------------------------- > ted /usr/lib/cups/daemon/cups-deviced (PID 15747) > ... > D [11/Mar/2015:07:48:33 +0100] [cups-deviced] > Started backend /usr/lib/cups/backend/usb (PID 15748) > D [11/Mar/2015:07:48:33 +0100] [CGI] > Loading USB quirks from "/usr/share/cups/usb". > D [11/Mar/2015:07:48:33 +0100] [CGI] Loaded 72 quirks. > D [11/Mar/2015:07:48:33 +0100] [CGI] list_devices > D [11/Mar/2015:07:48:33 +0100] [CGI] libusb_get_device_list=15 > D [11/Mar/2015:07:48:33 +0100] [CGI] Failed to open device, code: -3 > D [11/Mar/2015:07:48:33 +0100] [cups-deviced] > PID 15748 (usb) exited with no errors. Please do an strace here. We just need to know which syscall fails.
(In reply to Oliver Neukum from comment #72) > (In reply to Johannes Meixner from comment #30) > > The attachment#626368 [details] > > contains (excerpt): > > ------------------------------------------------------------------------- > > D [11/Mar/2015:15:18:33 +0000] [Client 4] 2.0 CUPS-Get-Devices 1 > > ... > > D [11/Mar/2015:15:18:33 +0000] [CGI] > > argv[5] = "requested-attributes=all include-schemes='usb'" > > ... > > D [11/Mar/2015:15:18:33 +0000] [CGI] > > Started /usr/lib/cups/daemon/cups-deviced (PID 4389) > > ... > > D [11/Mar/2015:15:18:33 +0000] [cups-deviced] > > Started backend /usr/lib/cups/backend/usb (PID 4390) > > D [11/Mar/2015:15:18:33 +0000] [CGI] > > Loading USB quirks from "/usr/share/cups/usb". > > D [11/Mar/2015:15:18:33 +0000] [CGI] Loaded 114 quirks. > > D [11/Mar/2015:15:18:33 +0000] [CGI] list_devices > > D [11/Mar/2015:15:18:33 +0000] [CGI] libusb_get_device_list=10 > > D [11/Mar/2015:15:18:33 +0000] [cups-deviced] > > PID 4390 (usb) exited with no errors. > > ... > > D [11/Mar/2015:15:18:33 +0000] > > PID 4389 (/usr/lib/cups/daemon/cups-deviced) exited with no errors. > > ------------------------------------------------------------------------- > > > ted /usr/lib/cups/daemon/cups-deviced (PID 15747) > > ... > > D [11/Mar/2015:07:48:33 +0100] [cups-deviced] > > Started backend /usr/lib/cups/backend/usb (PID 15748) > > D [11/Mar/2015:07:48:33 +0100] [CGI] > > Loading USB quirks from "/usr/share/cups/usb". > > D [11/Mar/2015:07:48:33 +0100] [CGI] Loaded 72 quirks. > > D [11/Mar/2015:07:48:33 +0100] [CGI] list_devices > > D [11/Mar/2015:07:48:33 +0100] [CGI] libusb_get_device_list=15 > > D [11/Mar/2015:07:48:33 +0100] [CGI] Failed to open device, code: -3 > > D [11/Mar/2015:07:48:33 +0100] [cups-deviced] > > PID 15748 (usb) exited with no errors. > > > Please do an strace here. We just need to know which syscall fails. is this the command you want done? strace -o strace.usb /usr/lib/cups/backend/usb
Created attachment 639418 [details] output from strace : strace -o strace.usb /usr/lib/cups/backend/usb as per request from comment 73 (i hope)
(In reply to Ian Powell from comment #74) > Created attachment 639418 [details] > output from strace : strace -o strace.usb /usr/lib/cups/backend/usb > > as per request from comment 73 (i hope) Addition screen text output from above strace: DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE;" ""
As far as I see comment#75 looks exactly as it should look when the CUPS backend 'usb' successfully decetcts an USB printer. Therefore I wonder what the problem is now? The bug's current subject reads: "... CUPS backend 'usb' sometimes no longer detect USB printers ..." To debug that isuse we need degugging output for the case when it happens that the CUPS backend 'usb' does NOT detect the printer.
(In reply to Johannes Meixner from comment #76) > As far as I see comment#75 looks exactly as it should look > when the CUPS backend 'usb' successfully decetcts an USB printer. > > Therefore I wonder what the problem is now? > > The bug's current subject reads: > "... CUPS backend 'usb' sometimes no longer detect USB printers ..." > > To debug that isuse we need degugging output for the case > when it happens that the CUPS backend 'usb' does NOT detect the printer. The detected information must be lost when it "transfers" that information to the web page that lists all detected printers because it never shows a USB connected one
Your attachment#625584 [details] in comment#0 shows that you had used YaST and that one directly uses the output of "lpinfo -v" which is a frontend that calls cups-deviced which is a wrapper that calls each CUPS backend, in particular /usr/lib/cups/backend/usb and your comment#2 confirms that /usr/lib/cups/backend/usb did not show your printer. With probability one the issue has nothing to do with how the data from /usr/lib/cups/backend/usb is transferred to whatever higher lever. With probability one the issue is that SOMETIMES the CUPS backend 'usb' can no longer detect USB printers.
(In reply to Johannes Meixner from comment #78) > Your attachment#625584 [details] in comment#0 > shows that you had used YaST and that one directly > uses the output of "lpinfo -v" which is a frontend > that calls cups-deviced which is a wrapper that calls > each CUPS backend, in particular /usr/lib/cups/backend/usb > and your comment#2 confirms that /usr/lib/cups/backend/usb > did not show your printer. > > With probability one the issue has nothing to do with how > the data from /usr/lib/cups/backend/usb is transferred > to whatever higher lever. > > With probability one the issue is that SOMETIMES the > CUPS backend 'usb' can no longer detect USB printers. I've just rerun /usr/lib/cups/backend/usb and its given a lot more info that it did in the earlier comments. DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG: Switching USB device configuration: 0 -> 1 DEBUG: Failed to set configuration 1 for 04e8:329f DEBUG2: Printer found with device ID: Device URI: usb://Unknown/Printer direct usb://Unknown/Printer "Unknown" "Unknown" "" "" DEBUG: Failed to re-attach "usblp" kernel module to 04e8:329f
Now it looks again like a real issue! Normally it should "just work" to rerun /usr/lib/cups/backend/usb as many times and as often as you like and it should always detect your printer. E.g. I can run it 10 times in a row # for in in $( seq 10 ) ; do /usr/lib/cups/backend/usb ; done and I get 10 times exactly the same result. If you get different results when you run /usr/lib/cups/backend/usb several times there is an issue somewhere: In your comment#2 it is --------------------------------------------------------------------------- /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=10 --------------------------------------------------------------------------- In your comment#75 it is --------------------------------------------------------------------------- DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE;" "" --------------------------------------------------------------------------- In your comment#79 it is --------------------------------------------------------------------------- DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 114 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG: Switching USB device configuration: 0 -> 1 DEBUG: Failed to set configuration 1 for 04e8:329f DEBUG2: Printer found with device ID: Device URI: usb://Unknown/Printer direct usb://Unknown/Printer "Unknown" "Unknown" "" "" DEBUG: Failed to re-attach "usblp" kernel module to 04e8:329f --------------------------------------------------------------------------- Only comment#75 shows how it should look when it works correctly. Comment#2 and comment#79 show different kind of failures.
DEBUG: Switching USB device configuration: 0 -> 1 DEBUG: Failed to set configuration 1 for 04e8:329f That shouldn't happen. Please attach the output of "lsusb -v -d 04e8:329f"
(In reply to Johannes Meixner from comment #80) > If you get different results when you run /usr/lib/cups/backend/usb > several times there is an issue somewhere: Indeed. Please retest running the test multiple times in a row on a system freshly rebooted (cold, that is physically remove power)
(In reply to Oliver Neukum from comment #81) > DEBUG: Switching USB device configuration: 0 -> 1 > DEBUG: Failed to set configuration 1 for 04e8:329f > > That shouldn't happen. Please attach the output of "lsusb -v -d 04e8:329f" lsusb -v -d 04e8:329f > lsusb.out can't get device qualifier: Resource temporarily unavailable can't get debug descriptor: Resource temporarily unavailable cannot read device status, Resource temporarily unavailable (11) I'll attache lusb.out
Created attachment 639534 [details] output from lsusb This was with printer turned on
(In reply to Johannes Meixner from comment #80) > Now it looks again like a real issue! > > Normally it should "just work" to rerun /usr/lib/cups/backend/usb > as many times and as often as you like and it should always detect > your printer. > > E.g. I can run it 10 times in a row > # for in in $( seq 10 ) ; do /usr/lib/cups/backend/usb ; done > and I get 10 times exactly the same result. > > If you get different results when you run /usr/lib/cups/backend/usb > several times there is an issue somewhere: > > In your comment#2 it is > --------------------------------------------------------------------------- > /usr/lib/cups/backend/usb > DEBUG: Loading USB quirks from "/usr/share/cups/usb". > DEBUG: Loaded 114 quirks. > DEBUG: list_devices > DEBUG: libusb_get_device_list=10 > --------------------------------------------------------------------------- > > In your comment#75 it is > --------------------------------------------------------------------------- > DEBUG: Loading USB quirks from "/usr/share/cups/usb". > DEBUG: Loaded 114 quirks. > DEBUG: list_devices > DEBUG: libusb_get_device_list=11 > DEBUG2: Printer found with device ID: > MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 > Series;CLS:PRINTER;STATUS:IDLE; Device URI: > usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X > direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung > CLP-320 Series" "Samsung CLP-320 Series" > "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 > Series;CLS:PRINTER;STATUS:IDLE;" "" > --------------------------------------------------------------------------- > > In your comment#79 it is > --------------------------------------------------------------------------- > DEBUG: Loading USB quirks from "/usr/share/cups/usb". > DEBUG: Loaded 114 quirks. > DEBUG: list_devices > DEBUG: libusb_get_device_list=11 > DEBUG: Switching USB device configuration: 0 -> 1 > DEBUG: Failed to set configuration 1 for 04e8:329f > DEBUG2: Printer found with device ID: Device URI: usb://Unknown/Printer > direct usb://Unknown/Printer "Unknown" "Unknown" "" "" > DEBUG: Failed to re-attach "usblp" kernel module to 04e8:329f > --------------------------------------------------------------------------- > > Only comment#75 shows how it should look when it works correctly. > > Comment#2 and comment#79 show different kind of failures. I've just run your test of a loop for 10 and its all the same as comment #79
(In reply to Oliver Neukum from comment #82) > (In reply to Johannes Meixner from comment #80) > > > If you get different results when you run /usr/lib/cups/backend/usb > > several times there is an issue somewhere: > > Indeed. Please retest running the test multiple times in a row on a system > freshly rebooted (cold, that is physically remove power) Not sure if this helps. I've just rebooted system and printer (both powered off) and discovered this if i run "/usr/lib/cups/backend/usb" lots of times it always gives back the correct information (comment #75) but as soon as i run "lsusb -v -d 04e8:329f" once and then run "/usr/lib/cups/backend/usb", it then fails (as per comment #79). I tested this twice with rebooting because at first i thought it was a coincidence.
(In reply to Ian Powell from comment #86) > I've just rebooted system and printer (both powered off) and discovered this > if i run "/usr/lib/cups/backend/usb" lots of times it always gives back the > correct information (comment #75) but as soon as i run "lsusb -v -d > 04e8:329f" once and then run "/usr/lib/cups/backend/usb", it then fails (as > per comment #79). > > I tested this twice with rebooting because at first i thought it was a > coincidence. Probably not. Your device appears to have a buggy firmware, which doesn't allow certain descriptors to be retrieved twice (Windows doesn't do that. lsusb or its equivalent do so)
Created attachment 639538 [details] the
Please use the usbreset utility from comment#88 The sequence is test lsusb usbreset test
(In reply to Oliver Neukum from comment #89) > Please use the usbreset utility from comment#88 > The sequence is > > test > lsusb > usbreset > test you'll have to expand a bit, i don't know usbreset - it wants a device_filename as an argument
Ian Powell, I also never used "usbreset" before but below is what I did on my SLES12 system with an "Epson Stylus Photo R360" printer (this is the name labeled on the device) that shows up in "lsusb" as "04b8:082c Seiko Epson Corp. Storage Device" probably because this printer has also a memory card reader built in. I assume it would work the same on your system. I dowloaded attachment#639538 [details] and stored it as file /root/usbreset Then I did (as root): ------------------------------------------------------------------------------ # chmod u+x /root/usbreset # lsusb ... Bus 001 Device 004: ID 04b8:082c Seiko Epson Corp. Storage Device ... # /root/usbreset /dev/bus/usb/001/004 Resetting USB device /dev/bus/usb/001/004 Reset successful # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 119 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=10 DEBUG2: Printer found with device ID: MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1;MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360; Device URI: usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 direct usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1;MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" # /usr/lib/cups/backend/usb 2>/dev/null direct usb://EPSON/Stylus%20Photo%20R360?serial=W69P10611212214330&interface=1 "EPSON Stylus Photo R360" "EPSON Stylus Photo R360" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX,ESCPR1;MDL:Stylus Photo R360;CLS:PRINTER;DES:EPSON Stylus Photo R360;" "" ------------------------------------------------------------------------------ The last output "/usr/lib/cups/backend/usb 2>/dev/null" is only FYI to show what the actual CUPS 'usb' backend device discovery output is that will be used by higher level tools like "lpstat -v" or YaST. If you are interested in background information and details see https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS
Typo correction: instead of "lpstat -v" it should be "lpinfo -v" (lpstat does not do any device discovery).
Johannes - thanks for the info on usbreset. Didn't make any difference to the result but i'll update comment #89
(In reply to Oliver Neukum from comment #89) > Please use the usbreset utility from comment#88 > The sequence is > > test > lsusb > usbreset > test Tested by "Add Printer" in CUPS/Administration:- only finds these local printers (no USB) Serial Port #1, HP Printer (HPLIP), Forward print job data like a pipe to another command,LPT #1 > lsusb Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 002: ID 09da:000a A4Tech Co., Ltd. Optical Mouse Opto 510D / OP-620D Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 005: ID 04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer Bus 001 Device 002: ID 04a9:2213 Canon, Inc. CanoScan LiDE 50/LiDE 35/LiDE 40 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 046d:c31d Logitech, Inc. Media Keyboard K200 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > /usr/lib/cups/backend/usb 2>/dev/null direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE;" "" > Tested by "Add Printer" in CUPS/Administration:- only finds these local printers (no USB) Serial Port #1, HP Printer (HPLIP), Forward print job data like a pipe to another command,LPT #1
Ian Powell, I am missing the "usbreset" in your comment#94. Please use plain "/usr/lib/cups/backend/usb" without "2>/dev/null" because we are interested in its debug messages. I had mentioned "2>/dev/null" only FYI as explanation how things work, cf. comment#91
(In reply to Johannes Meixner from comment #95) > Ian Powell, > I am missing the "usbreset" in your comment#94. > > Please use plain "/usr/lib/cups/backend/usb" without "2>/dev/null" > because we are interested in its debug messages. > > I had mentioned "2>/dev/null" only FYI as explanation > how things work, cf. comment#91 I'll try again. > Pre-Test: Add printer in CUPS web admin Forward print job data like a pipe to another command, Serial Port #1,HP Printer (HPLIP),LPT #1 > lsusb Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 002: ID 09da:000a A4Tech Co., Ltd. Optical Mouse Opto 510D / OP-620D Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 005: ID 04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer Bus 001 Device 002: ID 04a9:2213 Canon, Inc. CanoScan LiDE 50/LiDE 35/LiDE 40 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 046d:c31d Logitech, Inc. Media Keyboard K200 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub > ./usbreset /dev/bus/usb/001/005 Resetting USB device /dev/bus/usb/001/005 Reset successful > strace -o cups-backend-usb.strace -f /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:IDLE;" "" > Post-Test: Add printer in CUPS web admin Forward print job data like a pipe to another command, HP Printer (HPLIP), Serial Port #1, LPT #1 I'll attach the strace output for backend/usb
Created attachment 639643 [details] Strace for backend/usb
Just a note... I've just removed "hpijs" to see if that changed anything as I've not got any HP equipment on my system. When I do " Add printer" the local printer list is now 3 Serial Port #1, Forward print job data like a pipe to another command, LPT #1
Ian Powell what results (as root) this command: for i in $( seq 3 ) ; do echo $i ; /usr/lib/cups/backend/usb ; done versus that command (all on one single command line): for i in $( seq 3 ) ; do echo $i ; ./usbreset /dev/bus/usb/001/005 ; /usr/lib/cups/backend/usb ; done (replace /dev/bus/usb/001/005 with the currently right value according to your "lsusb" output).
Ian Powell, regarding the CUPS web-frontend: For now do not run the CUPS web-frontend or any other GUI. First and foremost I am only interested whether or not it works to run the plain /usr/lib/cups/backend/usb as many times and as often as one likes and it should always detect the printer.
(In reply to Johannes Meixner from comment #101) > Ian Powell > > what results (as root) this command: > > for i in $( seq 3 ) ; do echo $i ; /usr/lib/cups/backend/usb ; done > > versus that command (all on one single command line): > > for i in $( seq 3 ) ; do echo $i ; ./usbreset /dev/bus/usb/001/005 > ; /usr/lib/cups/backend/usb ; done > > (replace /dev/bus/usb/001/005 with the currently right value > according to your "lsusb" output). I did this as "su" > for i in $( seq 3 ) ; do echo $i ; /usr/lib/cups/backend/usb ; done 1 DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" "" 2 DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" "" 3 DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" "" > for i in $( seq 3 ) ; do echo $i ; ./usbreset /dev/bus/usb/001/005; /usr/lib/cups/backend/usb ; done 1 Resetting USB device /dev/bus/usb/001/005 Reset successful DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" "" 2 Resetting USB device /dev/bus/usb/001/005 Reset successful DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" "" 3 Resetting USB device /dev/bus/usb/001/005 Reset successful DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 123 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=11 DEBUG2: Printer found with device ID: MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY; Device URI: usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X direct usb://Samsung/CLP-320%20Series?serial=Z4PGBAGB400971X "Samsung CLP-320 Series" "Samsung CLP-320 Series" "MFG:Samsung;CMD:SPL,PCL5E,PCL6,FWV,EXT;MDL:CLP-320 Series;CLS:PRINTER;STATUS:BUSY;" ""
Now everything looks fine. FWIW: On my systems (openSUSE 13.2 with upgraded CUPS 2.0.2 and SLES12 with CUPS 1.7.5) also the CUPS web frontend shows my USB printer (plus all other autodetected printers).
Currently I have no Tumbleweed system. As time permits I will also test on Tumbleweed...
(In reply to Johannes Meixner from comment #106) > Now everything looks fine. > > FWIW: > On my systems (openSUSE 13.2 with upgraded CUPS 2.0.2 and > SLES12 with CUPS 1.7.5) also the CUPS web frontend shows > my USB printer (plus all other autodetected printers). This is the cups versions i have installed on my tumbleweed system cups-backends-1.1-289.2.noarch cups-libs-2.0.3-175.2.x86_64 cups-client-2.0.3-175.2.x86_64 cups-filters-1.0.68-1.1.x86_64 cups-pk-helper-0.2.5-5.2.x86_64 cups-libs-32bit-2.0.3-175.2.x86_64 cups-2.0.3-175.2.x86_64 cups-filters-ghostscript-1.0.68-1.1.x86_64 python-cupshelpers-1.5.7-1.1.noarch python3-cups-1.9.72-1.1.x86_64 cups-filters-foomatic-rip-1.0.68-1.1.x86_64 python-cups-1.9.72-2.1.x86_64 cups-filters-cups-browsed-1.0.70-49.1.x86_64
(In reply to Johannes Meixner from comment #107) > Currently I have no Tumbleweed system. > As time permits I will also test on Tumbleweed... I also know if i remove cups 2.x and reinstall 1.5, it works fine.
Regarding "CUPS 1.5 works" see my comment#66.
From an USB expert I got the information that the printer's firmware is the root cause of the issue. When the libusb-based CUPS backend 'usb' is used something in the printer's firmware does not behave well which leads to failures. In contrast up to CUPS 1.5.4 where the CUPS backend 'usb' uses the usblp kernel module the printer's firmware is used in a bit different way where it works. Because in very most cases (i.e. for very most printer models) the CUPS 'usb' backend "just works" (otherwise there would be more bug reports here at SUSE and also at least one at CUPS upstream), I assume that the CUPS 'usb' backend is basically o.k. but in some special cases (i.e. for some printer models) it needs to do some model specific special stuff. Fortunately the libusb-based CUPS 'usb' backend already supports printer model dependant special case handling via so called "USB quirks", see the comments in /usr/share/cups/usb/org.cups.usb-quirks (excerpt): ------------------------------------------------------------------------- # USB backend 'quirks' file. # # This file lists known issues with various vendors or printers. Each # line contains either a comment (starting with #) or the USB vendor ID, # product ID (omit for all vendor products), and a list of known issues: # # blacklist The printer is not functional with the USB backend. # no-reattach Do no re-attach usblp kernel module after printing. # soft-reset Do a soft reset after printing for cleanup. # unidir Only supported unidirectional I/O # usb-init Needs vendor USB initialization string. # vendor-class Uses vendor-specific class or subclass. # whitelist The printer is functional with the USB backend. ... # Prolific Technology, Inc. PL2305 Parallel Port (USB -> Parallel adapter), # https://bugs.launchpad.net/bugs/987485 0x067b 0x2305 no-reattach soft-reset unidir ... # All Samsung devices, https://bugs.launchpad.net/bugs/1032456 0x04e8 soft-reset ... ------------------------------------------------------------------------- When a particular printer model does not work with the defaults of the libusb-based CUPS 'usb' backend, it might help to specify model specific appropriate "USB quirks". Usually one should have selfmade "USB quirks" in a separated file like /usr/share/cups/usb/selfmade.usb-quirks (the 'usb' backend reads all files in /usr/share/cups/usb/).
(In reply to Ian Powell from comment #0) > When i try to add a printer that is connected via USB, Yast and CUPS only > present serial, parallel and network connectivity. They do not detect any > USB connected printer I am looking for a solution with a similar issue: YaST connection assistant does not show a working printer on USB port. https://forums.opensuse.org/showthread.php/508345-YaST-connection-assistant-does-not-show-a-working-printer-on-USB-port
(In reply to Markus Elfring from comment #114) > (In reply to Ian Powell from comment #0) > > When i try to add a printer that is connected via USB, Yast and CUPS only > > present serial, parallel and network connectivity. They do not detect any > > USB connected printer > > I am looking for a solution with a similar issue: > YaST connection assistant does not show a working printer on USB port. > https://forums.opensuse.org/showthread.php/508345-YaST-connection-assistant- > does-not-show-a-working-printer-on-USB-port Check comment #113, see if that helps.
(In reply to Johannes Meixner from comment #113) > From an USB expert I got the information that > the printer's firmware is the root cause of the issue. > > When the libusb-based CUPS backend 'usb' is used > something in the printer's firmware does not behave well > which leads to failures. > > In contrast up to CUPS 1.5.4 where the CUPS backend 'usb' > uses the usblp kernel module the printer's firmware is used > in a bit different way where it works. > > Because in very most cases (i.e. for very most printer models) > the CUPS 'usb' backend "just works" (otherwise there would be more > bug reports here at SUSE and also at least one at CUPS upstream), > I assume that the CUPS 'usb' backend is basically o.k. > but in some special cases (i.e. for some printer models) > it needs to do some model specific special stuff. > > Fortunately the libusb-based CUPS 'usb' backend already > supports printer model dependant special case handling > via so called "USB quirks", see the comments in > /usr/share/cups/usb/org.cups.usb-quirks (excerpt): > ------------------------------------------------------------------------- > # USB backend 'quirks' file. > # > # This file lists known issues with various vendors or printers. Each > # line contains either a comment (starting with #) or the USB vendor ID, > # product ID (omit for all vendor products), and a list of known issues: > # > # blacklist The printer is not functional with the USB backend. > # no-reattach Do no re-attach usblp kernel module after printing. > # soft-reset Do a soft reset after printing for cleanup. > # unidir Only supported unidirectional I/O > # usb-init Needs vendor USB initialization string. > # vendor-class Uses vendor-specific class or subclass. > # whitelist The printer is functional with the USB backend. > > ... > > # Prolific Technology, Inc. PL2305 Parallel Port (USB -> Parallel adapter), > # https://bugs.launchpad.net/bugs/987485 > 0x067b 0x2305 no-reattach soft-reset unidir > > ... > > # All Samsung devices, https://bugs.launchpad.net/bugs/1032456 > 0x04e8 soft-reset > > ... > ------------------------------------------------------------------------- > > When a particular printer model does not work with the defaults > of the libusb-based CUPS 'usb' backend, it might help to specify > model specific appropriate "USB quirks". > > Usually one should have selfmade "USB quirks" in a separated file > like /usr/share/cups/usb/selfmade.usb-quirks (the 'usb' backend > reads all files in /usr/share/cups/usb/). I've create the selfmade.usb-quirks with just my specific printer in it doing a soft-reset but it made no difference, will it override the setting in the org.cups.usb-quirks? There is a "usb-init" in the quirks that needs a vendor string, could that be an option? Or is this the end of the line?
I cannot tell what particular USB quirk or quirks (you can have more than one in a line) might help for your particular USB printer or if it is even hopeless to use a particular USB device with the libusb-based 'usb' backend. Because it had worked by using the usblp kernel module (i.e. with the usblp-based 'usb' backend in our CUPS 1.5.4) there is at least the workaround that I mentioned in comment#68
I suggest you try "soft-reset"
Regarding comment#116 "will it override the setting in the org.cups.usb-quirks" As far as I see in the CUPS source file backend/usb-libusb.c various USB quirks (set as bits) are added (via bitwise OR) which means when you specify USB quirks in your file they get added to existing USB quirks in other files.
Oliver, "soft-reset" is already done by default for all Samsung devices, see my comment#113 "0x04e8 soft-reset" and Ian Powell has such a device, e.g. see his comment#96 "04e8:329f Samsung Electronics Co., Ltd CLP-325 Color Laser Printer".
Ian Powell, only a blind shot in the dark without any liability or warranty: Perhaps for your Samsung device the default "soft-reset" is wrong? Perhaps it helps for your Samsung device when you disable the 0x04e8 soft-reset line in /usr/share/cups/usb/org.cups.usb-quirks
(In reply to Johannes Meixner from comment #117) > I cannot tell what particular USB quirk or quirks (you can have > more than one in a line) might help for your particular USB printer > or if it is even hopeless to use a particular USB device with the > libusb-based 'usb' backend. > > Because it had worked by using the usblp kernel module > (i.e. with the usblp-based 'usb' backend in our CUPS 1.5.4) > there is at least the workaround that I mentioned in comment#68 Thanks. I'd rather reinstall 1.5.4. As there are 2 other people in this bug list also struggling with this, (i think they have kyocera USB printers), do we close this bug down and attribute the problem to dodgy printer firmware on samsung and kyocera printers? I'm willing to continue running any tests you think need to be run in case this is a tumbleweed specific issue. I doubt i'll ever understand how the USB printer is identified using the backends okay, but the actual printer control front end can't deal with it.
(In reply to Johannes Meixner from comment #121) > Ian Powell, > only a blind shot in the dark without any liability or warranty: > Perhaps for your Samsung device the default "soft-reset" is wrong? > Perhaps it helps for your Samsung device when you disable the > 0x04e8 soft-reset > line in /usr/share/cups/usb/org.cups.usb-quirks i commented it out but no change
Created attachment 639984 [details] CUPS error after setting debug on Just thought this might be of interest, its the debug error log of the CUPS/administration/Add Printer process. I set it on just before i launched CUPS web admin. I'm not sure how to interpret it but it doesn't seem to do much when its trying to USB devices.
Retested with newest Tumbleweed and again for me everything "just works": --------------------------------------------------------------------------- # cat /etc/os-release NAME=openSUSE VERSION="20150630 (Tumbleweed)" VERSION_ID="20150630" PRETTY_NAME="openSUSE 20150630 (Tumbleweed) (x86_64)" ... # /usr/lib/cups/backend/usb DEBUG: Loading USB quirks from "/usr/share/cups/usb". DEBUG: Loaded 72 quirks. DEBUG: list_devices DEBUG: libusb_get_device_list=5 DEBUG2: Printer found with device ID: MFG:Brother;CMD:PJL,PCL,PCLXL,POSTSCRIPT;MDL:HL-5150D series;CLS:PRINTER; Device URI: usb://Brother/HL-5150D%20series?serial=F5J889574 direct usb://Brother/HL-5150D%20series?serial=F5J889574 "Brother HL-5150D series" "Brother HL-5150D series" "MFG:Brother; CMD:PJL,PCL,PCLXL,POSTSCRIPT;MDL:HL-5150D series;CLS:PRINTER;" "" --------------------------------------------------------------------------- I used the CUPS web frontend (http://localhost:631) to set up a print queue and (as expected) the "Brother HL-5150D series" from the /usr/lib/cups/backend/usb stdout output was shown there and of course the printer device prints - both the CUPS test page and also via "echo hello | lp -d Brother_HL-5150D_series". I close the issue at least for now as "worksforme" according to https://bugzilla.suse.com/page.cgi?id=status_resolution_matrix.html --------------------------------------------------------------------------- The problem described cannot be duplicated. If more information is provided, the bug can be reopened. --------------------------------------------------------------------------- Regardless that it is closed, you can still add comments, i.e. you should not reopen it only to add comments. I am still interested to find out what kinds of USB printer devices cause such issues and if possible what kinds of CUPS usb quirk or other workarounds may help in which particular case. Regarding what CUPS usb quirk should usually help in case of what currently known USB printer symptoms I asked in the CUPS upstream mailing list cups@cups.org about "Documentation about CUPS usb quirks usage?" and I got this reply: http://cups.org/pipermail/cups/2015-July/026924.html (excerpt): ---------------------------------------------------------------------------- The original quirks come directly from the old usblp kernel driver. Generally speaking, "soft-reset" is used for printers that work once but not for a second job. "unidir" is used for printers that don't properly support back-channel data (either hung or slow printing). And "no-reattach" is often needed for MFPs with scanner drivers. "usb-init" is used by Gutenprint to know whether to send a USB init string. ---------------------------------------------------------------------------- FYI: This time I used a Brother HL-5150D USB printer because my EPSON Stylus Photo R360 tells me that its ink is empty (more precisely it tells me that I must replace its ink) and that crap device now refuses to do anything unless it got new ink (I cannot even send printing data to it) so that I will now throw that piece of crap into our trash can for hardware scrap. I recommend to do this with any piece of hardware that turns out to have been made by its manufacturer against the basic ideas of the Free Software Foundation. In this case the EPSON Stylus Photo R360 does not respect my freedom to use it regardless that the device thinks one or more of its ink-units are empty. Accordingly I do not respect such kind of devices and just kick them out of my environment.
(In reply to Johannes Meixner from comment #125) > Retested with newest Tumbleweed and again for me everything "just works": > --------------------------------------------------------------------------- > # cat /etc/os-release > NAME=openSUSE > VERSION="20150630 (Tumbleweed)" > VERSION_ID="20150630" > PRETTY_NAME="openSUSE 20150630 (Tumbleweed) (x86_64)" > ... > > # /usr/lib/cups/backend/usb > DEBUG: Loading USB quirks from "/usr/share/cups/usb". > DEBUG: Loaded 72 quirks. > DEBUG: list_devices > DEBUG: libusb_get_device_list=5 > DEBUG2: Printer found with device ID: > MFG:Brother;CMD:PJL,PCL,PCLXL,POSTSCRIPT;MDL:HL-5150D series;CLS:PRINTER; > Device URI: usb://Brother/HL-5150D%20series?serial=F5J889574 > direct usb://Brother/HL-5150D%20series?serial=F5J889574 "Brother > HL-5150D series" "Brother HL-5150D series" "MFG:Brother; > CMD:PJL,PCL,PCLXL,POSTSCRIPT;MDL:HL-5150D series;CLS:PRINTER;" "" > --------------------------------------------------------------------------- > > I used the CUPS web frontend (http://localhost:631) to set up > a print queue and (as expected) the "Brother HL-5150D series" > from the /usr/lib/cups/backend/usb stdout output was shown there > and of course the printer device prints - both the CUPS test page > and also via "echo hello | lp -d Brother_HL-5150D_series". > > I close the issue at least for now as "worksforme" according to > https://bugzilla.suse.com/page.cgi?id=status_resolution_matrix.html > --------------------------------------------------------------------------- > The problem described cannot be duplicated. > If more information is provided, the bug can be reopened. > --------------------------------------------------------------------------- > > Regardless that it is closed, you can still add comments, > i.e. you should not reopen it only to add comments. > > I am still interested to find out what kinds of USB printer devices > cause such issues and if possible what kinds of CUPS usb quirk > or other workarounds may help in which particular case. > > Regarding what CUPS usb quirk should usually help > in case of what currently known USB printer symptoms > I asked in the CUPS upstream mailing list cups@cups.org > about "Documentation about CUPS usb quirks usage?" > and I got this reply: > http://cups.org/pipermail/cups/2015-July/026924.html > (excerpt): > ---------------------------------------------------------------------------- > The original quirks come directly from the old usblp kernel driver. > > Generally speaking, "soft-reset" is used for printers that work once > but not for a second job. "unidir" is used for printers that don't > properly support back-channel data (either hung or slow printing). > And "no-reattach" is often needed for MFPs with scanner drivers. > > "usb-init" is used by Gutenprint to know whether to send a USB init > string. > ---------------------------------------------------------------------------- > > FYI: > > This time I used a Brother HL-5150D USB printer because > my EPSON Stylus Photo R360 tells me that its ink is empty > (more precisely it tells me that I must replace its ink) > and that crap device now refuses to do anything unless > it got new ink (I cannot even send printing data to it) > so that I will now throw that piece of crap into our > trash can for hardware scrap. > > I recommend to do this with any piece of hardware that > turns out to have been made by its manufacturer against > the basic ideas of the Free Software Foundation. > In this case the EPSON Stylus Photo R360 does not > respect my freedom to use it regardless that the device > thinks one or more of its ink-units are empty. > Accordingly I do not respect such kind of devices > and just kick them out of my environment. okay, thanks for your efforts. i'll have to throw away my USB printer cable, maybe thats what Apple wants.. :o)
Just to let everyone know, it now works - these cups-filters were installed this morning :- cups-filters-cups-browsed-1.0.71-50.1 cups-filters-ghostscript-1.0.71-50.1 cups-filters-1.0.71-50.1 CUPS Admin now shows this when Adding Printer Serial Port #1 Samsung CLP-320 Series (Samsung CLP-320 Series) LPT #1 And when you progress on the install, it shows it is USB connected. i can also print directly to the USB connected printer now. I've now closed the bug as FIXED
Ian Powell, many thanks for your feedback! FYI: As far as I can imagine cups-filters cannot have anything to do with this issue (cf. comment#58). I assume something else has changed which makes it now work for you.
(In reply to Johannes Meixner from comment #128) > Ian Powell, > many thanks for your feedback! > > FYI: > As far as I can imagine cups-filters cannot have anything to do > with this issue (cf. comment#58). I assume something else has > changed which makes it now work for you. True, i've just checked the cups rpms and have gone up from 175 to 178 (they slipped pasty me without noticing) cups-client-2.0.3-178.1.x86_64 cups-filters-1.0.71-50.1.x86_64 cups-libs-2.0.3-178.1.x86_64 cups-2.0.3-178.1.x86_64
There are no changes regarding the libusb-based 'usb' backend between CUPS 2.0.2 and CUPS 2.0.3 and also the CUPS 2.0.3 /usr/share/doc/packages/cups/CHANGES.txt file does not provide a hint that a change in CUPS could be the reason why it now work for you. In comment#128 I wrote intentionally "something else" because currently I cannot imagine know what could be the actual reason why it now works for you. My blind guess is some lower-level USB-related software like libusb-1_0-0 or the kernel. But from their rpm changelog output I cannot imagine whether or not a change therein could be the actual reason why it now works for you. FYI regarding why "libusb-1_0-0": On my 20150630 Tumbleweed system (cf. comment#125) I get --------------------------------------------------------------------------- # ldd /usr/lib/cups/backend/usb | grep libusb libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0 (0x00007fcb5c916000) # rpm -qf /usr/lib64/libusb-1.0.so.0 libusb-1_0-0-1.0.19-3.3.x86_64 ---------------------------------------------------------------------------
(In reply to Johannes Meixner from comment #130) > There are no changes regarding the libusb-based 'usb' backend > between CUPS 2.0.2 and CUPS 2.0.3 and also the CUPS 2.0.3 > /usr/share/doc/packages/cups/CHANGES.txt file does not provide a hint > that a change in CUPS could be the reason why it now work for you. > > In comment#128 I wrote intentionally "something else" because > currently I cannot imagine know what could be the actual reason > why it now works for you. > > My blind guess is some lower-level USB-related software > like libusb-1_0-0 or the kernel. But from their rpm changelog > output I cannot imagine whether or not a change therein could > be the actual reason why it now works for you. > > FYI regarding why "libusb-1_0-0": > On my 20150630 Tumbleweed system (cf. comment#125) I get > --------------------------------------------------------------------------- > # ldd /usr/lib/cups/backend/usb | grep libusb > libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0 (0x00007fcb5c916000) > > # rpm -qf /usr/lib64/libusb-1.0.so.0 > libusb-1_0-0-1.0.19-3.3.x86_64 > --------------------------------------------------------------------------- here are my versions. > cat /etc/os-release NAME=openSUSE VERSION="20150702 (Tumbleweed)" VERSION_ID="20150702" > ldd /usr/lib/cups/backend/usb | grep libusb libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0 (0x00007ffab4420000) > rpm -qf /usr/lib64/libusb-1.0.so.0 libusb-1_0-0-1.0.19-3.3.x86_64
FYI regarding the issue that running plain /usr/lib/cups/backend/usb as root shows a USB printer but "lpinfo -v" and the CUPS web frontend and other printer setup tools do not show it: It seems bug#938659 shows the root cause: "udev does not set 'rw-rw-r-- root lp' for device node for all USB printers" see in particular https://bugzilla.suse.com/show_bug.cgi?id=938659#c4 Perhaps it works for Ian Powell because he got a newer udev but I am not at all a sufficient udev expert to really know.
(In reply to Johannes Meixner from comment #132) > FYI regarding the issue that > running plain /usr/lib/cups/backend/usb as root shows a USB printer > but "lpinfo -v" and the CUPS web frontend and other printer setup tools > do not show it: > > It seems bug#938659 shows the root cause: > "udev does not set 'rw-rw-r-- root lp' for device node for all USB printers" > see in particular > https://bugzilla.suse.com/show_bug.cgi?id=938659#c4 > > Perhaps it works for Ian Powell because he got a newer udev > but I am not at all a sufficient udev expert to really know. It all still works happily. my current udev info as per rpm -qa | grep udev - not sure what it was when things didn't work. libgudev-1_0-0-219-6.2.x86_64 udev-browse-0.3-9.2.x86_64 libinput-udev-0.18-1.1.x86_64 libudev1-219-6.2.x86_64 udev-219-6.2.x86_64 python-pyudev-0.16.1-10.3.noarch udev-configure-printer-1.5.7-2.1.x86_64 udev also set "crw-rw- r--+ root lp" for my scanner as well bus/usb/001: crw-rw-r-- 1 root root 189, 0 Jul 21 08:20 001 crw-rw-r--+ 1 root lp 189, 1 Jul 21 08:20 002 crw-rw-r--+ 1 root lp 189, 4 Jul 21 13:08 005
Only FYI regarding scanner device node setup via udev: "rw-rw-r-- root lp" for a USB scanner device node happens via /etc/udev/rules.d/55-libsane.rules (from sane-backends RPM) and for scanners in HP all-in-one devices additionally via /usr/lib/udev/rules.d/56-hpmud.rules (from the hplip RPM). Both set ENV{libsane_matched}="yes" and that one triggers in /usr/lib/udev/rules.d/70-uaccess.rules (from the systemd RPM) that TAG+="uaccess" is set which triggers in /usr/lib/udev/rules.d/73-seat-late.rules (from the systemd RPM) to RUN{builtin}+="uaccess" that manages device node user ACLs which finally results the '+' in "rw-rw-r--+" (i.e. an ACL setting) for a USB scanner device node. To display the ACL run as root # getfacl /dev/bus/usb/<bus_number>/<device_number> The ACL is only set when a normal user logs in directly at the computer (not from remote). In this case that normal user gets read/write access for the USB scanner device node. For example on my Tumblewed system where I am directly logged in as normal user "johannes": ---------------------------------------------------------------------------- # lsusb ... Bus 004 Device 003: ID 04a9:220e Canon, Inc. CanoScan N1240U/LiDE 30 # ls -l /dev/bus/usb/004/003 crw-rw-r--+ 1 root lp 189, 386 Jul 21 14:36 /dev/bus/usb/004/003 # getfacl /dev/bus/usb/004/003 getfacl: Removing leading '/' from absolute path names # file: dev/bus/usb/004/003 # owner: root # group: lp user::rw- user:johannes:rw- group::rw- mask::rw- other::r-- ---------------------------------------------------------------------------- Regardless that I can sometimes show how it usually should work I cannot really help when something with udev or systemd does not work as it should because I am not at all a sufficient expert to debug or even fix issues that are related to udev or systemd.
(In reply to Johannes Meixner from comment #134) > Only FYI regarding scanner device node setup via udev: > > "rw-rw-r-- root lp" for a USB scanner device node happens via > /etc/udev/rules.d/55-libsane.rules (from sane-backends RPM) > and for scanners in HP all-in-one devices additionally via > /usr/lib/udev/rules.d/56-hpmud.rules (from the hplip RPM). > > Both set ENV{libsane_matched}="yes" and that one triggers in > /usr/lib/udev/rules.d/70-uaccess.rules (from the systemd RPM) > that TAG+="uaccess" is set which triggers in > /usr/lib/udev/rules.d/73-seat-late.rules (from the systemd RPM) > to RUN{builtin}+="uaccess" that manages device node user ACLs > which finally results the '+' in "rw-rw-r--+" > (i.e. an ACL setting) for a USB scanner device node. > > To display the ACL run as root > # getfacl /dev/bus/usb/<bus_number>/<device_number> > > The ACL is only set when a normal user logs in directly > at the computer (not from remote). > In this case that normal user gets read/write access > for the USB scanner device node. > > For example on my Tumblewed system where I am directly logged in > as normal user "johannes": > ---------------------------------------------------------------------------- > # lsusb > ... > Bus 004 Device 003: ID 04a9:220e Canon, Inc. CanoScan N1240U/LiDE 30 > > # ls -l /dev/bus/usb/004/003 > crw-rw-r--+ 1 root lp 189, 386 Jul 21 14:36 /dev/bus/usb/004/003 > > # getfacl /dev/bus/usb/004/003 > getfacl: Removing leading '/' from absolute path names > # file: dev/bus/usb/004/003 > # owner: root > # group: lp > user::rw- > user:johannes:rw- > group::rw- > mask::rw- > other::r-- > ---------------------------------------------------------------------------- > > Regardless that I can sometimes show how it usually should work > I cannot really help when something with udev or systemd does > not work as it should because I am not at all a sufficient expert > to debug or even fix issues that are related to udev or systemd. thanks. you know a lot more that me and i'm grateful for the info I'm just happy now that everything happens to work as it should