LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-27-2013, 11:20 AM   #1
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
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.
 
Old 07-27-2013, 04:54 PM   #2
ljb643
Member
 
Registered: Nov 2003
Posts: 292

Rep: Reputation: Disabled
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...)
 
Old 07-27-2013, 06:55 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Original Poster
Rep: Reputation: 182Reputation: 182
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...
 
Old 11-19-2013, 02:03 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Original Poster
Rep: Reputation: 182Reputation: 182
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.
 
Old 11-19-2013, 08:11 PM   #5
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 259

Rep: Reputation: 29
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?
 
Old 11-21-2013, 02:36 PM   #6
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Original Poster
Rep: Reputation: 182Reputation: 182
No, it's a CyberPower unit I've had for a while. The computer is new, and the OS is new.. Slackware 14.1
 
Old 11-21-2013, 06:44 PM   #7
ljb643
Member
 
Registered: Nov 2003
Posts: 292

Rep: Reputation: Disabled
Quote:
Originally Posted by mostlyharmless View Post
... 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.
 
Old 11-22-2013, 02:46 PM   #8
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Original Poster
Rep: Reputation: 182Reputation: 182
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.
 
Old 10-15-2014, 03:35 PM   #9
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Original Poster
Rep: Reputation: 182Reputation: 182
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.
 
Old 10-16-2014, 05:41 AM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,379

Rep: Reputation: Disabled
Thanks for adding this detailed solution.

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Port-specific USB device mounting. thndrchld Linux - Hardware 7 04-05-2013 08:26 AM
USB device (DDR pad) keeps disconnecting shadowsnipes Linux - Hardware 9 01-03-2009 06:21 PM
usb stick connecting / disconnecting JeanPierre Slackware 5 11-15-2007 09:27 AM
Map USB device to a specific special file DaneelGiskard Linux - Hardware 2 04-14-2007 06:37 PM
Force a USB device to use a specific /dev/ttyUSBX garnser Linux - Software 4 02-10-2006 07:28 AM


All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration