Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 09/19/14 08:33, Stuart Henderson wrote: On 2014/09/19 14:26, Stuart Henderson wrote: On 2014/09/19 08:21, Stan Gammons wrote: On Sep 19, 2014 8:06 AM, Stuart Henderson st...@openbsd.org wrote: On 2014/09/19 07:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? There have been no code changes to the libusb1 port since OpenBSD 5.4. Also no changes to libusb-compat since 5.5. Ok. I guess going back to 5.5 is about the only solution. Or try upd and sensord to see if that might work. Not sure that will work though. How does your dmesg look with upd disabled? Ah - you already sent the dmesg for that.. To get NUT to work properly I think you will need to add this and build a new kernel. This knocks it out from attaching as a HID device (as needed for upd) - attaching as a HID device means that libusb has less control over it. A better solution would be to allow the device to attach to upd, and write a NUT driver that queries the hw.sensors sysctls rather than having NUT talk USB to the device. Index: usb_quirks.c === RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.73 diff -u -p -r1.73 usb_quirks.c --- usb_quirks.c20 Mar 2014 15:07:11 - 1.73 +++ usb_quirks.c19 Sep 2014 13:29:43 - @@ -109,6 +109,8 @@ const struct usbd_quirk_entry { { USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY920, ANY, { UQ_BROKEN_BIDIR }}, { USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY800, ANY, { UQ_BROKEN_BIDIR }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, ANY, { UQ_BAD_HID }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE,ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3G, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3GS,ANY,{ UQ_BAD_HID }}, Has the above patch been added to the current tree? Just wondering if this will be in the upcoming 5.6 release. NUT does work like it did in OpenBSD 5.5 with this patch. Stan
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 2014/09/20 10:13, Stan Gammons wrote: Has the above patch been added to the current tree? Just wondering if this will be in the upcoming 5.6 release. No, and I don't think it should be because these devices work with upd(4).
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 09/20/14 15:12, Stuart Henderson wrote: On 2014/09/20 10:13, Stan Gammons wrote: Has the above patch been added to the current tree? Just wondering if this will be in the upcoming 5.6 release. No, and I don't think it should be because these devices work with upd(4). Oh. How so? With upd and sensord? Stan
Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? Stan
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 2014/09/19 07:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? There have been no code changes to the libusb1 port since OpenBSD 5.4. Also no changes to libusb-compat since 5.5.
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On Sep 19, 2014 8:06 AM, Stuart Henderson st...@openbsd.org wrote: On 2014/09/19 07:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? There have been no code changes to the libusb1 port since OpenBSD 5.4. Also no changes to libusb-compat since 5.5. Ok. I guess going back to 5.5 is about the only solution. Or try upd and sensord to see if that might work. Not sure that will work though. Thanks. Stan
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 2014/09/19 08:21, Stan Gammons wrote: On Sep 19, 2014 8:06 AM, Stuart Henderson st...@openbsd.org wrote: On 2014/09/19 07:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? There have been no code changes to the libusb1 port since OpenBSD 5.4. Also no changes to libusb-compat since 5.5. Ok. I guess going back to 5.5 is about the only solution. Or try upd and sensord to see if that might work. Not sure that will work though. How does your dmesg look with upd disabled?
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 2014/09/19 14:26, Stuart Henderson wrote: On 2014/09/19 08:21, Stan Gammons wrote: On Sep 19, 2014 8:06 AM, Stuart Henderson st...@openbsd.org wrote: On 2014/09/19 07:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? There have been no code changes to the libusb1 port since OpenBSD 5.4. Also no changes to libusb-compat since 5.5. Ok. I guess going back to 5.5 is about the only solution. Or try upd and sensord to see if that might work. Not sure that will work though. How does your dmesg look with upd disabled? Ah - you already sent the dmesg for that.. To get NUT to work properly I think you will need to add this and build a new kernel. This knocks it out from attaching as a HID device (as needed for upd) - attaching as a HID device means that libusb has less control over it. A better solution would be to allow the device to attach to upd, and write a NUT driver that queries the hw.sensors sysctls rather than having NUT talk USB to the device. Index: usb_quirks.c === RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.73 diff -u -p -r1.73 usb_quirks.c --- usb_quirks.c20 Mar 2014 15:07:11 - 1.73 +++ usb_quirks.c19 Sep 2014 13:29:43 - @@ -109,6 +109,8 @@ const struct usbd_quirk_entry { { USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY920, ANY, { UQ_BROKEN_BIDIR }}, { USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY800, ANY, { UQ_BROKEN_BIDIR }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS,ANY,{ UQ_BAD_HID }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3G, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3GS, ANY,{ UQ_BAD_HID }},
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On Fri, September 19, 2014 16:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? Stan Hi. Do you have upd0 device and sensors.upd in sysctl hw output? If they are present, you can try to disable upd and uhidev from ukc and test nut. Note that yours USB keyboard wouldn't work with uhidev disabled.
Re: Nut 2.7.2p2 with APC USB UPS on OpenBSD 5.6 current woes
On 09/19/14 08:33, Stuart Henderson wrote: On 2014/09/19 14:26, Stuart Henderson wrote: On 2014/09/19 08:21, Stan Gammons wrote: On Sep 19, 2014 8:06 AM, Stuart Henderson st...@openbsd.org wrote: On 2014/09/19 07:37, Stan Gammons wrote: I have an apc usb ups that was working with OpenBSD 5.5 stable, but when I installed 5.6 current nut no longer recognizes the status change when the UPS goes on battery. When you do upsc apcusb@localhost with AC power removed from the unit, it indicates the UPS is still online rather than being on battery. After some debugging help from the folks on the nut list, the only thing I see is a libusb error that says libusb_get_interrupt: Function not implemented Any ideas what might have changed in libusb1 to cause this to no longer work? There have been no code changes to the libusb1 port since OpenBSD 5.4. Also no changes to libusb-compat since 5.5. Ok. I guess going back to 5.5 is about the only solution. Or try upd and sensord to see if that might work. Not sure that will work though. How does your dmesg look with upd disabled? Ah - you already sent the dmesg for that.. To get NUT to work properly I think you will need to add this and build a new kernel. This knocks it out from attaching as a HID device (as needed for upd) - attaching as a HID device means that libusb has less control over it. A better solution would be to allow the device to attach to upd, and write a NUT driver that queries the hw.sensors sysctls rather than having NUT talk USB to the device. Index: usb_quirks.c === RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.73 diff -u -p -r1.73 usb_quirks.c --- usb_quirks.c20 Mar 2014 15:07:11 - 1.73 +++ usb_quirks.c19 Sep 2014 13:29:43 - @@ -109,6 +109,8 @@ const struct usbd_quirk_entry { { USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY920, ANY, { UQ_BROKEN_BIDIR }}, { USB_VENDOR_NEC, USB_PRODUCT_NEC_PICTY800, ANY, { UQ_BROKEN_BIDIR }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, ANY, { UQ_BAD_HID }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE,ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3G, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3GS,ANY,{ UQ_BAD_HID }}, I manually edited usb_quirks.c and added the lines above. upd disabled at boot and that seems to have fixed the problem. I see the status change now. Sep 19 16:02:39 game upsmon[17770]: UPS apcusb@localhost on battery Sep 19 16:03:04 game upsmon[17770]: UPS apcusb@localhost on line power Thanks! Stan