Can't connect UPS to USB3 port on SuperMicro A1SAi-2750F

Status
Not open for further replies.

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
Hi all,

I'm trying to set up an EATON 5SC UPS with my FreeNAS system (see sig). The A1SAi-2750F only has two USB2.0 ports which are occupied by mirrored boot drives, so I need to connect the UPS to one of the rear USB3.0 ports. Here are my current BIOS settings:

Code:
Legacy USB Support                  Enabled
USB3.0 Support                      Disabled
XHCI Hand-off                       Disabled
EHCI Hand-off                       Enabled
USB Mass Storage Driver Support     Enabled
Port 60/40 Emulation                Enabled


I don't know which port to select in the UPS config in the FreeNAS GUI. When I connect the UPS to a USB3 port, nothing shows up in /var/log/messages. I tried a few other USB devices (USB3.0 flash drive, USB2.0 flash drive, USB2.0 mouse) but there were still no messages.

I've also tried configuring the UPS service in the FreeNAS GUI and starting the service. I selected the usbhid-ups driver and then went through each of the available ports, starting the service each time, but it doesn't start and I get the following console messages:

Code:
Jul 27 23:08:54 xxxxxxxx notifier: Network UPS Tools - Generic HID driver 0.38 (2.7.2)
Jul 27 23:08:54 xxxxxxxx notifier: USB communication driver 0.32
Jul 27 23:08:54 xxxxxxxx notifier: No matching HID UPS found
Jul 27 23:08:54 xxxxxxxx notifier: Driver failed to start (exit status=1)
Jul 27 23:08:54 xxxxxxxx notifier: Network UPS Tools - UPS driver controller 2.7.2
Jul 27 23:08:54 xxxxxxxx root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Jul 27 23:08:54 xxxxxxxx notifier: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Jul 27 23:08:54 xxxxxxxx notifier: Starting nut_upsmon.
Jul 27 23:08:54 xxxxxxxx notifier: kill: No such process
Jul 27 23:08:54 xxxxxxxx notifier: UPS: ups (master) (power value 1)
Jul 27 23:08:54 xxxxxxxx notifier: Using power down flag file /etc/nokillpower
Jul 27 23:08:54 xxxxxxxx upsmon[29945]: UPS [ups]: connect failed: Connection failure: Connection refused
Jul 27 23:08:54 xxxxxxxx upsmon[29945]: Communications with UPS ups lost
                                                                               
Broadcast Message from root@xxxxxxxx.xxxx                                  
        (no tty) at 23:08 CEST...                                              
                                                                               
Communications with UPS ups lost                                              
                                                                               
Jul 27 23:08:55 xxxxxxxx notifier: Starting nut_upslog.
Jul 27 23:08:55 xxxxxxxx notifier: Warning: initial connect failed: Connection failure: Connection refused
Jul 27 23:08:56 xxxxxxxx notifier: Stopping nut_upslog.
Jul 27 23:08:56 xxxxxxxx notifier: Waiting for PIDS: 29965.
Jul 27 23:08:56 xxxxxxxx notifier: Stopping nut_upsmon.
Jul 27 23:09:17 xxxxxxxx afpd[26012]: AFP logout by sbp
Jul 27 23:09:17 xxxxxxxx afpd[26012]: AFP statistics: 373541.51 KB read, 130120.76 KB written
Jul 27 23:09:17 xxxxxxxx afpd[26012]: done
Jul 27 23:09:20 xxxxxxxx upsmon[29944]: upsmon parent: read
Jul 27 23:09:20 xxxxxxxx notifier: Waiting for PIDS: 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945, 29945.
Jul 27 23:09:21 xxxxxxxx notifier: nut not running? (check /var/db/nut/upsd.pid).


I have tried changing XHCI Hand-off to Enabled in the BIOS. With these settings I can boot but the outcome is the same as described. I can't boot if I change USB3.0 Support to Enabled.

Not sure what to try next so I would appreciate any suggestions.

Thanks for reading!

Tom
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
Freenas doesnt turn on USB 3 support out of the box you have to add a tunable for xhci_load

its
Variable:
xhci_load
Value:
YES
type:
Loader

im not sure how stable the usb 3 support is so im not sure i would trust my UPS to run via that incase the driver bugs out and you suddenly dont get told the power has died but its your equipment.
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
Thanks for the reply.

I was expecting (hoping?) that the USB3 ports would run as USB2 ports with my current BIOS settings, but it seems disabling USB3.0 Support turns off the ports completely...

So given that I only have two USB2.0 ports I guess I have to choose between an un-mirrored boot drive and running my UPS on USB3.0? Hmm.
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
well the third options is to get a SATA dom and use it as the boot device in the designated port for it

look im just parroting what i have heard about usb 3 support not being stable that might have changed since last i looked at it. But i trust you to do that research yourself
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
No free SATA ports :D

Hmm, it would be much nicer if I could get these damn USB3 ports into USB2 mode, but what if I put one of the boot mirrors on USB3 and the other on USB2 (they are USB2 drives anyway), then the UPS on the spare USB2? Don't even know if it's possible to mirror a USB2 drive and a USB3 drive, but that way if the USB3 driver craps out I would still have the USB2 boot drive...?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
Turn on USB 3.0 in BIOS. That usually works, as the ports will be used as USB 2.0 by FreeNAS.
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
@anodos Because I'm an idiot I guess. I didn't even think of that. I'll try it and report how it goes. Thanks.

@Ericloewe I haven't found a combination of the other BIOS settings that allows me to boot with USB3.0 enabled...
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
Please do!
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
@hugovsky thanks for checking.

@anodos using the serial port seems to work fine. Thanks for the suggestion. I chose the mge-shut driver and port /dev/cuau0. With the other settings at default I pulled the mains to the UPS and after 30 seconds it initiated a graceful shutdown of FreeNAS. Cool!

Now I have to set it up properly...

I only waited 2 or 3 minutes after shutdown but the UPS never cut the load to the NAS (I could see a LED on the A1SAi-2750F flashing inside the case), so when I plugged the UPS back in to mains of course nothing happened (as far as the A1SAi-2750F is concerned it never lost mains power). If anyone knows how to get an Eaton UPS to cut the load after the NAS shuts down and/or reset the load when mains power is restored so the A1SAi-2750F can reboot, I would be grateful for some more tips! In the meantime I'm off to read the NUT man pages :D
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
Just posting my findings in case they're useful for someone else / future me.

Running mge-shut on port /dev/cuau0 with the settings in the screen shot at the end of the post, I get almost the behaviour I'm expecting. NUT tells FreeNAS to shut down when the UPS reaches low battery then after 5 minutes the UPS shuts down too. When the power is restored the UPS switches back on and FreeNAS starts (BIOS setting: Restore on AC Power Loss -> Power-On). As described in the NUT FAQ and mge-shut driver page, the 'ondelay' parameter is to deal with power race situations where the power is restored during shutdowns, but I haven't had time to test that yet.

Here's the output of upsc

Code:
battery.capacity: 9.00
battery.charge: 74
battery.charge.low: 30
battery.charge.restart: 50
battery.energysave: no
battery.protection: yes
battery.runtime: 2315
battery.type: PbAc
device.mfr: EATON
device.model: Eaton 5SC 500
device.serial: xxxxxxxxx
device.type: ups
driver.name: mge-shut
driver.parameter.lowbatt: 30
driver.parameter.offdelay: 300
driver.parameter.ondelay: 600
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/cuau0
driver.version: 2.7.2
driver.version.data: MGE HID 1.33
driver.version.internal: 0.38
input.current: 0.00
input.frequency: 49.9
input.frequency.nominal: 50
input.sensitivity: normal
input.transfer.boost.low: 207
input.transfer.high: 276
input.transfer.low: 184
input.transfer.trim.high: 243
input.voltage: 233.8
input.voltage.nominal: 230
outlet.1.status: on
outlet.desc: Main Outlet
outlet.id: 0
outlet.switchable: no
output.current: 0.20
output.frequency: 49.9
output.frequency.nominal: 50
output.powerfactor: 0.74
output.voltage: 234.5
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 300
ups.delay.start: 600
ups.efficiency: 44
ups.firmware:
ups.load: 10
ups.load.high: 105
ups.mfr: EATON
ups.model: Eaton 5SC 500
ups.power: 47
ups.power.nominal: 500
ups.productid: ffff
ups.realpower: 35
ups.realpower.nominal: 350
ups.serial: xxxxxxxxx
ups.shutdown: enabled
ups.start.auto: yes
ups.start.battery: yes
ups.start.reboot: yes
ups.status: OL CHRG
ups.test.interval: 604800
ups.test.result: Done and passed
ups.timer.shutdown: 0
ups.timer.start: 0
ups.type: offline / line interactive
ups.vendorid: 0463


The only issue is with the battery parameters. 'lowbatt' is supposed to be the remaining battery percentage at which NUT triggers the shutdowns. I tried a few different values but as far as I can tell this parameter is completely ignored and the UPS switches from OB to LB at 30%. A quick google revealed I'm not the only one having this problem with mge-shut. Also, 'battery.charge.restart' should tell the UPS to turn on when the battery reaches 50% charge after mains power is back up, but it starts as soon as the mains are reconnected.

Well, it's good enough for now, if I have time I'll see if I can move one of the USB2.0 boot drives to the internal USB3.0 port (which I know works in FreeNAS) and then try usbhid-ups on the free USB2.0 port.

onaeKkR.png
 
Last edited:

Brian BC

Dabbler
Joined
Oct 19, 2015
Messages
10
Freenas doesnt turn on USB 3 support out of the box you have to add a tunable for xhci_load

its
Variable:
xhci_load
Value:
YES
type:
Loader
has anyone tried this? I am trying to get a USB HDD for transmission to show up(both of my USB 2.0 ports are mirrored for boot) and i am weary of wearing down my disks for transmission...

I am on the A1SAI-2750F - I am one iteration of the bios behind (I am a noob and don't know how to make a bootable dos disk that also has the batch file for flashing the slightly newer bios) I tried turning off xHCI (I read somewhere sometimes that makes the drives show up as 2.0 - which is fine by me)

Ideas?
 

Tom_

Explorer
Joined
Jan 4, 2015
Messages
62
I gave up trying to use the USB 3 ports on my board. As far as I can tell they don't work in FreeNAS either in USB 2 or USB 3 mode.

Good luck with it!
 

Brian BC

Dabbler
Joined
Oct 19, 2015
Messages
10
I gave up trying to use the USB 3 ports on my board. As far as I can tell they don't work in FreeNAS either in USB 2 or USB 3 mode.

Good luck with it!
I GOT IT TO WORK!

for A1SAi-2750F BIOS xHCI hand-off enabled and tunable as INCSlayer laid out above. The only thing that isn't ideal is that it is its own zpool (which is small, but unfortunate overhead for my ram)....

So far I am having trouble with permissions but that will get cleared up....
 
Status
Not open for further replies.
Top