Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NUT refuses to find or use a supported UPS unless you are root

    UPS Tools
    4
    6
    1.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      alekslyse
      last edited by

      Pfsense Plus: 23.05.1-RELEASE

      I have seen this issue many times before on different forum, and it seems to boil down to some right issues on freebsd, but from what I know that should have been patched by now. I have a https://networkupstools.org/ddl/PowerWalker/Line-Interactive_VI_2000_LCD.html - exactly that model, and when plugged into unraid it was found by NUT right away with no issues, but in pfsense its a different story.

      If I start at the basic and uninstall and reinstall NUT, reboot then I add as the documentation say to use the blazer_usb, as I also unsed in unraid, then the error is the following:

      starting NUT
      Network UPS Tools upsmon 2.8.0
      kill: No such process
      UPS: PowerWalker (primary) (power value 1)
      Using power down flag file /etc/killpower
      Network UPS Tools - UPS driver controller 2.8.0
      Network UPS Tools - Megatec/Q1 protocol USB driver 0.14 (2.8.0)
      
      Broadcast Message from admin@router.home.arpa
              (no tty) at 19:42 CEST...
      
      Communications with UPS PowerWalker lost
      
      Can't claim USB device [06da:0005]@0/0: Other error
      Driver failed to start (exit status=1)
      Network UPS Tools upsd 2.8.0
      kill: No such process
      listening on ::1 port 3493
      listening on 127.0.0.1 port 3493
      Can't connect to UPS [PowerWalker] (blazer_usb-PowerWalker): No such file or directory
      

      As you see it finds it, 06da:0005 is absolutely correct.

      Nothing else is holding on a NUT session except pfsense and its backend

      [23.05.1-RELEASE][admin@router.home.arpa]/root: pkg info | grep -E 'nut|apcupsd'
      nut-2.8.0_22                   Network UPS Tools
      pfSense-pkg-nut-2.8.0_2        Network UPS Tools
      

      If I use upsdrvctl start

      Network UPS Tools - UPS driver controller 2.8.0
      Network UPS Tools - Megatec/Q1 protocol USB driver 0.14 (2.8.0)
      Can't claim USB device [06da:0005]@0/0: Other error
      Driver failed to start (exit status=1)
      

      If I use upsdrvctl -u root start (using the root user)

      Network UPS Tools - UPS driver controller 2.8.0
      Network UPS Tools - Megatec/Q1 protocol USB driver 0.14 (2.8.0)
      Please note that this driver is deprecated and will not receive
      new development. If it works for managing your devices - fine,
      but if you are running it to try setting up a new device, please
      consider the newer nutdrv_qx instead, which should handle all 'Qx'
      protocol variants for NUT. (Please also report if your device works
      with this driver, but nutdrv_qx would not actually support it with
      any subdriver!)
      
      Supported UPS detected with megatec protocol
      Vendor information unavailable
      No values provided for battery high/low voltages in ups.conf
      
      Using 'guestimation' (low: 41.600000, high: 52.000000)!
      Battery runtime will not be calculated (runtimecal not set)
      
      Broadcast Message from admin@router.home.arpa
              (no tty) at 19:46 CEST...
      
      Communications with UPS PowerWalker established
      

      But this is obviously not a solution.

      I found someone on opnsense found adding this to /boot/loader.conf.local

      hw.usb.quirk.0 = "0x06da 0x0005 0 0xffff UQ_HID_IGNORE"
      

      Reboot, and the UPS works right away.

      Its alright enough adding that quirk, but if I reinstall one time I will never remember to backup that one. Its one of two things that need to happen

      1. Someone need to figure out why NUT doesnt have enough permission (the user and group nut is set on the USB drive)
      2. A way to put the quirk into the UI or config file so it can populate at a reinstall.

      Any thoughts?

      provelsP GertjanG dennypageD 3 Replies Last reply Reply Quote 1
      • provelsP
        provels @alekslyse
        last edited by

        @alekslyse
        You mean this?
        960c2761-6af9-42f9-915e-5531928b985f-image.png

        Peder

        MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
        BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

        1 Reply Last reply Reply Quote 1
        • GertjanG
          Gertjan @alekslyse
          last edited by

          @alekslyse said in NUT refuses to find or use a supported UPS unless you are root:

          blazer_usb

          You've selected nutdrv_gx ?

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          A 1 Reply Last reply Reply Quote 0
          • A
            alekslyse @Gertjan
            last edited by

            user=root did work to make it run, but its still pushing out errors about no permission many times before it loads. At least it does load though.

            I moved over to nutdrv_gx since the documentation said I should, and with the root thing it does load up.

            But forcing things to run as root is not a solution, is it?

            GertjanG 1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan @alekslyse
              last edited by

              @alekslyse said in NUT refuses to find or use a supported UPS unless you are root:

              But forcing things to run as root is not a solution, is it?

              See https://networkupstools.org/docs/FAQ.html#_my_ups_driver_program_won_8217_t_work_i_8217_m_starting_it_as_root_and_root_owns_the_device_so_what_8217_s_the_problem

              For a driver to open a hardware port, some one at some moment need root - or whatever user the hardware ID is set to. By default, that's root.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • dennypageD
                dennypage @alekslyse
                last edited by

                @alekslyse Search for "For those of you affected by the APC issue" either in the forum or in Google.

                This should be fixed in the next kernel upgrade.

                1 Reply Last reply Reply Quote 0
                • stephenw10S stephenw10 moved this topic from pfSense Packages on
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.