nut-2.6.0-1ubuntu3 behavior regression

Bug #779512 reported by Mr. Muskrat
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Fix Released
Medium
Arnaud Quette

Bug Description

Binary package hint: nut

Prior to upgrading to Natty, I had the nut-2.4.3-1ubuntu5 package and it was working correctly.

After upgrading to Natty, I have the nut-2.6.0-1ubuntu3 package and it is not working correctly. Here's my release info:

•[x4linux:~] mmusgrove $ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

The symptom is that it can't initialize data from HID UPS and so the driver fails to start.

•[x4linux:~] mmusgrove $ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.0
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB communication driver 0.31
Using subdriver: CyberPower HID 0.3
libusb_get_report: No error
Can't initialize data from HID UPS
Driver failed to start (exit status=1)

This appears to be the old behavior from 2.4.x prior to 2.4.3.

This was reported for Debian months ago:
http://www.google.com/search?source=ig&hl=en&q=nut+2.6.0-1+libusb_get_report%3A+No+error+Can%27t+initialize+data+from+HID+UPS

Possible related to Bug #701182 (although that is for 2.4.3-2) https://bugs.launchpad.net/ubuntu/+source/nut/+bug/701182

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nut 2.6.0-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Sun May 8 09:37:55 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
KernelVersion: Linux x4linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nut
UpgradeStatus: Upgraded to natty on 2011-05-06 (2 days ago)

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :
Revision history for this message
Arnaud Quette (aquette) wrote : Re: [Bug 779512] [NEW] nut-2.6.0-1ubuntu3 behavior regression

2011/5/8 Mr. Muskrat <email address hidden>

> Public bug reported:
>
> Binary package hint: nut
>
> Prior to upgrading to Natty, I had the nut-2.4.3-1ubuntu5 package and it
> was working correctly.
>

right, but the fix made for the kind of devices you have (ie not fully
complying to USB standards) broke other devices / features.

the right fix would have to be in libusb, but since we're still on 0.1
(which is not maintained anymore), the solution may come from the port to
libusb 1.0.

After upgrading to Natty, I have the nut-2.6.0-1ubuntu3 package and it
> is not working correctly. Here's my release info:
>
> •[x4linux:~] mmusgrove $ lsb_release -rd
> Description: Ubuntu 11.04
> Release: 11.04
>
> The symptom is that it can't initialize data from HID UPS and so the
> driver fails to start.
>
> •[x4linux:~] mmusgrove $ sudo upsdrvctl start
> Network UPS Tools - UPS driver controller 2.6.0
> Network UPS Tools - Generic HID driver 0.35 (2.6.0)
> USB communication driver 0.31
> Using subdriver: CyberPower HID 0.3
> libusb_get_report: No error
> Can't initialize data from HID UPS
> Driver failed to start (exit status=1)
>
> (...)

could you please do the following test and send back the output:
- first, stop nut
- then "export USB_DEBUG=3"
- start the driver using "sudo /lib/nut/usbhid-ups -DDDD -a <upsname>"
where <upsname> is the one from ups.conf.

- the output of "dpkg -l '*libusb*'" would also be useful.

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :
Download full text (15.1 KiB)

Arnaud,
Here is what you have asked for.

Matt

•[x4linux:~] mmusgrove $ sudo service nut stop
[sudo] password for mmusgrove:
 * Stopping Network UPS Tools [ OK ]
•[x4linux:~] mmusgrove $ export USB_DEBUG=3
•[x4linux:~] mmusgrove $ sudo /lib/nut/usbhid-ups -DDDD -a cyberpower
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB communication driver 0.31
   0.000000 debug level is '4'
   0.001247 upsdrv_initups...
   0.290879 Checking device (0764/0501) (007/004)
   0.302437 - VendorID: 0764
   0.302466 - ProductID: 0501
   0.302477 - Manufacturer: CPS
   0.302487 - Product: UPS CP1000AVRLCD
   0.302496 - Serial Number: unknown
   0.302506 - Bus: 007
   0.302515 Trying to match device
   0.302571 Device matches
   0.307441 HID descriptor, method 1: (9 bytes) => 09 21 10 01 21 01 22 83 01
   0.307472 i=0, extra[i]=09, extra[i+1]=21
   0.307489 HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 83 01
   0.307500 HID descriptor length 387
   0.333436 Report Descriptor size = 387
   0.333478 Report Descriptor: (387 bytes) => 05 84 09 04 a1 01 09 24 a1 00 85 01 09 fe
   0.333504 75 08 95 01 15 00 26 ff 00 b1 22 85 02 09 ff b1 22 85 03 05 85 09 89 b1 22
   0.333528 85 04 09 8f b1 22 85 05 09 8b b1 22 85 06 09 2c b1 22 85 07 75 08 95 06 25
   0.333551 78 09 83 09 8d 09 8e 09 8c 09 29 09 67 b1 22 85 08 75 08 95 01 65 00 09 66
   0.333574 81 a2 09 66 b1 a2 09 68 75 10 27 ff ff 00 00 66 01 10 81 a2 09 68 b1 a2 09
   0.333597 2a 26 58 02 81 a2 09 2a b1 a2 85 09 75 08 26 ff 00 05 84 09 40 67 21 d1 f0
   0.333621 00 55 06 b1 22 85 0a 09 30 b1 a2 65 00 55 00 09 02 a1 02 85 0b 75 01 95 06
   0.333644 25 01 05 85 09 d0 09 44 09 45 09 42 09 46 09 43 81 a2 09 d0 09 44 09 45 09
   0.333668 42 09 46 09 43 b1 a2 75 02 95 01 81 01 b1 01 c0 85 0c 05 84 09 5a 75 08 15
   0.333691 01 25 03 b1 a2 85 0d 09 fd 15 00 26 ff 00 b1 22 c0 05 84 09 1a a1 00 85 0e
   0.333714 05 84 09 40 75 08 67 21 d1 f0 00 55 07 b1 22 85 0f 09 30 b1 a2 85 10 09 53
   0.333737 15 5a 25 5a b1 22 09 54 16 8c 00 26 8c 00 b1 22 c0 09 1c a1 00 85 12 09 30
   0.333760 15 00 26 ff 00 b1 a2 65 00 55 00 85 13 09 35 b1 a2 85 14 09 58 25 06 b1 a2
   0.333783 85 15 09 57 75 10 15 ff 26 ff 7f 35 c4 47 c4 ff 1d 00 66 01 10 b1 a2 85 16
   0.333805 09 56 b1 a2 85 17 09 6e 75 01 15 00 25 01 35 00 45 00 65 00 b1 a2 09 65 b1
   0.333827 a2 75 06 b1 01 85 18 75 10 09 44 26 c2 01 66 21 d1 55 07 b1 a2 c0 c0
   0.333968 Using subdriver: CyberPower HID 0.3
   0.333986 Entering libusb_get_report
   0.336438 libusb_get_report: No error
   0.336501 Can't retrieve Report 01: Operation not permitted
   0.336529 Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8
   0.336541 Entering libusb_get_report
   0.339438 libusb_get_report: No error
   0.339476 Can't retrieve Report 02: Operation not permitted
   0.339496 Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0, Size: 8
   0.339508 Entering libusb_get_report
   0.341434 libusb_get_report: No error
   0.341469 Can't ...

Revision history for this message
Arnaud Quette (aquette) wrote : Re: [Bug 779512] Re: nut-2.6.0-1ubuntu3 behavior regression

Hi Matt,

2011/5/10 Mr. Muskrat <email address hidden>

> Arnaud,
> Here is what you have asked for.
>
> Matt
>
>
> •[x4linux:~] mmusgrove $ sudo service nut stop
> [sudo] password for mmusgrove:
> * Stopping Network UPS Tools
>
> [ OK ]
> •[x4linux:~] mmusgrove $ export USB_DEBUG=3
> •[x4linux:~] mmusgrove $ sudo /lib/nut/usbhid-ups -DDDD -a cyberpower
>

can you please try again with:
$ sudo /lib/nut/usbhid-ups -u root -DDDD -a cyberpower

I was thinking about the report size issue, but you're there hitting a
permissions one...

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :

Arnaud,
I hope that I captured enough of the information for you.

Matt

Revision history for this message
Arnaud Quette (aquette) wrote :

2011/5/11 Mr. Muskrat <email address hidden>

> Arnaud,
> I hope that I captured enough of the information for you.
>

thanks Matt.

I'm still trying to find a solution that would satisfy everybody. not that
easy!
would you be able to test an svn version (just a checkout and minimum
compilation to run the driver in debug mode)?

cheers,
Arno

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :

Certainly!

Revision history for this message
Arnaud Quette (aquette) wrote :

2011/5/11 Mr. Muskrat <email address hidden>

> Certainly!
>

excellent, here we go:

$ svn co svn://svn.debian.org/nut/trunk
$ ./autogen.sh
$ ./configure --prefix=/usr \
            --exec-prefix=/ \
            --sysconfdir=/etc/nut \
            --mandir=/usr/share/man \
            --libdir=/lib \
            --includedir=/usr/include \$ sudo
            --without-all \
            --with-usb \
            --enable-static \
            --with-statepath=/var/run/nut \
            --with-altpidpath=/var/run/nut \
            --with-drvpath=/lib/nut \
            --with-pidpath=/var/run/nut \
            --datadir=/usr/share/nut \
            --with-user=nut --with-group=nut

$ sudo ./drivers/usbhid-ups -u root -DDDD -a cyberpower

@Fred: can you please do the same with Troy, and send (only to) me the
output.

We should have sufficient validation with that.
Note that a 2 mn run is sufficient...

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :
Download full text (21.2 KiB)

I thought I'd be able to just copy/paste the instructions one at a time
but I hit a few snags. I installed the missing prereqs and continued on.

•[x4linux:~/nut] mmusgrove $ ./autogen.sh
bash: ./autogen.sh: No such file or directory
•[x4linux:~/nut] mmusgrove $ ls
trunk
•[x4linux:~/nut] mmusgrove $ cd trunk/
/home/mmusgrove/nut/trunk
•[x4linux:~/nut/trunk] mmusgrove $ ./autogen.sh
Regenerating Augeas ups.conf lens...
/home/mmusgrove/nut/trunk/scripts/augeas
Regenerating the USB helper files...
/home/mmusgrove/nut/trunk/tools
Calling autoreconf...
./autogen.sh: 35: autoreconf: not found
•[x4linux:~/nut/trunk] mmusgrove $ sudo apt-get install autoconf
•[x4linux:~/nut/trunk] mmusgrove $ ./autogen.sh
Calling autoreconf...
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf
line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf
line 196.
configure.in:83: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:496: error: possibly undefined macro: AC_DISABLE_STATIC
autoreconf: /usr/bin/autoconf failed with exit status: 1
•[x4linux:~/nut/trunk] mmusgrove $ sudo apt-get install libtool
•[x4linux:~/nut/trunk] mmusgrove $ ./autogen.sh
Calling autoreconf...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.in:14: installing `./missing'
clients/Makefile.am: installing `./depcomp'
•[x4linux:~/nut/trunk] mmusgrove $ ./configure --prefix=/usr \
> --exec-prefix=/ \
> --sysconfdir=/etc/nut \
> --mandir=/usr/share/man \
> --libdir=/lib \
> --includedir=/usr/include \$ sudo
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: $
configure: WARNING: you should use --build, --host, --target
Network UPS Tools version 2.6.0
checking build system type... Invalid configuration `$': machine `$' not
recognized
configure: error: /bin/bash ./config.sub $ failed
•[x4linux:~/nut/trunk] mmusgrove $ --without-all \
> --with-usb \
> --enable-static \
> --with-statepath=/var/run/nut \
> --with-altpidpath=/var/run/nut \
> --with-drvpath=/lib/nut \
> --with-pidpath=/var/run/nut \
> --datadir=/usr/share/nut \
> --with-user=nut --with-group=nut
--without-all: command not found
•[x4linux:~/nut/trunk] mmusgrove $ ./configure --prefix=/usr \
> --exec-prefix=/ \
> --sysconfdir=/etc/nut \
> --mandir=/usr/share/man \
> --libdir=/lib \
> --includedir=/usr/include \
> --without-all \
> --with-usb \
> --enable-st...

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :

I thought I'd be able to just copy/paste the instructions one at a time but I hit a few snags. I installed the missing prereqs and continued on. (See config.txt.)

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :

The output from the run is in usbhid-ups.txt.

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :

(config.txt didn't get uploaded the first time)

Revision history for this message
Arnaud Quette (aquette) wrote :

Hey Matt,

2011/5/13 Mr. Muskrat <email address hidden>

> I thought I'd be able to just copy/paste the instructions one at a time
> but I hit a few snags. I installed the missing prereqs and continued on.
> (...)
>

hem, sorry. I should have given you more info on build-deps and more
generally....
well, the point is that you found your way (congrats) and that everything
seems fixed on your side.
can you please confirm?

I'll do some more checking on my side, but 2.6.1 (soon to go out) will fix
your issue.
as a temporary solution, you may backup /lib/nut/usbhid-ups and replace it
with drivers/usbhid-ups, while waiting for an updated package.

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Mr. Muskrat (mr-muskrat) wrote :

Yes, I can confirm that this fixed the issue I reported. Arnaud, thank you
so much!

Matt

On Fri, May 13, 2011 at 3:18 PM, Arnaud Quette <email address hidden>wrote:

> Hey Matt,
>
> 2011/5/13 Mr. Muskrat <email address hidden>
>
> > I thought I'd be able to just copy/paste the instructions one at a time
> > but I hit a few snags. I installed the missing prereqs and continued on.
> > (...)
> >
>
> hem, sorry. I should have given you more info on build-deps and more
> generally....
> well, the point is that you found your way (congrats) and that everything
> seems fixed on your side.
> can you please confirm?
>
> I'll do some more checking on my side, but 2.6.1 (soon to go out) will fix
> your issue.
> as a temporary solution, you may backup /lib/nut/usbhid-ups and replace it
> with drivers/usbhid-ups, while waiting for an updated package.
>
> cheers,
> Arnaud
> --
> Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
> Debian Developer - http://www.debian.org
> Free Software Developer - http://arnaud.quette.free.fr/
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/779512
>
> Title:
> nut-2.6.0-1ubuntu3 behavior regression
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/779512/+subscribe
>

Revision history for this message
Arnaud Quette (aquette) wrote :

2011/5/14 Mr. Muskrat <email address hidden>

> Yes, I can confirm that this fixed the issue I reported.

thanks for the confirmation

> Arnaud, thank you so much!
>

my pleasure Matt :)

Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Chuck Short (zulcss)
Changed in nut (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Martin Ewing (martin-s-ewing) wrote :
Download full text (4.2 KiB)

I have a very similar situation with my Belkin UPS on Natty (worked on previous release).

See

$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

martin@gimli:~$ aptitude show nut
Package: nut
State: installed
Automatically installed: no
Version: 2.6.0-1ubuntu3
...

sudo /lib/nut/usbhid-ups -DDDD -a mybelkin
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB communication driver 0.31
   0.000000 debug level is '4'
   0.000583 upsdrv_initups...
   0.266176 Checking device (1D6B/0001) (008/001)
   0.266219 - VendorID: 1d6b
   0.266226 - ProductID: 0001
   0.266232 - Manufacturer: unknown
   0.266237 - Product: unknown
   0.266242 - Serial Number: unknown
   0.266247 - Bus: 008
   0.266252 Trying to match device
   0.266275 Device does not match - skipping
   0.266285 Checking device (1D6B/0001) (007/001)
   0.266303 - VendorID: 1d6b
   0.266309 - ProductID: 0001
   0.266315 - Manufacturer: unknown
   0.266320 - Product: unknown
   0.266325 - Serial Number: unknown
   0.266330 - Bus: 007
   0.266335 Trying to match device
   0.266341 Device does not match - skipping
   0.266349 Checking device (050D/1100) (006/002)
   0.291945 - VendorID: 050d
   0.291959 - ProductID: 1100
   0.291966 - Manufacturer: Belkin
   0.291972 - Product: Belkin UPS
   0.291977 - Serial Number: unknown
   0.291982 - Bus: 006
   0.291987 Trying to match device
   0.291995 Device matches
   0.301941 HID descriptor, method 1: (9 bytes) => 09 21 11 01 21 01 22 f2 01
   0.301962 i=0, extra[i]=09, extra[i+1]=21
   0.301972 HID descriptor, method 2: (9 bytes) => 09 21 11 01 21 01 22 f2 01
   0.301978 HID descriptor length 498
   0.372952 Report Descriptor size = 498
   0.372972 Report Descriptor: (498 bytes) => 05 84 09 04 a1 01 05 86 09 26 a1 02 85 01
   0.372985 75 08 95 01 15 00 26 ff 00 09 40 b1 02 85 02 09 42 b1 02 85 03 75 10 27 ff
   0.372996 ff 00 00 09 43 b1 02 85 04 09 44 b1 02 c0 05 86 09 29 a1 02 26 ff 00 85 0d
   0.373007 09 75 b1 02 85 0e 09 76 b1 02 85 0f 09 7c b1 02 c0 05 86 09 27 a1 02 85 10
   0.373018 75 08 95 01 26 ff 00 09 58 b1 02 85 11 09 5a b1 02 85 15 75 10 95 01 27 ff
   0.373029 ff 00 00 09 57 b1 02 85 16 09 56 b1 02 c0 05 86 09 2a a1 02 09 1a a1 02 85
   0.373040 18 75 10 95 01 27 ff ff 00 00 09 30 b1 02 85 19 09 32 b1 02 c0 09 1c a1 02
   0.373051 85 1b 75 10 95 01 27 ff ff 00 00 09 30 b1 02 85 1c 09 32 b1 02 85 1e 75 08
   0.373062 95 01 26 ff 00 09 35 b1 02 c0 c0 05 86 09 10 a1 02 05 86 85 20 75 10 95 01
   0.373074 27 ff ff 00 00 09 30 b1 02 85 21 75 08 95 01 26 ff 00 09 39 b1 02 c0 05 86
   0.373085 09 28 a1 02 85 22 75 10 95 01 27 ff ff 00 00 09 21 b1 02 85 23 75 08 95 01
   0.373096 26 ff 00 09 22 b1 02 c0 05 84 09 24 a1 00 85 28 09 fe 75 08 95 01 26 ff 00
   0.373107 b1 02 85 29 09 ff b1 02 05 85 85 2a 09 89 b1 02 85 2b 09 8f b1 02 85 2c 09
   0.373118 8b b1 02 85 2d 09 44 75 08 95 01 81 82 09 44 b1 82 85 2e 09 45 81 82 09 45
   0.373129 b1 82 05 84 85 30 09 40 75 10 95 01 27 fe ff 00 00 b1 02 85 31 09 30 b1 02
   0.373140 85 32 09 31 75 08 95 01 26 ff 00 b1 02 05 85 85 33 09 2c 75 08 95 01 26 ff
   0.373151 00 b1 02 85 34 09 66 81 82 09 66 b1 82 85 35 09 68 75 10 95 01 27 ff ff 00
...

Read more...

Revision history for this message
TimMadden (timmadden) wrote :

creating usbhid-ups from source did it for me. Thanks

Revision history for this message
Arnaud Quette (aquette) wrote :

Hi Martin,

2011/6/27 Martin Ewing <email address hidden>

> I have a very similar situation with my Belkin UPS on Natty (worked on
> previous release).
>
> See
>
> $ lsb_release -rd
> Description: Ubuntu 11.04
> Release: 11.04
>
> martin@gimli:~$ aptitude show nut
> Package: nut
> State: installed
> Automatically installed: no
> Version: 2.6.0-1ubuntu3
> ...
>
> sudo /lib/nut/usbhid-ups -DDDD -a mybelkin
> Network UPS Tools - Generic HID driver 0.35 (2.6.0)
> USB communication driver 0.31
> 0.000000 debug level is '4'
> 0.000583 upsdrv_initups...
> 0.266176 Checking device (1D6B/0001) (008/001)
> 0.266219 - VendorID: 1d6b
> 0.266226 - ProductID: 0001
> 0.266232 - Manufacturer: unknown
> 0.266237 - Product: unknown
> 0.266242 - Serial Number: unknown
> 0.266247 - Bus: 008
> 0.266252 Trying to match device
> 0.266275 Device does not match - skipping
> 0.266285 Checking device (1D6B/0001) (007/001)
> 0.266303 - VendorID: 1d6b
> 0.266309 - ProductID: 0001
> 0.266315 - Manufacturer: unknown
> 0.266320 - Product: unknown
> 0.266325 - Serial Number: unknown
> 0.266330 - Bus: 007
> 0.266335 Trying to match device
> 0.266341 Device does not match - skipping
> 0.266349 Checking device (050D/1100) (006/002)
> 0.291945 - VendorID: 050d
> 0.291959 - ProductID: 1100
> 0.291966 - Manufacturer: Belkin
> 0.291972 - Product: Belkin UPS
> 0.291977 - Serial Number: unknown
> 0.291982 - Bus: 006
> 0.291987 Trying to match device
> 0.291995 Device matches
> (...)

  0.383981 Entering libusb_get_report
> 0.388933 libusb_get_report: error sending control message: Operation
> not permitted
> ...
>
> Is this the same bug?

I don't think so.
the issue reported here was related to a code change, that resulted in a
regression.

yours seem to be with privileges.
to validate this, try launching the driver with root privs (note the "-u
root"):
$ sudo /lib/nut/usbhid-ups -u root -DDDD -a mybelkin

 Is there a fix

it's related to udev, and since there seems to be quite some similar issues,
I'm wondering if there is a race condition between udev (started through
upstart native scripts) and nut (started through upstart sysV compat
script).

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Martin Ewing (martin-s-ewing) wrote :
Download full text (25.3 KiB)

Arnaud,

Thanks for the reply! I imagine you are correct. I ran the command you
suggested (below). Apparently nut knows the device it should connect to,
but that device is "busy". And running as root doesn't overcome the
problem... (And I don't know why I should have to make /var/run/nut,
either.)

I am not well versed in Ubuntu bug reporting. Do you think I need to submit
this separately? Or should I just wait until the next release? (The lazy
way out.)

Thanks again,
Martin

martin@gimli:~$ sudo /lib/nut/usbhid-ups -u root -DDDD -a mybelkin
[sudo] password for martin:
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB communication driver 0.31
   0.000000 debug level is '4'
   0.000580 Can't chdir to /var/run/nut: No such file or directory
martin@gimli:~$ sudo mkdir /var/run/nut
martin@gimli:~$ sudo /lib/nut/usbhid-ups -u root -DDDD -a mybelkin
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB communication driver 0.31
   0.000000 debug level is '4'
   0.000546 upsdrv_initups...
   0.106579 Checking device (03F0/0317) (008/002)
   0.118917 - VendorID: 03f0
   0.118930 - ProductID: 0317
   0.118937 - Manufacturer: HewLett Packard
   0.118943 - Product: HP LaserJet 1200
   0.118948 - Serial Number: 00CNDL017843
   0.118953 - Bus: 008
   0.118958 Trying to match device
   0.118984 Device does not match - skipping
   0.118997 Checking device (1D6B/0001) (008/001)
   0.119031 - VendorID: 1d6b
   0.119038 - ProductID: 0001
   0.119043 - Manufacturer: Linux 2.6.38-8-generic uhci_hcd
   0.119048 - Product: UHCI Host Controller
   0.119053 - Serial Number: 0000:00:1d.2
   0.119059 - Bus: 008
   0.119063 Trying to match device
   0.119069 Device does not match - skipping
   0.119078 Checking device (0403/6001) (007/002)
   0.134688 - VendorID: 0403
   0.134702 - ProductID: 6001
   0.134709 - Manufacturer: ftdi
   0.134715 - Product: usb serial converter
   0.134721 - Serial Number: ftDWECKP
   0.134726 - Bus: 007
   0.134731 Trying to match device
   0.134738 Device does not match - skipping
   0.134748 Checking device (1D6B/0001) (007/001)
   0.134782 - VendorID: 1d6b
   0.134789 - ProductID: 0001
   0.134794 - Manufacturer: Linux 2.6.38-8-generic uhci_hcd
   0.134799 - Product: UHCI Host Controller
   0.134804 - Serial Number: 0000:00:1d.1
   0.134809 - Bus: 007
   0.134814 Trying to match device
   0.134820 Device does not match - skipping
   0.134828 Checking device (050D/1100) (006/002)
   0.160503 - VendorID: 050d
   0.160517 - ProductID: 1100
   0.160524 - Manufacturer: Belkin
   0.160530 - Product: Belkin UPS
   0.160536 - Serial Number: unknown
   0.160541 - Bus: 006
   0.160545 Trying to match device
   0.160553 Device matches
   0.160579 failed to claim USB device: could not claim interface 0:
Device or resource busy
   0.162665 detached kernel driver from USB device...
   0.173501 HID descriptor, method 1: (9 bytes) => 09 21 11 01 21 01 22
f2 01
   0.173518 i=0, extra[i]=09, extra[i+1]=21
   0.173528 HID descriptor, method 2: (9 bytes) => 09 21 11 01 21 01 22
f2...

Revision history for this message
Arnaud Quette (aquette) wrote :

2011/7/13 Martin Ewing <email address hidden>

> Arnaud,
>
> Thanks for the reply! I imagine you are correct. I ran the command you
> suggested (below). Apparently nut knows the device it should connect to,
> but that device is "busy". And running as root doesn't overcome the
> problem... (And I don't know why I should have to make /var/run/nut,
> either.)
>

this specific issue with claim is generally bound to another instance of the
driver still running.

> I am not well versed in Ubuntu bug reporting. Do you think I need to
> submit
> this separately? Or should I just wait until the next release? (The lazy
> way out.)
>

for now, we'll focus on hunting your issue here.
if it goes beyond another 2 mails, then we'll check for creating a dedicated
bug report, to be able to close it through 2.6.1 upload, while not forgiving
you ;)

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Arnaud Quette (aquette) wrote :

Note for Ubuntu packagers:
- the original report was an issue with udev, and will be fixed with 2.6.3 upload,
- the 2nd one (Martin Ewing) was probably invalid, due to an already running driver instance.
I've asked the user for some more feedback.

cheers,
Arnaud

Revision history for this message
Martin Ewing (martin-s-ewing) wrote :

I do still have an issue with NUT on Ubuntu Natty (64 bit).

I attach my latest info. Will appreciate any further suggestions about how to tame this problem - whether my configuration or otherwise.

Thanks!
Martin

Revision history for this message
Martin Ewing (martin-s-ewing) wrote :

Perhaps I should have added the following

/dev/usb:

$ ls -l
total 0
crw------- 1 root root 180, 97 2011-12-16 10:15 hiddev1
crw-rw---- 1 root lp 180, 0 2011-12-16 10:15 lp0

-Martin

Revision history for this message
Arnaud Quette (aquette) wrote :

Hi Martin,

I'm adding the nut users list, since other may be interested in.

2011/12/16 Martin Ewing <email address hidden>

> I do still have an issue with NUT on Ubuntu Natty (64 bit).
>
> I attach my latest info. Will appreciate any further suggestions about
> how to tame this problem - whether my configuration or otherwise.
>
> Thanks!
> Martin
>
>
> ** Attachment added: "ups_problem.txt"
>
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/779512/+attachment/2636234/+files/ups_problem.txt
>

What is strange, as per your next mail, is that "ls /dev/usb" shows
"hiddev1"!
Can you please forward us an excerpt of your system log, using the "usb"
pattern.

cheers,
Arnaud

Revision history for this message
Martin Ewing (martin-s-ewing) wrote :
Download full text (7.2 KiB)

On Fri, Dec 16, 2011 at 3:31 PM, Arnaud Quette <email address hidden>wrote:

> Hi Martin,
>
> I'm adding the nut users list, since other may be interested in.
>
> 2011/12/16 Martin Ewing <email address hidden>
>
> > I do still have an issue with NUT on Ubuntu Natty (64 bit).
> >
> > I attach my latest info. Will appreciate any further suggestions about
> > how to tame this problem - whether my configuration or otherwise.
> >
> > Thanks!
> > Martin
> >
> >
> > ** Attachment added: "ups_problem.txt"
> >
> >
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/779512/+attachment/2636234/+files/ups_problem.txt
> >
>
> What is strange, as per your next mail, is that "ls /dev/usb" shows
> "hiddev1"!
> Can you please forward us an excerpt of your system log, using the "usb"
> pattern.
>
> cheers,
> Arnaud
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/779512
>
> Title:
> nut-2.6.0-1ubuntu3 behavior regression
>
> Status in “nut” package in Ubuntu:
> Triaged
>
> Bug description:
> Binary package hint: nut
>
> Prior to upgrading to Natty, I had the nut-2.4.3-1ubuntu5 package and
> it was working correctly.
>
> After upgrading to Natty, I have the nut-2.6.0-1ubuntu3 package and it
> is not working correctly. Here's my release info:
>
> •[x4linux:~] mmusgrove $ lsb_release -rd
> Description: Ubuntu 11.04
> Release: 11.04
>
> The symptom is that it can't initialize data from HID UPS and so the
> driver fails to start.
>
> •[x4linux:~] mmusgrove $ sudo upsdrvctl start
> Network UPS Tools - UPS driver controller 2.6.0
> Network UPS Tools - Generic HID driver 0.35 (2.6.0)
> USB communication driver 0.31
> Using subdriver: CyberPower HID 0.3
> libusb_get_report: No error
> Can't initialize data from HID UPS
> Driver failed to start (exit status=1)
>
> This appears to be the old behavior from 2.4.x prior to 2.4.3.
>
> This was reported for Debian months ago:
>
> http://www.google.com/search?source=ig&hl=en&q=nut+2.6.0-1+libusb_get_report%3A+No+error+Can%27t+initialize+data+from+HID+UPS
>
> Possible related to Bug #701182 (although that is for 2.4.3-2)
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/701182
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: nut 2.6.0-1ubuntu3
> ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
> Uname: Linux 2.6.38-8-generic x86_64
> NonfreeKernelModules: fglrx
> Architecture: amd64
> Date: Sun May 8 09:37:55 2011
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64
> (20101007)
> KernelVersion: Linux x4linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11
> 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> ProcEnviron:
> LANGUAGE=en_US:en
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: nut
> UpgradeStatus: Upgraded to natty on 2011-05-06 (2 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/779512/+subscriptions
>

Arnaud -

I'm not sure how best to reply, so I'll just use this e-mail and put my
syslog inline. This includes the last boot that occurred before the
listi...

Read more...

Revision history for this message
Arnaud Quette (aquette) wrote :

I don't see any message related to usbhid-ups.
Is it started?
we can see hiddev0 (the device linked to the kernel module hiddev) loaded,
but nothing more.

So, try launching again nut, and check back /var/log/syslog for usb and nut
('ups') messages.

Arno

Revision history for this message
Martin Ewing (martin-s-ewing) wrote :
Download full text (9.8 KiB)

On Sat, Dec 17, 2011 at 3:45 AM, Arnaud Quette <email address hidden>wrote:

> I don't see any message related to usbhid-ups.
> Is it started?
> we can see hiddev0 (the device linked to the kernel module hiddev) loaded,
> but nothing more.
>
> So, try launching again nut, and check back /var/log/syslog for usb and nut
> ('ups') messages.
>
> Arno
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/779512
>
> Title:
> nut-2.6.0-1ubuntu3 behavior regression
>
> Status in “nut” package in Ubuntu:
> Triaged
>
> Bug description:
> Binary package hint: nut
>
> Prior to upgrading to Natty, I had the nut-2.4.3-1ubuntu5 package and
> it was working correctly.
>
> After upgrading to Natty, I have the nut-2.6.0-1ubuntu3 package and it
> is not working correctly. Here's my release info:
>
> •[x4linux:~] mmusgrove $ lsb_release -rd
> Description: Ubuntu 11.04
> Release: 11.04
>
> The symptom is that it can't initialize data from HID UPS and so the
> driver fails to start.
>
> •[x4linux:~] mmusgrove $ sudo upsdrvctl start
> Network UPS Tools - UPS driver controller 2.6.0
> Network UPS Tools - Generic HID driver 0.35 (2.6.0)
> USB communication driver 0.31
> Using subdriver: CyberPower HID 0.3
> libusb_get_report: No error
> Can't initialize data from HID UPS
> Driver failed to start (exit status=1)
>
> This appears to be the old behavior from 2.4.x prior to 2.4.3.
>
> This was reported for Debian months ago:
>
> http://www.google.com/search?source=ig&hl=en&q=nut+2.6.0-1+libusb_get_report%3A+No+error+Can%27t+initialize+data+from+HID+UPS
>
> Possible related to Bug #701182 (although that is for 2.4.3-2)
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/701182
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: nut 2.6.0-1ubuntu3
> ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
> Uname: Linux 2.6.38-8-generic x86_64
> NonfreeKernelModules: fglrx
> Architecture: amd64
> Date: Sun May 8 09:37:55 2011
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64
> (20101007)
> KernelVersion: Linux x4linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11
> 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> ProcEnviron:
> LANGUAGE=en_US:en
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: nut
> UpgradeStatus: Upgraded to natty on 2011-05-06 (2 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/779512/+subscriptions
>

This is what I'm seeing after a recent reboot:

Dec 17 20:54:34 gimli kernel: [ 1.962117] ehci_hcd: USB 2.0 'Enhanced'
Host Controller (EHCI) Driver
Dec 17 20:54:34 gimli kernel: [ 1.962182] ehci_hcd 0000:00:1a.7: new USB
bus registered, assigned bus number 1
Dec 17 20:54:34 gimli kernel: [ 1.987718] ehci_hcd 0000:00:1a.7: USB 2.0
started, EHCI 1.00
Dec 17 20:54:34 gimli kernel: [ 1.987842] hub 1-0:1.0: USB hub found
Dec 17 20:54:34 gimli kernel: [ 1.987956] ehci_hcd 0000:00:1d.7: new USB
bus registered, assigned bus number 2
Dec 17 20:54:34 gimli kernel: [ 2.007705] ehci_hcd 0000:00:1d.7: USB 2....

Revision history for this message
Arnaud Quette (aquette) wrote :

Martin,

could you please check this bug report, and apply the udev related procedure I've documented at the end of the thread:
https://bugs.launchpad.net/ubuntu/+source/nut/+bug/578200

Once applied, stop nut, unplug/replug your UPS USB cord, and restart nut (at least the driver), and report back the status.

Arnaud

Changed in nut (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Martin Ewing (martin-s-ewing) wrote :

Hi Arnaud,

I seem to have fixed my NUT problem by upgrading my system to Ubuntu
11.10. (upsd 2.6.1)

I never resolved the issue on 11.04, but your udev rules file probably
would have done it, I would guess!

Thanks for all your help!

Martin

On Tue, Jan 24, 2012 at 10:09 AM, Arnaud Quette <email address hidden>wrote:

> Martin,
>
> could you please check this bug report, and apply the udev related
> procedure I've documented at the end of the thread:
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/578200
>
> Once applied, stop nut, unplug/replug your UPS USB cord, and restart nut
> (at least the driver), and report back the status.
>
> Arnaud
>
> ** Changed in: nut (Ubuntu)
> Status: Triaged => Fix Committed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/779512
>
> Title:
> nut-2.6.0-1ubuntu3 behavior regression
>
> Status in “nut” package in Ubuntu:
> Fix Committed
>
> Bug description:
> Binary package hint: nut
>
> Prior to upgrading to Natty, I had the nut-2.4.3-1ubuntu5 package and
> it was working correctly.
>
> After upgrading to Natty, I have the nut-2.6.0-1ubuntu3 package and it
> is not working correctly. Here's my release info:
>
> •[x4linux:~] mmusgrove $ lsb_release -rd
> Description: Ubuntu 11.04
> Release: 11.04
>
> The symptom is that it can't initialize data from HID UPS and so the
> driver fails to start.
>
> •[x4linux:~] mmusgrove $ sudo upsdrvctl start
> Network UPS Tools - UPS driver controller 2.6.0
> Network UPS Tools - Generic HID driver 0.35 (2.6.0)
> USB communication driver 0.31
> Using subdriver: CyberPower HID 0.3
> libusb_get_report: No error
> Can't initialize data from HID UPS
> Driver failed to start (exit status=1)
>
> This appears to be the old behavior from 2.4.x prior to 2.4.3.
>
> This was reported for Debian months ago:
>
> http://www.google.com/search?source=ig&hl=en&q=nut+2.6.0-1+libusb_get_report%3A+No+error+Can%27t+initialize+data+from+HID+UPS
>
> Possible related to Bug #701182 (although that is for 2.4.3-2)
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/701182
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: nut 2.6.0-1ubuntu3
> ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
> Uname: Linux 2.6.38-8-generic x86_64
> NonfreeKernelModules: fglrx
> Architecture: amd64
> Date: Sun May 8 09:37:55 2011
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64
> (20101007)
> KernelVersion: Linux x4linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11
> 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> ProcEnviron:
> LANGUAGE=en_US:en
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: nut
> UpgradeStatus: Upgraded to natty on 2011-05-06 (2 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/nut/+bug/779512/+subscriptions
>

--
Martin Ewing
Branford, Connecticut
<email address hidden>

Revision history for this message
Arnaud Quette (aquette) wrote :

Hi Martin,

thanks for your confirmation.
I'm now closing this bug.

Arnaud

Changed in nut (Ubuntu):
assignee: nobody → Arnaud Quette (aquette)
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.