APC UPS (uninterruptible power supply) not detected by lsusb

I have my Umbrel plugged into an APC UPS (uninterruptible power supply). My goal is to have it gracefully shut down in the event of an extended power outage where the UPS battery also becomes depleted. I am attempting to configure it via this guide: https://github.com/PLEBNET/wiki.plebnet.org#advanced-ups-setup

I am running Umbrel version 0.3.14, Bitcoin core is 100% synced.

I have the UPS data cable plugged into one of the USB 2 (black) ports on the Pi 4. I have a Samsung T5 portable SSD plugged into one of the USB 3 (blue) ports.

  • I have apcupsd/apcupsd.conf configured as described in the above guide and restarted apcupsd
  • I try apcaccess status, but it doesn’t detect the UPS
  • I tired different USB ports, no change

apcaccess status output:

APC      : 001,018,0438
DATE     : 2021-07-05 13:54:56 +0000  
HOSTNAME : umbrel
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : myups
CABLE    : USB Cable
DRIVER   : USB UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2021-07-05 13:32:29 +0000  
STATUS   : COMMLOST 
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000100
END APC  : 2021-07-05 13:54:56 +0000

It doesn’t appear the UPS is being detected via USB

lsusb output:

Bus 002 Device 002: ID 04e8:61f5 Samsung Electronics Co., Ltd Portable SSD T5
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Attempted to restart the node, no change. Took a look at dmesg and I’m not seeing anything related to the UPS. I’m also seeing a repeated message along the lines of,

[ 3226.797997] usb 1-1: new high-speed USB device number 105 using xhci_hcd
[ 3226.798138] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 3227.006166] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 3227.213993] usb 1-1: device not accepting address 105, error -22
[ 3227.214322] usb usb1-port1: unable to enumerate USB device

Seems that these messages continue, even when the UPS in unplugged (so maybe unrelated?). Unsure how to continue troubleshooting. My questions are;

  • Why is my UPS not being recognized?
  • What do these errors in dmesg mean?

Appreciate any help or insight! :blush:

1 Like

Bumping this as I’m struggling to find a solution :sleepy:

Just throwing in some links with no personal experience:

1 Like

Thanks for the reply!

After some more digging, I believe that this issue goes deeper than the UPS and is more so to do with the USB ports. At this point, I’m trying to figure out if it’s a hardware defect or a software issue.

Apart from the SSD (which is plugged into one of the USB 3.0 ports and is working fine), none of the other 3 USB ports are working (tried several different USB devices).

dmesg is continuously throwing USB related errors (even when the UPS isn’t plugged in).

[ 1777.215513] usb 1-1: new high-speed USB device number 29 using xhci_hcd
[ 1777.575684] usb 1-1: device descriptor read/64, error -71
[ 1778.115675] usb 1-1: device descriptor read/64, error -71
[ 1778.223737] usb usb1-port1: attempt power cycle
[ 1778.875531] usb 1-1: new high-speed USB device number 30 using xhci_hcd
[ 1778.875662] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 1779.083586] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 1779.291547] usb 1-1: device not accepting address 30, error -22
[ 1779.419541] usb 1-1: new high-speed USB device number 31 using xhci_hcd
[ 1779.419701] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 1779.627773] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 1779.835529] usb 1-1: device not accepting address 31, error -22
[ 1779.835969] usb usb1-port1: unable to enumerate USB device

I have the same issue. It appears Umbrel somehow locks all other USB ports except the SSD.

Someone told me the same thing, do you have a source on this?

It doesn’t really line up with a couple of points though,

  • Other people using Umbrel have reported getting this working via the steps in the PLEBNET wiki

  • I have been able to see get both devices to show up under lsusb (but only if I boot up the Pi without the SSD plugged in)

EDIT: @BhaagBoseDK - I have a more comprehensive thead going in the Raspi forum, have some additional findings there. The top lead right now is that this might be an issue with power. Haven’t reached any conclusions yet though: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=316114

Thanks, I had come across the Raspi Forum page too related to this issue.
So it seems the solution is to start with only the UPS attached.
Then attach SSD
And if you ever restart, remove the SSD before power on.

This does point to an issue with power (even though I have the original power adapter).

For now I have shutdown apcupsd because as soon as I start it, the syslog starts getting filled up with the usb related messages.

Do you know if own powered SSD were able to get over this situation?

@BhaagBoseDK

So it seems the solution is to start with only the UPS attached.
Then attach SSD
And if you ever restart, remove the SSD before power on.

This does not work, as Umbrel blocks you from entering the Dashboard UI if you don’t plug in an SSD on power-up. Your only option is to restart or shut down (which is not feasible due to the issue at hand).

I have not tried a self-powered SSD enclosure, however I have tried plugging everything in to a powered USB hub - the results are the same. So, this might not be a power issue after all.

(details of the USB hub experiment are here: Unable to get Linux (Raspberry Pi 4 Model B, 8GB) to recognize my APC UPS via USB - Raspberry Pi Forums)

Oct 3 21:02:27 treasury apcupsd[25051]: Valid lock file for pid=17995, but not ours pid=25051
Oct 3 21:02:27 treasury apcupsd[25051]: apcupsd error shutdown completed
Oct 3 21:03:14 treasury apcupsd[25467]: Valid lock file for pid=17995, but not ours pid=25467
Oct 3 21:03:14 treasury apcupsd[25467]: apcupsd FATAL ERROR in apcupsd.c at line 221#012Unable to create UPS lock file.#012 If apcupsd or apctest is already running,#012 please stop it and run this program again.
Oct 3 21:03:14 treasury apcupsd[25467]: Valid lock file for pid=17995, but not ours pid=25467
Oct 3 21:03:14 treasury apcupsd[25467]: apcupsd error shutdown completed
Oct 3 21:04:32 treasury apcupsd[26129]: Valid lock file for pid=17995, but not ours pid=26129
Oct 3 21:04:32 treasury apcupsd[26129]: apcupsd FATAL ERROR in apcupsd.c at line 221#012Unable to create UPS lock file.#012 If apcupsd or apctest is already running,#012 please stop it and run this program again.
Oct 3 21:04:32 treasury apcupsd[26129]: Valid lock file for pid=17995, but not ours pid=26129
Oct 3 21:04:32 treasury apcupsd[26129]: apcupsd error shutdown completed

I can see mine, and is detected but it does not initiate the shutdown

Hey there,
I am experiencing the same troubles…

UPS: PowerWalker Basic VI 1000 STL
Umbrel Version: 0.4.3

UPS not recognized in lsusb, syslog shows the errors named in the plebnet wiki.

Uninstalled apcusbd and also nut not to push the raspi too hard will trying to find a solution ;(

For now the ups is just here to protect the pi from power fluctuations and occursional outages :smiley:
Would love to see the shutdown feature work some day :smiley:

Still no solution for this unfortunately :-1:

More info was added to the PLEBNET Wiki (https://plebnet.wiki/wiki/UPS), which reflects the same issues as described in this thread. If someone finds a solution, please follow-up!

Bit of a dump workaround, but feasible: Get another PI.

I have another working PI for testnet things, Bots and heavy lifting, running Raspiblitz. This is where I’ve USB connected my UPS, and the nut-server (and client) running. And my umbrel is running NUT-client only, subscribed to the server, of course all power-plugged into the USP.

So what happens is, my master NUT node gets notified via USB, and will send a broadcast to all other client configs to shut-down once < 20% battery status.

This way, I have a couple of clients all shutting down gracefully, but only one master connected to the USP. You could leverage this approach to circumvent the issue for a low cost (Raspi 3 with no SSD is sufficient) Server / Client Raspi setup described here.

1 Like

Very clever work around thanks for sharing. I’ll see if I can get my hands on a second pi to test it!

Wondering if there’s been any update.

I have 2 RPi 4 (8GB). Both running Umbrel (one as a LN and the other just for Pi-hole, vaultwarden, nextcloud, etc). Neither will see the UPS via USB. Wondering if I should run my non-LN as a different OS in order to use apcupsd. I’m only familiar with Umbrel so far, so will accept any suggestions.

Anyone ever try to SSD enclosure with power? Might see if I can find a cheap one of those? Or a cheap RPi 3.

Same issue here :frowning:
Tried connecting APC ES 700.

What a shame!

Yes, really would be the perfect little setup if we could get this working with a single pi :sleepy: