LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   USB device keeps connecting and disconnecting Slackware 14 specific (http://www.linuxquestions.org/questions/slackware-14/usb-device-keeps-connecting-and-disconnecting-slackware-14-specific-4175471128/)

mostlyharmless 07-27-2013 11:20 AM

USB device keeps connecting and disconnecting Slackware 14 specific
 
So, currently I boot Slackware 14, Mint 13 and WinXP on the same hardware. I noticed recently that under Slackware, but not Mint, that dmesg gets filled with constant connects and reconnects of one of my USB devices, like so:
Code:

  125.851020] usb 2-2: new low-speed USB device number 14 using ohci_hcd
[  126.050833] usb 2-2: New USB device found, idVendor=0764, idProduct=0501
[  126.050840] usb 2-2: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[  126.050845] usb 2-2: Product: CP825AVRLCD-G
[  126.050849] usb 2-2: Manufacturer: CPS
[  126.128711] generic-usb 0003:0764:0501.000C: hiddev0,hidraw0: USB HID v1.10 Device [CPS CP825AVRLCD-G] on usb-0000:03:08.0-2/input0
[  132.671617] usb 2-2: USB disconnect, device number 14
[  134.994019] usb 2-2: new low-speed USB device number 15 using ohci_hcd
[  135.191170] usb 2-2: New USB device found, idVendor=0764, idProduct=0501
[  135.191176] usb 2-2: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[  135.191182] usb 2-2: Product: CP825AVRLCD-G
[  135.191186] usb 2-2: Manufacturer: CPS
[  135.268049] generic-usb 0003:0764:0501.000D: hiddev0,hidraw0: USB HID v1.10 Device [CPS CP825AVRLCD-G] on usb-0000:03:08.0-2/input0
[  141.854932] usb 2-2: USB disconnect, device number 15
[  142.167704] agpgart-intel 0000:00:00.0: AGP 2.0 bridge
[  142.167729] agpgart-intel 0000:00:00.0: putting AGP V2 device into 4x mode
[  142.167757] nvidia 0000:01:00.0: putting AGP V2 device into 4x mode
[  144.136035] usb 2-2: new low-speed USB device number 16 using ohci_hcd
[  144.335512] usb 2-2: New USB device found, idVendor=0764, idProduct=0501
[  144.335520] usb 2-2: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[  144.335526] usb 2-2: Product: CP825AVRLCD-G
[  144.335530] usb 2-2: Manufacturer: CPS
[  144.410846] generic-usb 0003:0764:0501.000E: hiddev0,hidraw0: USB HID v1.10 Device [CPS CP825AVRLCD-G] on usb-0000:03:08.0-2/input0
[  150.956493] usb 2-2: USB disconnect, device number 16
[  153.278055] usb 2-2: new low-speed USB device number 17 using ohci_hcd
[  153.476866] usb 2-2: New USB device found, idVendor=0764, idProduct=0501
[  153.476874] usb 2-2: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[  153.476880] usb 2-2: Product: CP825AVRLCD-G
[  153.476884] usb 2-2: Manufacturer: CPS

Notice how the device number gets incremented by 1 each time. This behaviour continues indefinitely as long as the system is up.

Any ideas on why, or if it is a problem? The device is a UPS, so it is hard to know whether it is functioning under Slackware; WinXP reports normal communications under its drivers.

ljb643 07-27-2013 04:54 PM

The incrementing device number is normal - not the problem. The problem is that 6 seconds after the UPS is detected, it get disconnected. Since it works under your other operating system boots, that probably rules out a bad cable or connection. It could be the kernel USB driver doesn't like something from the UPS, but I think your log would contain something about why it happened if that were the case. My guess is that the UPS is doing it, possibly because it doesn't see what it expects to see coming from the PC.

Do you want the UPS connected? Are you going to be monitoring it, or doing automated shutdown? (If not, just pull the cable...)

mostlyharmless 07-27-2013 06:55 PM

Well, I'd prefer to keep it plugged in, on the theory that if there is a power outage, I could get an automated shutdown. Of course I'd probably have to set that up, which I haven't yet. Looking around a bit I see that the problem has occurred with CPS units before:
https://bbs.archlinux.org/viewtopic.php?id=100459 and on closer inspection I see that the countdown stops if I don't add or remove and USB devices. So I guess this one is solved. Now on to install the "powerpanel" software for the thing...

mostlyharmless 11-19-2013 02:03 PM

Now on new hardware with Slackware 14.1 and it *never* stops counting now. Floods dmesg and the console with same message; basically I had to disconnect it. While that's a solution, it doesn't address the root of the problem. Any ideas? I guess now if I could I'd have to mark this UNSOLVED.

glorsplitz 11-19-2013 08:11 PM

I replaced a CPS with APC, using apcupsd which seems to work fine, like behaving itself logging.

Is your CPS newer so that you don't want to replace it with like APC?

mostlyharmless 11-21-2013 02:36 PM

No, it's a CyberPower unit I've had for a while. The computer is new, and the OS is new.. Slackware 14.1 ;)

ljb643 11-21-2013 06:44 PM

Quote:

Originally Posted by mostlyharmless (Post 5067387)
... Any ideas? I guess now if I could I'd have to mark this UNSOLVED.

You can (and should) mark it Unsolved, using the Thread Tools pull-down menu.

To clarify: This is a CyberPower (cyberpowersystems.com) model CPS825AVRLCD?

Interesting that CyberPower has their own downloadable software for Linux. Now I realize the problem you are having seems to be with the kernel USB module, not the software above that. But it tells me that someone at CyberPower at least knows about Linux and they have some support for it. Maybe you could try contacting them to ask.

mostlyharmless 11-22-2013 02:46 PM

Thanks, it's Unsolved. Yes it's that same Cyberpower unit. I've used the cyberpower/powerpanel software in the past when I had the problem under Slackware 14.

It didn't affect the issue one way or another, and as was pointed out, it wasn't a problem with Mint 13. As the Arch thread I referenced shows, it has to do with the UPS driver not connecting fast enough after the device is enumerated, supposedly. Cyberpower's web page only references kernel 2.6, but I suppose I can try filling out the online form and see if they get back to me. Amusement value if nothing else when I get around to it.

mostlyharmless 10-15-2014 03:35 PM

Update with solution
 
Probably everyone who has had this problem has it solved by now, but in case someone finds this thread, here it is. Apparently the firmware on these units is dodgy, and if you don't connect within 20 seconds, you get the infinite disconnect/reconnect loop. In Slackware 13.37, apparently it connected in time, in 14.1 it does not. Instead of using Cyberpower's "powerpanel" outdated software, most people, including me now use "nut" http://www.networkupstools.org/ which supports many units including these. Build it, install it and configure it. To ensure not having the infinite loop problem, here is the solution from eg http://comments.gmane.org/gmane.comp....nut.user/7479 to the effect that one should add
Code:

The solution is to have udev run 'upsdrvctl start' when this device
connects. To do so, add ", RUN+="/sbin/upsdrvctl start" to the end of
the udev config line for your device. Mine looks like this:

#  Dynex DX-800U?, aloso 825AVRLCD  - usbhid-ups
ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664",
GROUP="nut", RUN+="/sbin/upsdrvctl stop ; /sbin/upsdrvctl start"

The path to upsdrvctl on my installation is actually /usr/local/ups/sbin/upsdrvctl

Here are some good instructions for installing nut from source. http://englanders.us/~jason/howtos.php?howto=nut The slackpkg from SBo needs some tweaking IMHO, but your mileage may vary.

Alien Bob 10-16-2014 05:41 AM

Thanks for adding this detailed solution.

Eric


All times are GMT -5. The time now is 08:17 AM.