Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1808 - NUT package works on Raspberry Pi B+ but not on ar71xx (TP-Link AC1750 Archer C7 v4) #7291

Closed
openwrt-bot opened this issue Aug 24, 2018 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

malakingpusa:

Device problem occurs on TP-Link AC1750 Archer C7 v4
OpenWrt 18.06.0 release, packages, etc.

I have seen that NUT package runs without issues on Raspberry Pi + board. However, when I tried to install NUT from OpenWrt 18.06.0, I noticed that I cannot perform a forced shutdown command which is very critical for my application.

When I try to execute forced shutdown command (upsdrvctl shutdown), I get the following error:

root@TPLINKAC1750:~# upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Can't claim USB device [0764:0501]: No such file or directory
Driver failed to start (exit status=1)

Also, when I try to read the USB descriptors using lsusb, it says "UNAVAILABLE".
Report Descriptors:
*** UNAVAILABLE ***

There seems to be a hotplug issue on the USB. If I unplug/re-plug the USB, the USB descriptors are complete when queried and the forced shutdown command succeeds.

root@TPLINKAC1750:~# upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Using subdriver: CyberPower HID 0.4
Initiating UPS shutdown

@openwrt-bot
Copy link
Author

cshoredaniel:

To add some pointers to the discussion. This started in forum discussion:

https://forum.openwrt.org/t/network-ups-tools-nut-on-tplink-archer-c7-v4-using-lede-18-06-0/18610

with a couple more notes in openwrt/packages issue: openwrt/packages#6843

I did some banging away on the problem and noticed a couple of other things:

On both ar71xx/ath79 from last week's/early this week's masters on the CR5000 ar9342 device I tested I couldn't even get as far the OP unless I used a unpowered hub. Without the hub I was getting something like (sorry don't have the logs right now): 'usb: kernel debounce failed'.

With hub I was getting the behavior reported on the forum and packages feed ticket for ar71xx/ath79.

With brcm2708 (Raspberry Pi B+) I have no such issues, although it has results in some minor fixes for the NUT packaging in the packages feed which most folks probably wouldn't even notice (only affects not running nut-server as root).

On the plus side I will, once RL gets out of my way, be pushing a proper procd/hotplug package to the packages as a result of investigating possible NUT issues and eliminating suspects (like hotplug timing issues).

@openwrt-bot
Copy link
Author

cshoredaniel:

On further investigation the descriptor issue is not a driver issue - it only occurs when the NUT driver is active. Also /lib/nut/usbhid-ups -a upsname -k does shutdown the UPS if the driver is not already running. So it looks like the real issue has to do with NUT playing well with PROCD (that is signals not being handled as usual by nut because of something or procd, or some similar issue). Hence this issue can be closed and further details will be on: openwrt/packages#6843 unless the issue turns out to be unresolvable without procd changes, in which case a procd ticket will be opened.

@openwrt-bot
Copy link
Author

cshoredaniel:

This ought to be fixed in master, and I was finally able to get the backport to 18.06 done, and it's available in the packages feed for 18.06.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant