Project

General

Profile

Bug #7153

USB HID disconnects every 15 seconds (WITH PATCH)

Added by Randall Fox almost 6 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Xin Li
Category:
-
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

When using my TRIPP LITE SMART1500RM2U UPS, with NUT services OFF, i get the following dmesg every 15 seconds:
Dec 13 12:35:50 freenas kernel: ugen1.4: <Tripp Lite> at usbus1
Dec 13 12:35:50 freenas kernel: uhid0: <Tripp Lite TRIPP LITE SMART1500RM2U, class 0/0, rev 1.10/2.0a, addr 4> on usbus1
Dec 13 12:36:04 freenas kernel: ugen1.4: <Tripp Lite> at usbus1 (disconnected)
Dec 13 12:36:04 freenas kernel: uhid0: at uhub3, port 2, addr 4 (disconnected)

This problem essentially makes my UPS useless.. And it seems i am not the only one, if you look on the forum, others have this problem as well..

On a hunch it was below the FreeNAS level, I contacted the FreeBSD mailing list, and it seems one of the programmers took pity on me, and fixed the problem.

He states this fix will be put into FreeBSD 9,10, and 11. So I suppose that means we can get it into FreeNAS 9.3.

He told me the following:
The problem is that the different USB vendors are using some undefined ID's without talking to each other getting standard values in there instead.
The kernel will need to rebuilt, and you need to update /etc/devd/usb.conf

Here is are the patches that should fix the problem:
https://svnweb.freebsd.org/changeset/base/275790
https://svnweb.freebsd.org/changeset/base/275791

As mentioned above, others are having this problem, so it would be great if we could get it in ASAP. And I would be open to testing it if someone performs a miracle and gets it added in the next 2 weeks, as I will have some extra holiday time on my hands.

Thanks, and let me know if you need more information. This is my first bug/feature request.

Associated revisions

Revision 52dfc341 (diff)
Added by hselasky almost 6 years ago

Regenerate usb.conf . MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@275791 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit b3bded60b065d1d945d6ee58cf69b9242fc24b95) Conflicts: etc/devd/usb.conf (cherry picked from commit 97cc9ac7301b60d312afb68f3c7af2bc4e58a3ac) Ticket: #7153

Revision 52dfc341 (diff)
Added by hselasky almost 6 years ago

Regenerate usb.conf . MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@275791 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit b3bded60b065d1d945d6ee58cf69b9242fc24b95) Conflicts: etc/devd/usb.conf (cherry picked from commit 97cc9ac7301b60d312afb68f3c7af2bc4e58a3ac) Ticket: #7153

Revision fc0a5404 (diff)
Added by hselasky almost 6 years ago

Resolve USB driver identification conflict. Reported by: Anish Mistry <amistry@am-productions.biz> MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@275790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit 79f04ca5e5933258875f34b59ad8f1c976162026) (cherry picked from commit db05aea7946123eb315d943321c5958ee0a42f43) Ticket: #7153

Revision fc0a5404 (diff)
Added by hselasky almost 6 years ago

Resolve USB driver identification conflict. Reported by: Anish Mistry <amistry@am-productions.biz> MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@275790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit 79f04ca5e5933258875f34b59ad8f1c976162026) (cherry picked from commit db05aea7946123eb315d943321c5958ee0a42f43) Ticket: #7153

History

#1 Updated by Josh Paetzel almost 6 years ago

  • Status changed from Unscreened to Fix In Progress

Thanks for chasing this down and providing the links to the fixes.

In theory I gave a lot of millifucks about this problem. I'd say it was close to giving a full fuck. (maybe 980 millifucks) (FreeNAS is my baby, my opus you might say, and it pains me whenever I see my baby having problems)

However in practice I gave no millifucks. I didn't have any hardware that could reproduce the problem, nor was I willing to drive down the street and buy one of the UPSen that were causing the problem. Nor did I try and engage Hans ().

