Bug 1715504 - usbhid-ups / hid-generic does fail connecting Eaton 5E UPS with: usb_submit_urb(ctrl) failed: -1
Summary: usbhid-ups / hid-generic does fail connecting Eaton 5E UPS with: usb_submit_u...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-30 13:58 UTC by Andrey
Modified: 2020-09-03 17:59 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1699806
Environment:
Last Closed: 2020-05-26 18:08:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrey 2019-05-30 13:58:35 UTC
Description of problem:
  UPS Eaton 5E 1100iUSB is recognized and immediately disconnected: 
# journalctl -fe
 kernel: usb 1-8: USB disconnect, device number 85
 kernel: usb 1-8: new low-speed USB device number 86 using xhci_hcd
 kernel: usb 1-8: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01
 kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 kernel: usb 1-8: Product: 5E
 kernel: usb 1-8: Manufacturer: EATON
 kernel: hid-generic 0003:0463:FFFF.0055: hiddev97,hidraw1: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-8/input0
 mtp-probe[15330]: checking bus 1, device 86: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8"
 mtp-probe[15330]: bus: 1, device: 86 was not an MTP device
 mtp-probe[15336]: checking bus 1, device 86: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8"
 mtp-probe[15336]: bus: 1, device: 86 was not an MTP device
 kernel: hid-generic 0003:0463:FFFF.0055: usb_submit_urb(ctrl) failed: -1
 kernel: hid-generic 0003:0463:FFFF.0055: timeout initializing reports
 kernel: usb 1-8: USB disconnect, device number 86
  And device ID goes 86 - 86 and so on.

  lsusb shows UPS for a while, then device disappears (probably because it is disconnected) and then shows UPS with incremented device number (reconnected):
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 09da:c10a A4Tech Co., Ltd.
Bus 001 Device 086: ID 0463:ffff MGE UPS Systems UPS
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
----
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 09da:c10a A4Tech Co., Ltd.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
----
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 09da:c10a A4Tech Co., Ltd.
Bus 001 Device 092: ID 0463:ffff MGE UPS Systems UPS
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

   NUT scanners shows this:   nut-scanner -U
Scanning USB bus.
[nutdev1]
	driver = "usbhid-ups"
	port = "auto"
	vendorid = "0463"
	productid = "FFFF"
	bus = "001"

# cat ups.conf  contains section:
[ups]
	driver = "usbhid-ups"
	port = "auto"
	vendorid = "0463"
	productid = "FFFF"

   blazer_usb is not the appropriate driver:
# blazer_usb -DD -u root -x vendorid=0463 -a ups
Network UPS Tools - Megatec/Q1 protocol USB driver 0.12 (2.7.4)
   0.000000     Error: UPS [ups] is for driver usbhid-ups, but I'm blazer_usb!
   
   usbhid-ups should be the correct driver (detects USB mouse and USB UPS):
# usbhid-ups -DD -u root -x vendorid=0463 -a ups
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.000000     debug level is '2'
   0.001211     upsdrv_initups...
   0.002192     Checking device (1D6B/0003) (002/001)
   0.002292     - VendorID: 1d6b
   0.002298     - ProductID: 0003
   0.002309     - Manufacturer: Linux 5.0.4-200.fc29.x86_64 xhci-hcd
   0.002313     - Product: xHCI Host Controller
   0.002316     - Serial Number: 0000:00:14.0
   0.002320     - Bus: 002
   0.002325     - Device release number: 0500
   0.002329     Trying to match device
   0.002349     Device does not match - skipping
   0.002396     Checking device (09DA/C10A) (001/002)
   0.004630     - VendorID: 09da
   0.004637     - ProductID: c10a
   0.004640     - Manufacturer: A4Tech
   0.004642     - Product: USB Mouse
   0.004644     - Serial Number: unknown
   0.004646     - Bus: 001
   0.004648     - Device release number: 1032
   0.004650     Trying to match device
   0.004653     Device does not match - skipping
   0.004659     Checking device (0463/FFFF) (001/078)
   2.005157     - VendorID: 0463
   2.005196     - ProductID: ffff
   2.005205     - Manufacturer: unknown
   2.005214     - Product: unknown
   2.005222     - Serial Number: unknown
   2.005234     - Bus: 001
   2.005244     - Device release number: 0001
   2.005263     Trying to match device
   2.005366     Device matches
   2.005411     failed to claim USB device: Device or resource busy
   9.837128     detached kernel driver from USB device...
  14.837390     Unable to get HID descriptor (Connection timed out)
  14.837423     HID descriptor length 549
  14.837877     Unable to get Report descriptor: Broken pipe
  14.837976     Checking device (1D6B/0002) (001/001)
  14.838237     - VendorID: 1d6b
  14.838258     - ProductID: 0002
  14.838274     - Manufacturer: Linux 5.0.4-200.fc29.x86_64 xhci-hcd
  14.838286     - Product: xHCI Host Controller
  14.838296     - Serial Number: 0000:00:14.0
  14.838307     - Bus: 001
  14.838321     - Device release number: 0500
  14.838331     Trying to match device
  14.838348     Device does not match - skipping
  14.838367     No appropriate HID device found
  14.838379     No matching HID UPS found

  Same UPS device with same cable is working properly when connected to different machines with OS  Fedora 23, Fedora 26, Fedora 29 4.18.16-300.fc29.x86_64 and Windows 10 (with the bundled Win UPS soft).
  The problem is observed when the UPS is connected to 3 different machines with later Fedora 29 kernel (f.e. 5.0.4-200.fc29.x86_64) and all Fedora 30 versions available at the moment. Connecting the UPS through USB hub does not help. Another UPS Eaton 5E 2000iUSB shows the same problem when connected to OS Fedora 29 and works fine on Debian 9.5 (stretch) - 4.9.110-1  amd64.  
  
Version-Release number of selected component (if applicable): Fedora 29 5.0.4-200.fc29.x86_64 and later, all Fedora 30 kernels

How reproducible: Any time Eaton 5E UPS is connected.

Steps to Reproduce:
1. Connect Eaton 5E ****iUSB device to USB port
2.
3.

Actual results:
1. Log shows that the device is constantly connecting & disconnecting. 
2. lsusb shows constantly incrementing Device number.
3. NUT shows:   upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)

Expected results:
No error messages in log, consistent Device number

Additional info:
  Fiddling with /etc/udev/rules.d/69-libmtp.rules to exclude this device from MTP rules does not help:
ATTR{idVendor}=="0463", GOTO="libmtp_rules_end"
  Google search does not point to a work around.
I am a user, not professional. I am puzzled by "hid-generic" record in the log, I expected "usbhid-ups" to handle this device.

Comment 1 Eyal Lebedinsky 2019-07-22 00:04:36 UTC
This looks like a dup of https://bugzilla.redhat.com/show_bug.cgi?id=1699806

I have the same problem. After seeing
    https://lkml.org/lkml/2018/11/26/580
    [PATCH 4.19 038/118] Revert "HID: add NOGET quirk for Eaton Ellipse MAX UPS"

I appended kernel boot parameter
    usbhid.quirks=0x0463:0xffff:0x08
to re-enable the NOGET quirk and now it works.

Comment 2 Frantisek Hanzlik 2019-12-26 23:13:18 UTC
I had same problem on Fedora 29 5.2.11-100.fc29.x86_64 with Eaton 5E 1500i UPS connected to USB2 ohci-pci port.
After upgrading to 5.3.11-100.fc29.x86_64 kernel, all works fine, without USB disconnect.

/var/log/messages USB events when non-functional (5.2.11-100.fc29.x86_64):
...
Dec  7 18:07:32 ivan kernel: usb 4-5: USB disconnect, device number 34
Dec  7 18:07:32 ivan kernel: usb 4-5: new full-speed USB device number 35 using ohci-pci
Dec  7 18:07:33 ivan kernel: usb 4-5: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01
Dec  7 18:07:33 ivan kernel: usb 4-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec  7 18:07:33 ivan kernel: usb 4-5: Product: 5E
Dec  7 18:07:33 ivan kernel: usb 4-5: Manufacturer: EATON
Dec  7 18:07:35 ivan kernel: hid-generic 0003:0463:FFFF.0315: hiddev96,hidraw0: USB HID v1.10 Device [EATON 5E] on usb-0000:00:12.0-5/input0
Dec  7 18:07:46 ivan kernel: hid-generic 0003:0463:FFFF.0315: usb_submit_urb(ctrl) failed: -1
Dec  7 18:07:51 ivan kernel: usb 4-5: USB disconnect, device number 35
Dec  7 18:07:52 ivan kernel: usb 4-5: new full-speed USB device number 36 using ohci-pci
Dec  7 18:07:53 ivan kernel: usb 4-5: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01
Dec  7 18:07:53 ivan kernel: usb 4-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec  7 18:07:53 ivan kernel: usb 4-5: Product: 5E
Dec  7 18:07:53 ivan kernel: usb 4-5: Manufacturer: EATON
Dec  7 18:07:55 ivan kernel: hid-generic 0003:0463:FFFF.0316: hiddev96,hidraw0: USB HID v1.10 Device [EATON 5E] on usb-0000:00:12.0-5/input0
Dec  7 18:08:05 ivan kernel: hid-generic 0003:0463:FFFF.0316: usb_submit_urb(ctrl) failed: -1
Dec  7 18:08:11 ivan kernel: usb 4-5: USB disconnect, device number 36
Dec  7 18:08:11 ivan kernel: usb 4-5: new full-speed USB device number 37 using ohci-pci
Dec  7 18:08:12 ivan kernel: usb 4-5: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01
Dec  7 18:08:12 ivan kernel: usb 4-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec  7 18:08:12 ivan kernel: usb 4-5: Product: 5E
Dec  7 18:08:12 ivan kernel: usb 4-5: Manufacturer: EATON
Dec  7 18:08:14 ivan kernel: hid-generic 0003:0463:FFFF.0317: hiddev96,hidraw0: USB HID v1.10 Device [EATON 5E] on usb-0000:00:12.0-5/input0
...

/var/log/messages USB events after kernel upgrade:
...
Dec 26 22:55:04 ivan kernel: usbcore: registered new interface driver usbserial_generic
Dec 26 22:55:04 ivan kernel: usbserial: USB Serial support registered for generic
Dec 26 22:55:04 ivan kernel: usbcore: registered new interface driver usbhid
Dec 26 22:55:04 ivan kernel: usbhid: USB HID core driver
Dec 26 22:55:04 ivan kernel: usb 4-5: new full-speed USB device number 2 using ohci-pci
Dec 26 22:55:04 ivan kernel: usb 4-5: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01
Dec 26 22:55:04 ivan kernel: usb 4-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 26 22:55:04 ivan kernel: usb 4-5: Product: 5E
Dec 26 22:55:04 ivan kernel: usb 4-5: Manufacturer: EATON
Dec 26 22:55:06 ivan kernel: hid-generic 0003:0463:FFFF.0001: hiddev96,hidraw0: USB HID v1.10 Device [EATON 5E] on usb-0000:00:12.0-5/input0
Dec 26 22:55:33 ivan upsdrvctl[1925]: USB communication driver 0.33
Dec 26 22:55:34 ivan usbhid-ups[2120]: Startup successful
Dec 26 22:55:34 ivan upsd[2121]: Connected to UPS [5e1500]: usbhid-ups-5e1500
(and no disconnects now)

Comment 3 Andrey 2020-01-11 17:05:57 UTC
I have upgraded to Fedora 31 and I cannot test with Fedora 29&30 anymore.
Test with kernel 5.3.7-301.fc31.86-64 shows Eaton 5E 850i USB connection non-functional.
After last upgrade to kernel 5.4.8-200.fc31.86-64 does not change anything, USB connection to UPS is not established.
It seems the only solution is the workarount suggested by Eyal Lebedinsky.

Comment 4 Ben Cotton 2020-04-30 20:33:40 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2020-05-26 18:08:46 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Václav Nováček 2020-07-28 18:59:55 UTC
I have exactly same problem with Eaton 5E 1100i on 5.7.10-201.fc32.x86_64. Could you reopen this bug for FC32?

Comment 7 Anthony 2020-09-03 17:59:08 UTC
Same bug here with the Eaton 5E 1100i on 5.7.15-100.fc31.x86_64 - Logged here https://bugzilla.redhat.com/show_bug.cgi?id=1875532


Note You need to log in before you can comment on or make changes to this bug.