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

NUT fails to start reporting insufficient permissions on libusb #322

Open
halcyonz80 opened this issue Aug 15, 2023 · 59 comments
Open

NUT fails to start reporting insufficient permissions on libusb #322

halcyonz80 opened this issue Aug 15, 2023 · 59 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@halcyonz80
Copy link

Problem/Motivation

NUT fails to start on RiPi using standard HA image due to USB permissions

Expected behavior

NUT can scan the USB bus to find the UPS

Actual behavior

libusb1: Could not open any HID devices: insufficient permissions on everything

Steps to reproduce

Install the NUT addon to 10.4 and try to start it using basic config

@halcyonz80
Copy link
Author

23:04:57] INFO: Connected USB devices:
Bus 001 Device 005: ID 0c45:7000 Microdia iPazzPort
Bus 001 Device 006: ID ffff:0000 APC by S.E. SMV750CAI
Bus 001 Device 004: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[23:04:58] INFO: Generating /etc/nut/upsd.users...
[23:05:00] INFO: Configuring user: ups_user
[23:05:03] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[23:05:10] INFO: Configuring Device named myups...
[23:05:11] INFO: Starting the UPS drivers...
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Network UPS Tools - UPS driver controller 2.8.0
Driver failed to start (exit status=1)
cont-init: info: /etc/cont-init.d/nut.sh exited 1

@Xitee1
Copy link

Xitee1 commented Aug 18, 2023

I'm having the same problem

@Xitee1
Copy link

Xitee1 commented Aug 18, 2023

I finally got it working. I needed to do a full power reset (shutting everything down & pull the power plug of HA, the UPS and the USB cable to the UPS & plugging everything back in). After everything has started again, the addon works without issues.

@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Sep 18, 2023
@o-l-o
Copy link

o-l-o commented Sep 20, 2023

I have exactly the same issue. In my case, the full restart described above didn't help. Here are logs from my system:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.12.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.5  (armv7 / raspberrypi3)
 Home Assistant Core: 2023.9.2
 Home Assistant Supervisor: 2023.09.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[17:04:24] INFO: Configuring timezone (Europe/Warsaw)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[17:04:27] INFO: Setting mode to netserver...
[17:04:27] INFO: Connected USB devices:
Bus 001 Device 004: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp. JM20329 SATA Bridge
Bus 001 Device 005: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC) 
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[17:04:28] INFO: Generating /etc/nut/upsd.users...
[17:04:29] INFO: Configuring user: nutty
[17:04:30] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[17:04:33] INFO: Configuring Device named ever_eco...
[17:04:33] INFO: Starting the UPS drivers...
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@thewan056
Copy link

The same is now happening here. Before this I had no issues running this addon with my UPS. But then that UPS is now dead, so I went and bought a new UPS and now this addon doesn't work with the same above issue and logs.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Sep 21, 2023
@francescopeloi
Copy link

I am experiencing the same issue reported above, tried a full reboot that didn't help.

@simposiummm
Copy link

Also here I am experiencing the same issue reported above, tried a full reboot that didn't help.

@marcinwhite
Copy link

marcinwhite commented Oct 9, 2023

Same problem here. Latest version, rechecked after full reboot too.

Not sufficient permision for libusb1.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.12.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.5  (amd64 / qemux86-64)
 Home Assistant Core: 2023.10.1
 Home Assistant Supervisor: 2023.10.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[18:50:31] INFO: Configuring timezone (Europe/London)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[18:50:32] INFO: Setting mode to netserver...
[18:50:32] INFO: Generating /etc/nut/upsd.users...
[18:50:32] INFO: Configuring user: admin
[18:50:33] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[18:50:33] INFO: Configuring Device named myups...
[18:50:33] INFO: Starting the UPS drivers...
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43

libusb1: Could not open any HID devices: insufficient permissions on everything

No matching HID UPS found
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@micksam7
Copy link

I've managed to work around this error by specifying a vendorid and productid in the "config" directive using data from lsusb:

Unplug UPS USB, run lsusb, plug UPS back in and find the new id:

[core-ssh ~]$ lsusb
Bus 002 Device 003: ID 051d:0002

Add to config:

- name: APCUPS
  driver: usbhid-ups
  port: auto
  config:
    - vendorid = 051d
    - productid = 0002

Your mileage may vary, though.

@Man-in-Black
Copy link

I also have the same problem and would be happy to see an solution.
I tried the possible fixes above, but with no luck at all.

@aebgit
Copy link

aebgit commented Nov 11, 2023

Is there any progress on this issue? This AddOn is basically useless since >2 months now.
(Homeassistant Yellow)

@ge8020
Copy link

ge8020 commented Nov 25, 2023

Same here. Addon will not start anymore due to:
libusb1: Could not open any HID devices: insufficient permissions on everything

OS 11.1 - Core 2023.11.3 on a Raspberry pi 4 GB

@aquette
Copy link

aquette commented Dec 4, 2023

hey there,
I'm the NUT upstream and author of this usbhid-ups driver, freshly landed into the Home Assistant world 😄

Could you please all report the output from the addon list_usb_devices config option. I'd like to be sure of my hypothesis :)
For those who can: lsusb output from another Linux system if possible (when running HA on a raspberry).

As preliminary side notes:

  • @halcyon: your model IDs (ffff:0000) are definitely invalid and too generic ones, found on cheap units. NUT can't list these in its rules, but @micksam7 solution applies ;) just remember to adapt the values...
  • @micksam7 still, your device IDs are already known by NUT and shouldn't need this fix (setting). Have you tried without?

@Xitee1
Copy link

Xitee1 commented Dec 4, 2023

Hi @aquette
here's my lsusb output from the addon:

Bus 002 Device 002: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp. JMS561U two ports SATA 6Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0463:ffff MGE UPS Systems UPS
Bus 001 Device 003: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And that's the output of lsusb executed on HA:
chrome_XCnMIPx6lM

Note that my UPS still connects and survived all restarts after the power reset I did.

@aquette
Copy link

aquette commented Dec 4, 2023

@Xitee1 I have the exact same (I work at Eaton 😄) and config (2h ago) went like a charm. Just driver+port...
Just to be sure: have you set config/vendorid and productid?

It's true that I've not rebooted the RPI since deployed... Let me check
Update: the raspberry reboot killed my first install 😅 containerd loops on nut failure, then reboot the pi... Probably a collision with HAOS update... Needs more investigation and sdcard edits...

@voltlog
Copy link

voltlog commented Dec 10, 2023

I was trying to connect to my Serioux LD600LI UPS which shows up on lsusb as:
Bus 001 Device 005: ID 0001:0000
and discovered by the HA NUT Addon at startup with list_usb_devices option enabled as:
Bus 001 Device 005: ID 0001:0000 Fry's Electronics MEC0003
I was using this config:

- name: Serioux_LD600LI
  driver: usbhid-ups
  port: auto
  config:
    - vendorid = 0001
    - productid = 0000
    - desc = "Serioux LD600LI UPS"

I was getting the same error:

USB communication driver (libusb 1.0) 0.43
libusb1: Could not open any HID devices: insufficient permissions on everything

My guess is that because this is a cheap UPS, it doesn't feature a proper USB HID implementation and so the driver usbhid-ups is not the right option. So after going down the rabbit hole, I figured out this type of ups should connect with a megatec-usb driver which has been deprecated and replaced by blazer_usb driver which again was deprecated and replaced with nutdrv_qx driver. So after switching my config to this, everything works.

- name: Serioux_LD600LI
  driver: nutdrv_qx
  port: auto
  config:
    - vendorid = 0001
    - productid = 0000
    - desc = "Serioux LD600LI UPS"

image

@aquette
Copy link

aquette commented Dec 11, 2023

@voltlog thanks for your feedback,
you guessed well, such cheap units (generally with vendorid == "0000" or "0001" or any unofficial value) generally don't implement UBS/HID, but Qx protocols (Q1 and Q5).
Qx was historically supported by blazer_* drivers (and many others before), but nutdrv_qx should be taking over and finalize unification.
If possible, I would be interested in the result of #335 (result of "nut-scanner -U").
Depending on the results here, I'll be thinking how to improve that part too.