I will merge the changesets this morning. They'll be in tonight's nightly for testing.

#2 Updated by Super Wad almost 6 years ago

I have the same UPS as Fox. I'm willing to test it as well once the fix is checked in and give additional confirmation either way.

#3 Updated by Josh Paetzel almost 6 years ago

  • Category set to 18
  • Assignee set to Josh Paetzel
  • Target version set to Unspecified

#4 Updated by Josh Paetzel almost 6 years ago

  • Status changed from Fix In Progress to Resolved

#5 Updated by Josh Paetzel almost 6 years ago

  • Status changed from Resolved to 15

This will be in tonight's nightly. Give it a try and let me know if it resolves the issue please.

#6 Updated by Super Wad almost 6 years ago

Will put this on tonight and try it out and reply ASAP.

#7 Updated by Randall Fox almost 6 years ago

Cool! Thanks.. I really didn't think it would happen this quick! I won't have any time to look at this tonight, and it might possibly be as late as this weekend, as i need to make a backup and figure out how to do an upgrade (first time).

I'm glad Super Wad will be able to light it up sooner.. I will post an update when I get it working..

Thanks again.. If this works, it will make my Christmas, and even if it doesn't, at least i know there are others that can offer some input and help. I thought I was all alone on this issue when I went to the FreeBSD USB mail list.. I never thought I would get a possible fix this far this fast.

#8 Updated by Super Wad almost 6 years ago

By way of update, I finally got the nightly FreeNAS-9.3-Nightlies-201412180401.iso installed and running. I've configured the UPS service and it's started.

I did a clean install (no upgrade) and there is nothing else configured on the system except for UPS and necessary email-related items.

I'll update in another 24 hours so it has time to go through whatever failures/successes it might do.

#9 Updated by Jordan Hubbard almost 6 years ago

  • Priority changed from Important to Nice to have

#10 Updated by Super Wad almost 6 years ago

I've ran this nightly for a full day, and the nightly status email shows no USB disconnect/reconnects from the UPS.

I also tested the UPS failover by unplugging it from the wall and plugging it back in. Power remained constant, the email got sent on the ONBATT and ONLINE signals.

Might be safe to say this fix solved the problem with this UPS :)

#11 Updated by Josh Paetzel almost 6 years ago

  • Status changed from 15 to Fix In Progress
  • Assignee changed from Josh Paetzel to Xin Li

Ok. I think it needs to get merged yet. I'm driving and likely won't get a chance to do this this weekend, however I bet Xin can merge it.

#12 Updated by Randall Fox almost 6 years ago

I just upgraded to what I believe is the correct nightly build, and I am still seeing the disconnect messages.

It shows I have version "FreeNAS-9.3-Nightlies-201412170401". I will try it on the 20141218 version that seems to have worked for Super Wad.

#13 Updated by Randall Fox almost 6 years ago

I used the handy update tool built into 9.3, and I am now on the following version:

FreeNAS-9.3-Nightlies-201412210401

I am still getting the disconnect messages. I also see the following warnings in the GUI (as a yellow alert):
WARNING: Firmware version 15 does not match driver version 16 for /dev/mps2
WARNING: Firmware version 15 does not match driver version 16 for /dev/mps0
WARNING: Firmware version 15 does not match driver version 16 for /dev/mps1

I am going to try to figure out what /dev/mps is.. Perhaps my Tripp Lite needs a firmware upgrade?!?

#14 Updated by Xin Li almost 6 years ago

  • Tracker changed from Feature to Bug
  • Status changed from Fix In Progress to Ready For Release
  • Seen in set to 9.3-RELEASE

Two pull-up requests merged to 9.3-STABLE branch.

#15 Updated by Xin Li almost 6 years ago

Randall Fox wrote:

I used the handy update tool built into 9.3, and I am now on the following version:

FreeNAS-9.3-Nightlies-201412210401

I am still getting the disconnect messages. I also see the following warnings in the GUI (as a yellow alert):
WARNING: Firmware version 15 does not match driver version 16 for /dev/mps2
WARNING: Firmware version 15 does not match driver version 16 for /dev/mps0
WARNING: Firmware version 15 does not match driver version 16 for /dev/mps1

I am going to try to figure out what /dev/mps is.. Perhaps my Tripp Lite needs a firmware upgrade?!?

Your LSI SAS HBA needs a firmware update. Before version 16 there are some serious bugs.

By the way, after looking at the changes, I don't believe they would solve your problems, as the conflicting drivers are not present in FreeNAS kernel. Would you please post the output from 'usbconfig list' in a new ticket?

#16 Updated by Randall Fox almost 6 years ago

Yes, the Firmware error is my LSI driver, and it is unrelated to the disconnects. I suspect that the LSI will be easier for me to fix than the disconnects.

I will check with the FreeBSD USB team again and see if there is anything more they can do. If they can't help, I have my doubts, given the talk above, that you will want to fix this without having the proper hardware available.

#17 Updated by Super Wad almost 6 years ago

I got the same LSI error too, but I'm going to fix it when I upgrade again.

My UPS version was slightly different than the one Randall Fox used, so maybe that accounts for the continued failures? I'm using "SMART1500LCD USB" which seems to use a different protocol version and driver than Randall uses.

#18 Updated by Randall Fox almost 6 years ago

Looks like I had my wires crossed in the mailing list and this fix does not fix the Tripp Lite issue nor does it apply to it. I would pull it. I am not sure why it fixes Super Wad's problem, as it is related to "urndis and umodem device collision for ue device" which is not the uhid device protocol the Tripp Lite uses.

Super Wad, perhaps the power cycle fixed things temporarily?

#19 Updated by Super Wad over 5 years ago

I guess it's possible. I've rebooted the machine multiple times though and it always goes back to its old disconnecting ways shortly afterwards.

Though I haven't seen any of the USB disconnects since I went back to my old install. I'm keeping an eye on it; I'm sure it'll stop working at some point.

#20 Updated by Super Wad over 5 years ago

Yea, got this output last night. Rebooting hasn't fixed it. Maybe I didn't wait long enough for the disconnects to happen again, but if the uplevel patch didn't actually touch this issue, it shouldn't have mattered. Have you found the correct patch to merge?

kernel log messages:

ugen1.3: <Tripp Lite> at usbus1 (disconnected)
uhid0: at uhub3, port 1, addr 3 (disconnected)
ugen1.3: <Tripp Lite> at usbus1
uhid0: <Tripp Lite TRIPP LITE UPS, class 0/0, rev 1.10/0.10, addr 3> on usbus1
ugen1.3: <Tripp Lite> at usbus1 (disconnected)
uhid0: at uhub3, port 1, addr 3 (disconnected)
ugen1.3: <Tripp Lite> at usbus1
uhid0: <Tripp Lite TRIPP LITE UPS, class 0/0, rev 1.10/0.10, addr 3> on usbus1
ugen1.3: <Tripp Lite> at usbus1 (disconnected)
uhid0: at uhub3, port 1, addr 3 (disconnected)
ugen1.3: <Tripp Lite> at usbus1
uhid0: <Tripp Lite TRIPP LITE UPS, class 0/0, rev 1.10/0.10, addr 3> on usbus1
ugen1.3: <Tripp Lite> at usbus1 (disconnected)
uhid0: at uhub3, port 1, addr 3 (disconnected)
ugen1.3: <Tripp Lite> at usbus1
uhid0: <Tripp Lite TRIPP LITE UPS, class 0/0, rev 1.10/0.10, addr 3> on usbus1

-- End of security output --

#21 Updated by Jordan Hubbard over 5 years ago

  • Status changed from Ready For Release to Resolved

#22 Avatar?id=14398&size=24x24 Updated by Kris Moore about 4 years ago

  • Target version changed from Unspecified to N/A

Also available in: Atom PDF