Jump to content
camorri

APC UPS ES 750 never seen by Mandriva 10.1

Recommended Posts

I bought a APC BACK UPS ES 750G and want it to talk to my Mandriva system. The problem is the UPS never shows up in /dev when I plug in the USB cable. The UPS works, as a UPS. It is recognized by my Ubuntu 10.1 system installed on a HP netbook. When I plug in the UPS to that system, the UPS shows up in /dev. If I do a lsusb, the device is listed as you would expect, but not on Mandriva.

 

I believe this is a Mandriva bug, I have spent a lot of time on this and tried many things. There are two main packages to monitor a UPS, apcupsd and nut. I have tried both without success.

 

Some information about my system. The system board is a Gigabyte board model GA-M61SME-S2 with F4 level bios installed. Note, many other USB devices work just fine on the system, and on any port I plug them into.

 

Mandriva.

uname -a
Linux duelie 2.6.33.7-desktop-2mnb #1 SMP Mon Sep 20 18:19:20 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

 

USB modules loaded -

lsmod | grep usb
usbhid         		49577  0 
hid                	81757  1 usbhid
usbcore       		210196  4 usbhid,ohci_hcd,ehci_hcd

 

I tried getting the device recognized by removing the ehci_hcd module. That had no effect other than removing the higher speed driver. Note, I have the usbhid module loaded. Nut seems to want it. From what I have read, UPS's are detected by hid.

 

Here is lsusb without the UPS plugged in.

 

lsusb[code]

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 002: ID 04f9:0028 Brother Industries, Ltd Printer[/code]

 

and after I plug the UPS usb cable :

 

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04f9:0028 Brother Industries, Ltd Printer

 

And from dmesg, after plugging the UPS in post 5.

 

usb 2-3: new full speed USB device using ohci_hcd and address 2
usb 2-3: New USB device found, idVendor=04f9, idProduct=0028
usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-3: Product: HL-2040 series
usb 2-3: Manufacturer: Brother
usb 2-3: SerialNumber: M6J445571
usb 2-5: new low speed USB device using ohci_hcd and address 3
usb 2-5: device descriptor read/all, error -71
usb 2-5: new low speed USB device using ohci_hcd and address 4
usb 2-5: device descriptor read/all, error -71
usb 2-5: new low speed USB device using ohci_hcd and address 5
usb 2-5: device descriptor read/8, error -71
usb 2-5: device descriptor read/all, error -71
usb 2-5: new low speed USB device using ohci_hcd and address 6
usb 2-5: device descriptor read/8, error -71
usb 2-5: device descriptor read/8, error -71
hub 2-0:1.0: unable to enumerate USB device on port 5

 

So, no device is created, and the monitoring software can not talk to the UPS.

 

I did some reading on HID. Seems it should create nodes in /dev/hid/usb, it never does on Mandriva. I found a script to create the nodes, and placed the commands in rc.local. So I have nodes. Here they are...

 

(root)-(jobs:0)-(/dev/usb)
(! 1006)-> ls
hiddev0  hiddev10  hiddev12  hiddev14  hiddev2  hiddev4  hiddev6  hiddev8
hiddev1  hiddev11  hiddev13  hiddev15  hiddev3  hiddev5  hiddev7  hiddev9

 

Right now I have them in /dev/usb because of a suggestion I found in another thread. It does not matter if they are in /dev/usb or /dev/hid/usb the device is not created, and I never see it with lsusb.

 

I'm going to log into my Ubuntu system, and post some info from there...

 

From the Ubuntu neybook.

 

Fist of all, lsmod...

 

root@cliffs-mini:/home/cliff# lsmod | grep usb
usbhid             	36110  0 
hid                	67032  1 usbhid

 

lsusb...

 

root@cliffs-mini:/home/cliff# lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0461:4d03 Primax Electronics, Ltd Kensington Mouse-in-a-box
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 5986:0182 Acer, Inc 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

The last few lines of dmesg after I plug the UPS

 

475.152096] usb 2-2: new low speed USB device using uhci_hcd and address 2
[  475.394436] usb 2-2: configuration #1 chosen from 1 choice
[  476.613148] generic-usb 0003:051D:0002.0002: hiddev96,hidraw1: USB HID v1.10 Device [American Power Conversion Back-UPS ES 750 FW:841.I3 .D USB FW:I3 ] on usb-0000:00:1d.0-2/input0

 

Can anyone give me some insight into how to get Mandriva to create the device?

Edited by camorri

Share this post


Link to post
Share on other sites

It seems that you have not installed the most important package for APC UPSs.

It is........ GAPCMON.

 

I have been using APC UPSs for at least 8 years and these two packages since they were first made available in Mandriva, thanks to Adam Williamson (now with RedHat).

I am using an APC Backups CS 650 which has a USB connection and I assume that your unit has the same so there is no need to fiddle around with the KDE or Gnome processes using NUT (that I found to be very difficult to use and a huge waste of time).

 

Install the package then reboot. You will then be able to click on the UPS icon and set up as you want by clicking on the ADD button and going on from there. Log out then back in and you should be good to go.

 

Cheers. John.

Share this post


Link to post
Share on other sites

John,

 

Thank-you for your response. I installed gapcmon as you suggested, re-installed apacupsd ( I had removed it when I installed nut ). I went through the configuration of apcupsd and started it. As before, it fails. Here is the output.

 

Oct 23 10:02:23 Duelie apcupsd[31639]: apcupsd FATAL ERROR in linux-usb.c at line 609#012Cannot find UPS device --#012For a link to detailed USB trouble shooting information,#012please see <http://www.apcupsd.com/support.html>.
Oct 23 10:02:23 Duelie apcupsd[31639]: apcupsd error shutdown completed

 

The UPS is still not detected on the usb bus. lsusb does not show the device. At this point, I do not think this has anything to do with apcupsd, or nut for that matter. The device is not detected, so nothing can talk to it.

 

I'm at a loss at this point, since I have no idea how devices are detected; other than through the installed usb drivers. Keep in mind, any other device I plug in to the usb ports work. That includes two different cameras, a mp3 player, a printer, and a blue tooth dongle.

 

I want to monitor the UPS, so in the event of an extended power outage, I can have things set up for an orderly shutdown. If I'm home at the time, no problem, I can shut things down. The local power company has already tested that for me.

 

This is the best bet I have found so far. See this link.

 

http://www.linuxquestions.org/questions/linux-hardware-18/apc-upc-cannot-find-ups-device-209299/

 

In short, the symptoms seem the same, device not detected on USB.

 

One question, urpmi kernel lists 54 choices. How do I know what kernels are 'hardened' and which ones are not?

Edited by camorri

Share this post


Link to post
Share on other sites

Hello Camorri.

What kernel are you using ???. I am using kernel-desktop-26.3.***.......I also install kernel-desktop-devel-26.3.***....

 

These are the ones most used for most destop users, as far as I know. Note I said most and not all. By the way the best way to install Mandriva2010-Spring is by clean install and NOT by upgrade (it is not just my view either.).

 

As I said earlier, I have not had a problem with UPSs with USB in 5 or more years. I have noticed that 2010-Spring installs a different kernel as default install. Since I always change to the one I suggest using, that maybe is why I never have a problem. I can't be sure on that.

When using the 2 APC packages make sure to uninstall NUT. Nut is intended for a hotch potch of various UPSs and could interfere with the APC packages (which are also helped by the APC company so top marks to them).

 

It is worth a try.

 

Cheers. John.

Share this post


Link to post
Share on other sites

I'm using a stock kernel,

Linux duelie 2.6.33.7-desktop-2mnb #1 SMP Mon Sep 20 18:19:20 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

 

I have the 'Kernel latest desktop' and 'Kernel latest devel' virtual packages installed. So I should have the latest stable kernels for desktop use. ( in theory ).

 

This was a clean install, I don't trust upgrades either. The question on kernel came up because of the link In my previous post, some Mandriva users were having the same problem with APCUPS's and the fix was installing a different kernel. From what I can figure out, Mandriva and the security settings may have something to do with the device not found. The thread suggests devfs is not activated in the kernel?

I ran this command, 'zcat /proc/config.gz"|grep -i devfs' and nothing shows up in the output. This leads me to believe This is my problem. See post 3 in the above thread.

 

I have had a look at MCC and security settings. My system was set for 'Standard' security. I tried 'Netbook' since the description sounded less secure. No change. I find the security settings a bit of a mystery. Not at all sure what changes with different settings. Of course this may be a red herring...

Share this post


Link to post
Share on other sites

Well, the problem persists. I installed a newer kernel,

uname -a
Linux duelie 2.6.34.7-1mdv #1 SMP Wed Sep 15 18:25:07 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

 

The problem is the same, no device is created when I hotplug the UPS.

 

I have looked at udev rules, and there is a rule that should match the UPS.

 

One thing is bugging me, and that is this;

 

new low speed USB device using ohci_hcd and address 3
usb 2-5: device descriptor read/all, error -71

 

Note it is the ohci-hcd driver that is talking to the UPS. Everything I have read indicates it should be usbhid that does the work. I have it loaded, but

ohci-hcd is the driver doing the work. On my Ubuntu system ohci_hcd isn't loaded. I tried removing ohci-hcd and ehci-hcd, then nothing worked on the

usb ports.

 

Where do I go from here? I have a Kubuntu 10.10 cd sitting here...

 

Share this post


Link to post
Share on other sites

Well, the problem persists.

 

 

 

I installed a newer kernel,

Where do I go from here? I have a Kubuntu 10.10 cd sitting here...

Some people over at forum.mandriva have found that kernel-linus was able to see usb devices that the Mandrive kernel couldn't.

Its worth a try.

Share this post


Link to post
Share on other sites

I tried removing ohci-hcd and ehci-hcd, then nothing worked on the usb ports.

 

You need to load either ohci_hcd or uhci_hcd for a USB host controller driver. I'm not sure why you're having this problem, but I can show you what I'm using for my ES 550.

[root@halfway greg]# lsusb | egrep -i power
Bus 001 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
[root@halfway greg]# lspcidrake -v | egrep -i apc
usbhid          : APC|Back-UPS ES 550 FW:843.K2 .D USB FW:K2  [Human Interface Device|No Subclass|None] (vendor:051d device:0002)
[root@halfway greg]# lsmod | grep usb                                                                                            
usbhid                 47136  2 
hid                    65280  1 usbhid
usblp                  12548  0 
usbcore               185648  7 usbhid,usblp,ehci_hcd,uhci_hcd

I would suggest trying the kernel-linus that K Bergen suggested.

Share this post


Link to post
Share on other sites

K Bergen and Greg2,

 

Thank-you for your interest and responses.

 

I installed Kernel-linus-2.6.34.7-1mdv x86_64 and am running it right now. However, it has not made any difference either. Here are the usb messages I see in dmesg after a boot, with the APC UPS plugged in.

 

dmesg | grep usb
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.34.7-1mdv ehci_hcd
usb usb1: SerialNumber: 0000:00:02.1
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.34.7-1mdv ohci_hcd
usb usb2: SerialNumber: 0000:00:02.0
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb 2-6: new low speed USB device using ohci_hcd and address 2
usb 2-6: device descriptor read/all, error -71
usb 2-6: new low speed USB device using ohci_hcd and address 3
usb 2-6: device not accepting address 3, error -71
usb 2-6: new low speed USB device using ohci_hcd and address 4
usb 2-6: device not accepting address 4, error -71
usb 2-6: new low speed USB device using ohci_hcd and address 5

 

And the current kernel -

uname -a                                                                                                                    	
Linux duelie 2.6.34.7-1mdv #1 SMP Wed Sep 15 18:25:07 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

 

I tried loading uhci-hcd. It loads without a problem. However, the low speed UPS is not seen.

 

It appears to me as if the ohci-hcd module is the one trying to see the device, from the dmesg output. From what I have read, the device should be detected by usbhid. On my Ubuntu system, the

only drivers for usb are are hid and usbhid. I removed all the other drivers on my Mandriva system, then not even the hubs show up with lsusb. I'm at a loss at this point.

 

Did some more reading. Found a suggestion to change boot options. I tried 'noapic' and 'nolapic'. That made no difference.

Edited by camorri

Share this post


Link to post
Share on other sites

I updated the BIOS to the latest level. It was Award Bios version F4, and is now version F10a. The problem remains, no device is detected. The errors I see from dmesg have changed slightly.

 

Here is the output from the last plugging of the UPS.

 

usb 1-6: new low speed USB device using ohci_hcd and address 11
usb 1-6: device descriptor read/all, error -71
usb 1-6: new low speed USB device using ohci_hcd and address 12
usb 1-6: device descriptor read/all, error -71
usb 1-6: new low speed USB device using ohci_hcd and address 13
usb 1-6: device not accepting address 13, error -71
usb 1-6: new low speed USB device using ohci_hcd and address 14
usb 1-6: device descriptor read/8, error -62
usb 1-6: device descriptor read/8, error -71
hub 1-0:1.0: unable to enumerate USB device on port 6

Share this post


Link to post
Share on other sites

This quote is in the documentation for apcupsd howto.

 

What complicates the situation much more on Mandrake kernels is their security level since CONFIG_DYNAMIC_USB_MINORS is turned on, but on higher security levels devfs is turned off. The net result, is that in those situations hiddev is completely unusable so apcupsd will not work. So, in these cases, the choices are:

 

  1. Reduce the security level setting of the system (not sure if this is possible after the initial install).
  2. Custom build a high security kernel with devfs enabled and make sure devfs is mounted and devfsd is running.
  3. Custom build a high security kernel with dynamic minors disabled
  4. Use udev

 

I have confirmed CONFIG_DYNAMIC_USB_MIRRORS is turned on in stock kernels, at least the ones I have installed. I have also confirmed devfs is not running.

 

I'm going to investigate disabling dynamic mirrors in the kernel.

Share this post


Link to post
Share on other sites

Hello Cliff.

 

I use Standard for my security setting and always have done so that is probably why I and others have not experienced your problem.

 

Do you have some special reason to use a higher level setting ???. For most users it is not really needed. It would make sense in higher level settings for it to be harder for USB and such like to be easily activated.

 

Years ago when I started in Mandriva, I thought I was being extra security conscious by using the highest setting possible and often had all sorts of user problems. I soon learned that that all those higher level settings were not really meant for usual desktop usage.

 

Open MCC (Mandriva Control Centre) and enter Security then enter Configure System Security. If you find the Secure box is ticked then change it to Standard.

Each of the two alternate settings have an explanation so you will see what I am driving at.

 

Cheers. John.

Share this post


Link to post
Share on other sites

John,

 

Thank-you for your reply. I have always used the Standard setting. I tried disabling Msec, however that made no difference. Right now I believe the problem is related to CONFIG_DYNAMIC_USB_MIRRORS being enabled in the kernel. I won't know until I figure out how to recompile a stock kernel with this option disabled.

 

I'll post back after I make the kernel change, and test it.

Share this post


Link to post
Share on other sites

Well, sadly I have hit a wall. I recompiled the kernel, turned off Config_DYNAMIC_USB_MINORS, and the new kernel will not create an entry in /dev for the UPS.

 

I don't have any where near enough knowledge on the kernel to fix this. So, until I decide to install a new system on my main machine, I will live with it.

 

My choice will not be Mandriva though, partly because of this problem, and partly because of the very uncertain future on Mandriva.

 

Than-you to those that replied.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...