@voltlog
Copy link

voltlog commented Dec 11, 2023

@aquette I'm just running the latest addon version in HomeAssistant, I don't know how I could run the PR that you proposed and I can't run "nut-scanner -U" inside the container shell that HomeAssistant provides.

@aquette
Copy link

aquette commented Dec 11, 2023

@voltlog the only possibility is to wait for the PR to be merged and addon updated.
Otherwise, that needs you to become a developer ;) (advanced mode, HACS, local addons, ...)

@Xitee1
Copy link

Xitee1 commented Dec 12, 2023

@Xitee1 I have the exact same (I work at Eaton 😄) and config (2h ago) went like a charm. Just driver+port... Just to be sure: have you set config/vendorid and productid?

I also just have driver + port in my config:

driver: usbhid-ups
port: auto

@aquette
Copy link

aquette commented Dec 17, 2023

thanks for the confirmation @Xitee1 :)

to all, if possible, I would encourage you to test the new SmartNUT Add-on that I'm writing ;)
https://github.com/aquette/addon-smartnut/blob/main/smartnut/DOCS.md

I'm interested in feedback, especially with the kind of device like @voltlog

@voltlog
Copy link

voltlog commented Dec 25, 2023

@aquette I installed the SmartNUT add-on, everything worked first go with auto detect and default settings, UPS was detected, info started flowing into MQTT. However for the time being I have switched back to using the classic NUT addon because it is more convenient to use in automations with the sensor entities that it creates in HA.

SmartNUT currently only pushes data to MQTT which is a little inconvenient for me because I have to manually create a config and define sensors based on the MQTT topics. Example output from SmartNUT below.

Using protocol: Megatec 0.06
Can't autodetect number of battery packs [-1/13.70]
Battery runtime will not be calculated (runtimecal not set)
Network UPS Tools - UPS driver controller 2.8.0
Published => t: homeassistant/nut/nutdev1/battery.voltage, m: "13.60"
Published => t: homeassistant/nut/nutdev1/device.type, m: "ups"
Published => t: homeassistant/nut/nutdev1/ups.beeper.status, m: "disabled"
Published => t: homeassistant/nut/nutdev1/ups.delay.shutdown, m: "30"
Published => t: homeassistant/nut/nutdev1/ups.delay.start, m: "180"
Published => t: homeassistant/nut/nutdev1/ups.firmware, m: "V3.8"
Published => t: homeassistant/nut/nutdev1/ups.load, m: "11"
Published => t: homeassistant/nut/nutdev1/ups.productid, m: "0000"
Published => t: homeassistant/nut/nutdev1/ups.status, m: "OL"
Published => t: homeassistant/nut/nutdev1/ups.temperature, m: "29.0"
Published => t: homeassistant/nut/nutdev1/ups.type, m: "offline / line interactive"
Published => t: homeassistant/nut/nutdev1/ups.vendorid, m: "0001"
Processing device: nutdev1: no update...
Processing device: nutdev1: no update...
Processing device: nutdev1: got updates...
Published => t: homeassistant/nut/nutdev1/battery.voltage, m: "13.70"
Published => t: homeassistant/nut/nutdev1/ups.load, m: "12"

@aquette
Copy link

aquette commented Dec 25, 2023

Awesome @voltlog , you're my first tester. Thanks a lot! 😄
I would be interested in diffing data, since you need additional params iirc.

Also, SmartNUT is indeed not yet production ready, so stick with the current addon for now.
As for going with sensor and config on mqtt, this is part of the next steps.
Stay tuned...

@kanflo
Copy link

kanflo commented Jan 7, 2024

For those of you struggling with the libusb permission error, have you tried replacing usbhid-ups with nutdrv_qx? Noticing my UPS enumerated as a HID device, I opted for the usbhid driver which was a trip down the rabbit hole. I have a PowerWalker VI 600-300 SCL and it works like a charm with the nutdrv_qx driver.

@brandonjamesmarshall
Copy link

I was having this issue, "insufficient permissions on everything" error, running Home Assistant Yellow. A complete system reboot (not a restart of HASS) resolved it!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Apr 18, 2024
@ghost
Copy link

ghost commented Apr 20, 2024

Well it does look like it is still a problem. This just started happening on mine too....

[16:26:14] INFO: Starting the UPS drivers...
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Going to try a full shutdown and reboot...

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Apr 21, 2024
@nitefly80
Copy link

Having the same issue... It works for some time after a full shutdown then the addon stops.
When I start it again I get this:
libusb1: Could not open any HID devices: insufficient permissions on everything

@epserra
Copy link

epserra commented Apr 21, 2024

Well, for me the problem continues, I think the possible error is in Proxmox, which for some reason that I don't know changes ports and the program does not have enough privileges to access the new USB configuration.
A minute ago I had to perform an IPL (reset) on Proxmox to see the UPS information in home Assistant again

@agaliste
Copy link

agaliste commented May 21, 2024

The exact same error continues for me also, even when trying different drivers. I'm using the Home Assistant OS for the Raspberry Pi 5.

@schariwari
Copy link

schariwari commented May 26, 2024

Same Issue here; Legrand KEOS was running pretty well on a raspberry4, then I switched to an Intel-64-based mini-PC (both running the "HA-OS") and I do not get the stuff running again.
The usbhid-ups is not working nor does the nutdrv_qx . Also various reboot/power-offs did not help...

Any hint would be very appreciated

@pspot2
Copy link

pspot2 commented Jun 23, 2024

I was trying to connect to my Serioux LD600LI UPS which shows up on lsusb as: Bus 001 Device 005: ID 0001:0000 and discovered by the HA NUT Addon at startup with list_usb_devices option enabled as: Bus 001 Device 005: ID 0001:0000 Fry's Electronics MEC0003 I was using this config:

- name: Serioux_LD600LI
  driver: usbhid-ups
  port: auto
  config:
    - vendorid = 0001
    - productid = 0000
    - desc = "Serioux LD600LI UPS"

I was getting the same error:

USB communication driver (libusb 1.0) 0.43
libusb1: Could not open any HID devices: insufficient permissions on everything

My guess is that because this is a cheap UPS, it doesn't feature a proper USB HID implementation and so the driver usbhid-ups is not the right option. So after going down the rabbit hole, I figured out this type of ups should connect with a megatec-usb driver which has been deprecated and replaced by blazer_usb driver which again was deprecated and replaced with nutdrv_qx driver. So after switching my config to this, everything works.

- name: Serioux_LD600LI
  driver: nutdrv_qx
  port: auto
  config:
    - vendorid = 0001
    - productid = 0000
    - desc = "Serioux LD600LI UPS"

Thanks for this hint. I was running into the same error message. By changing the driver to nutdrv_qx I was able to get my PowerWalker VI 800 CSW to work. Request for a HCL entry: click

@doff-1
Copy link

doff-1 commented Jun 28, 2024

@pspot2
Thanks, I've tried your setup now, both with my vendor and product id:

  • name: geups
    driver: nutdrv_qx
    port: auto
    config:
    • vendorid = 067b
    • productid = 2303
    • desc = "GE VH series 700VA UPS"

I still get the same error message, so I tried again with your 0001:0000 but I always get the same "libusb1: Could not open any HID devices: insufficient permissions on everything"

I find it peculiar how the plugin works for some people, while other get permission errors.

@Maxklos
Copy link

Maxklos commented Jul 9, 2024

Problem still persist with version v0.13.1

Copy link

github-actions bot commented Aug 9, 2024

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 9, 2024
@schariwari
Copy link

still no function :-(

@epserra
Copy link

epserra commented Aug 9, 2024

Well, NUT has continued to fail with the same lack of privilege symptom, I have just finished installing the latest Proxmox update. Let's see how it behaves in a few days.
I also tried the following values ​​in the configuration:
config:
vendorid = 06da
productid = ffff
without result

@aquette
Copy link

aquette commented Aug 9, 2024

I'm definitely interested in the result of your test!
I still suspect an hypervisor / kernel / udev issue... But can't see the light and where the issue us, to fix it, without a a setup underhand

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Aug 10, 2024
@trudheim
Copy link

Hi,

I run Nut on plain Debian 12.6 and I have a Powerwalker UPS that the server is plugged into. I get these permission issues in logwatch output frequently. After reading this issue, I started digging a bit. 'lsusb' did not show the UPS. Unplugging the usb cable and re-plugging it and then running 'lsusb' shows the device and Nut picks up that data is no longer stale.

It leads me to think that this may be relating to some kind of power-management, where something is determined to be idle and put to sleep, and then it does not recover from that.

To test the theory:
cat /sys/module/usbcore/parameters/autosuspend

For me, it was set to '2'. To disable it:
echo -1 > /sys/module/usbcore/parameters/autosuspend

I have now added the 'echo -1' part to my /etc/rc.local and I will monitor this thing with UPS device disappearing. If in a week the UPS still have not disconnected, I will consider USB AutoSuspend the culprit.

/Sirius

@aquette
Copy link

aquette commented Aug 21, 2024

What are the USB vendor and product id?

@trudheim
Copy link

root@debian:~# lsusb
Bus 001 Device 010: ID 06da:ffff Phoenixtec Power Co., Ltd Offline UPS

So far so good, still connected and no errors in the logs.

@trudheim
Copy link

Well, it wasn't that. USB device for the UPS has disappeared, though it took four days for it to happen. I will look at other USB kernel stack settings to see if there is something else I can tweak to resolve this.

@fab512
Copy link

fab512 commented Aug 29, 2024

I was trying to connect to my Serioux LD600LI UPS which shows up on lsusb as: Bus 001 Device 005: ID 0001:0000 and discovered by the HA NUT Addon at startup with list_usb_devices option enabled as: Bus 001 Device 005: ID 0001:0000 Fry's Electronics MEC0003 I was using this config:

- name: Serioux_LD600LI
  driver: usbhid-ups
  port: auto
  config:
    - vendorid = 0001
    - productid = 0000
    - desc = "Serioux LD600LI UPS"

I was getting the same error:

USB communication driver (libusb 1.0) 0.43
libusb1: Could not open any HID devices: insufficient permissions on everything

My guess is that because this is a cheap UPS, it doesn't feature a proper USB HID implementation and so the driver usbhid-ups is not the right option. So after going down the rabbit hole, I figured out this type of ups should connect with a megatec-usb driver which has been deprecated and replaced by blazer_usb driver which again was deprecated and replaced with nutdrv_qx driver. So after switching my config to this, everything works.

- name: Serioux_LD600LI
  driver: nutdrv_qx
  port: auto
  config:
    - vendorid = 0001
    - productid = 0000
    - desc = "Serioux LD600LI UPS"

image

This worked for me !

@epserra
Copy link

epserra commented Aug 30, 2024

Well after seeing a suggestion regarding autosuspend, and the information in the url: https://community.home-assistant.io/t/how-to-disable-usb-autosuspend/392320/14
I have included the following in the 90-nut-ups.rules file (nano /etc/udev/rules.d/90-nut-ups.rules):
TEST==”power/control”, ATTR={power/control}=”on”
and it is now like this:

Rule for a Salicru UPS

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="0660", GROUP="nut", TEST==”power/control”, ATTR={power/control}=”on”
Several days have passed and the connection to the SALICRU UPS continues to work.

@epserra
Copy link

epserra commented Sep 16, 2024

I have also applied the information to have the autosupend value = -1, but after several days the error returns, for the moment the only solution is reboot proxmox.

Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Oct 17, 2024
@pkozlowski1
Copy link

same issue:
[10:33:05] INFO: Configuring Device named BE850G2-GR...
[10:33:05] INFO: Starting the UPS drivers...
libusb1: Could not open any HID devices: insufficient permissions on everything

@epserra
Copy link

epserra commented Oct 21, 2024

Apologies for the delay, I am changing the structure of my installation and I cannot dedicate time to this situation. I have changed the old mini PC for a Chuwi with 12GB of RAM and 500GB of disk and although NUT has gone down it has taken a few days to give the error. I hope to be able to continue with the issue in a few days.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Oct 22, 2024
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests