On Sun, Mar 23, 2025 at 08:14:56AM -0700, Steve Williams wrote:
> Hi,
> 
> I am trying to get apcupsd working on my OpenBSD 7.6 box.
> 
> Using the standard drivers (upd0 at uhidev0), sysctl hw.sensors is returning
> data.  (Full dmesg to follow)
> 
> 
> mini# sysctl hw.sensors
>     hw.sensors.cpu0.temp0=46.00 degC
>     hw.sensors.cpu0.frequency0=2500000000.00 Hz
>     hw.sensors.cpu1.frequency0=2500000000.00 Hz
>     hw.sensors.upd0.indicator0=On (BatteryPresent), OK
>     hw.sensors.upd0.indicator1=Off (Charging), OK
>     hw.sensors.upd0.indicator2=Off (Discharging), OK
>     hw.sensors.upd0.indicator3=Off (NeedReplacement), OK
>     hw.sensors.upd0.indicator4=Off (ShutdownImminent), OK
>     hw.sensors.upd0.indicator5=On (ACPresent), OK
>     hw.sensors.upd0.indicator6=Off (Overload), OK
>     hw.sensors.upd0.percent0=100.00% (RemainingCapacity), OK
>     hw.sensors.upd0.percent1=100.00% (FullChargeCapacity), OK
>     hw.sensors.upd0.timedelta0=8211.000000 secs (RunTimeToEmpty), OK
> 
> Unfortunately, apcupsd's "apcaccess" reports COMMLOST.
> 
> mini# apcaccess
>     APC      : 001,017,0446
>     DATE     : 2025-03-23 08:10:56 -0700
>     HOSTNAME : mini.williamisitconsulting.com
>     VERSION  : 3.14.14 (31 May 2016) openbsd
>     CABLE    : USB Cable
>     DRIVER   : USB UPS Driver
>     UPSMODE  : Stand Alone
>     STARTTIME: 2025-03-23 08:09:54 -0700
>     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  : 2025-03-23 08:13:47 -0700
> 
> Following the pkg-readmes/apcupsd:
> 
> 
>     The option with fewest side-effects is to add the following entries to
>     the table in /sys/dev/usb/usb_quirks.c and build a new kernel:
> 
>     { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, ANY, { UQ_BAD_HID }},
>     { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G, ANY, { UQ_BAD_HID }},
> 
> If I compile my own kernel with the above settings, and it resolves the
> problem, will that break "syspatch".  Can I keep syspatch compatibility by
> following any specific steps?
> 
> Thanks,
> Steve Williams
> 
> OpenBSD 7.6 (GENERIC.MP) #1: Mon Feb 10 00:14:14 MST 2025
> r...@syspatch-76-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8519700480 (8125MB)
> avail mem = 8238219264 (7856MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7cd1a020 (8 entries)
> bios0: vendor coreboot version "v4.9.0.3" date 10/14/2022
> bios0: Protectli FW2B
> acpi0 at bios0: ACPI 3.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT MCFG APIC
> acpi0: wakeup devices XHCI(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe0000000, bus 0-255
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Celeron(R) CPU J3060 @ 1.60GHz, 2480.37 MHz, 06-4c-04, patch
> 00000411
> cpu0: cpuid 1 
> edx=bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>  
> ecx=43d8e3bf<SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,RDRAND>
> cpu0: cpuid 6 eax=7<SENSOR,ARAT> ecx=9<EFFFREQ>
> cpu0: cpuid 7.0 ebx=2282<TSC_ADJUST,SMEP,ERMS>
> edx=c000400<MD_CLEAR,IBRS,IBPB,STIBP>
> cpu0: cpuid a vers=3, gp=2, gpwidth=40, ff=3, ffwidth=40
> cpu0: cpuid 80000001 edx=28100800<NXE,RDTSCP,LONG> ecx=101<LAHF,3DNOWP>
> cpu0: cpuid 80000007 edx=100<ITSC>
> cpu0: MELTDOWN
> cpu0: 24KB 64b/line 6-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line
> 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 79MHz
> cpu0: mwait min=64, max=64, C-substates=0.2, IBE
> cpu1 at mainbus0: apid 4 (application processor)
> cpu1: Intel(R) Celeron(R) CPU J3060 @ 1.60GHz, 2480.52 MHz, 06-4c-04, patch
> 00000411
> cpu1: smt 0, core 2, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 115 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
> iosf0 at acpi0 IOSF: mbi
> acpicmos0 at acpi0
> com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
> "10EC5670" at acpi0 not configured
> chvgpio0 at acpi0 GPSW uid 1 addr 0xfed80000/0x8000 irq 49, 56 pins
> chvgpio1 at acpi0 GPNC uid 2 addr 0xfed88000/0x8000 irq 48, 59 pins
> chvgpio2 at acpi0 GPEC uid 3 addr 0xfed90000/0x8000 irq 50, 24 pins
> chvgpio3 at acpi0 GPSE uid 4 addr 0xfed98000/0x8000 irq 91, 55 pins
> acpibtn0 at acpi0: PWRB
> "BOOT0000" at acpi0 not configured
> acpicpu0 at acpi0: C2 bad (state 6 has no substates): C3 bad (state 6 has no
> substates): C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: C2 bad (state 6 has no substates): C3 bad (state 6 has no
> substates): C1(1000@1 mwait.1), PSS
> acpipwrres0 at acpi0: PLPE
> cpu0: using VERW MDS workaround
> cpu0: Enhanced SpeedStep 2480 MHz: speeds: 1601, 1600, 1520, 1440, 1360,
> 1280, 1200, 1120, 1040, 960, 880, 800, 720, 640, 560, 480 MHz
> pci0 at mainbus0 bus 0
> iosf1 at pci0 dev 0 function 0 "Intel Braswell Host" rev 0x35: mbi
> inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x35
> drm0 at inteldrm0
> inteldrm0: msi, CHERRYVIEW, gen 8
> "Intel Braswell Power" rev 0x35 at pci0 dev 11 function 0 not configured
> ahci0 at pci0 dev 19 function 0 "Intel Braswell AHCI" rev 0x35: msi, AHCI
> 1.3.1
> ahci0: port 0: 6.0Gb/s
> ahci0: port 1: 6.0Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0: <ATA, Samsung SSD 850, EMT4>
> naa.5002538d4163996b
> sd0: 238475MB, 512 bytes/sector, 488397168 sectors, thin
> sd1 at scsibus1 targ 1 lun 0: <ATA, Samsung SSD 870, SVT0>
> naa.5002538f33344e97
> sd1: 3815447MB, 512 bytes/sector, 7814037168 sectors, thin
> xhci0 at pci0 dev 20 function 0 "Intel Braswell xHCI" rev 0x35: msi, xHCI
> 1.0
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev
> 3.00/1.00 addr 1
> "Intel Braswell SIO DMA" rev 0x35 at pci0 dev 24 function 0 not configured
> "Intel Braswell SIO I2C" rev 0x35 at pci0 dev 24 function 1 not configured
> "Intel Braswell SIO I2C" rev 0x35 at pci0 dev 24 function 2 not configured
> azalia0 at pci0 dev 27 function 0 "Intel Braswell HD Audio" rev 0x35: msi
> azalia0: codecs: Realtek ALC897, Intel/0x2883, using Realtek ALC897
> audio0 at azalia0
> ppb0 at pci0 dev 28 function 0 "Intel Braswell PCIE" rev 0x35: msi
> pci1 at ppb0 bus 1
> em0 at pci1 dev 0 function 0 "Intel I211" rev 0x03: msi, address
> 00:e0:97:1c:b9:19
> ppb1 at pci0 dev 28 function 1 "Intel Braswell PCIE" rev 0x35: msi
> pci2 at ppb1 bus 2
> em1 at pci2 dev 0 function 0 "Intel I211" rev 0x03: msi, address
> 00:e0:97:1c:b9:1a
> "Intel Braswell SIO DMA" rev 0x35 at pci0 dev 30 function 0 not configured
> pcib0 at pci0 dev 31 function 0 "Intel Braswell PCU LPC" rev 0x35
> ichiic0 at pci0 dev 31 function 3 "Intel Braswell SMBus" rev 0x35: apic 2
> int 18
> iic0 at ichiic0
> spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
> isa0 at pcib0
> isadma0 at isa0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation)
> uhidev0 at uhub0 port 2 configuration 1 interface 0 "American Power
> Conversion Back-UPS NS 1350M2 FW:954.e4 .D USB FW:e4" rev 2.00/0.90 addr 2
> uhidev0: iclass 3/0, 128 report ids
> upd0 at uhidev0
> uhid0 at uhidev0 reportid 1: input=0, output=0, feature=1
> uhid1 at uhidev0 reportid 2: input=0, output=0, feature=1
> uhid2 at uhidev0 reportid 3: input=0, output=0, feature=1
> uhid3 at uhidev0 reportid 4: input=0, output=0, feature=1
> uhid4 at uhidev0 reportid 5: input=0, output=0, feature=1
> uhid5 at uhidev0 reportid 6: input=3, output=0, feature=3
> uhid6 at uhidev0 reportid 7: input=0, output=0, feature=2
> uhid7 at uhidev0 reportid 8: input=0, output=0, feature=2
> uhid8 at uhidev0 reportid 9: input=0, output=0, feature=2
> uhid9 at uhidev0 reportid 10: input=0, output=0, feature=1
> uhid10 at uhidev0 reportid 11: input=0, output=0, feature=1
> uhid11 at uhidev0 reportid 12: input=3, output=0, feature=3
> uhid12 at uhidev0 reportid 13: input=0, output=0, feature=1
> uhid13 at uhidev0 reportid 14: input=0, output=0, feature=1
> uhid14 at uhidev0 reportid 15: input=0, output=0, feature=1
> uhid15 at uhidev0 reportid 16: input=0, output=0, feature=1
> uhid16 at uhidev0 reportid 17: input=0, output=0, feature=1
> uhid17 at uhidev0 reportid 18: input=0, output=0, feature=1
> uhid18 at uhidev0 reportid 21: input=0, output=0, feature=2
> uhid19 at uhidev0 reportid 23: input=0, output=0, feature=2
> uhid20 at uhidev0 reportid 24: input=0, output=0, feature=1
> uhid21 at uhidev0 reportid 28: input=0, output=0, feature=3
> uhid22 at uhidev0 reportid 32: input=0, output=0, feature=2
> uhid23 at uhidev0 reportid 33: input=1, output=0, feature=1
> uhid24 at uhidev0 reportid 34: input=0, output=0, feature=1
> uhid25 at uhidev0 reportid 35: input=0, output=0, feature=2
> uhid26 at uhidev0 reportid 36: input=0, output=0, feature=2
> uhid27 at uhidev0 reportid 37: input=0, output=0, feature=2
> uhid28 at uhidev0 reportid 38: input=0, output=0, feature=2
> uhid29 at uhidev0 reportid 39: input=0, output=0, feature=2
> uhid30 at uhidev0 reportid 40: input=0, output=0, feature=4
> uhid31 at uhidev0 reportid 48: input=0, output=0, feature=1
> uhid32 at uhidev0 reportid 49: input=0, output=0, feature=2
> uhid33 at uhidev0 reportid 50: input=0, output=0, feature=2
> uhid34 at uhidev0 reportid 51: input=0, output=0, feature=2
> uhid35 at uhidev0 reportid 52: input=0, output=0, feature=2
> uhid36 at uhidev0 reportid 53: input=0, output=0, feature=1
> uhid37 at uhidev0 reportid 54: input=0, output=0, feature=1
> uhid38 at uhidev0 reportid 64: input=0, output=0, feature=1
> uhid39 at uhidev0 reportid 65: input=0, output=0, feature=2
> uhid40 at uhidev0 reportid 66: input=0, output=0, feature=2
> uhid41 at uhidev0 reportid 80: input=0, output=0, feature=1
> uhid42 at uhidev0 reportid 81: input=0, output=0, feature=1
> uhid43 at uhidev0 reportid 82: input=0, output=0, feature=2
> uhid44 at uhidev0 reportid 96: input=0, output=0, feature=2
> uhid45 at uhidev0 reportid 97: input=0, output=0, feature=1
> uhid46 at uhidev0 reportid 98: input=0, output=0, feature=4
> uhid47 at uhidev0 reportid 116: input=0, output=0, feature=4
> uhid48 at uhidev0 reportid 117: input=0, output=0, feature=2
> uhid49 at uhidev0 reportid 120: input=0, output=0, feature=1
> uhid50 at uhidev0 reportid 121: input=0, output=0, feature=1
> uhid51 at uhidev0 reportid 122: input=0, output=0, feature=4
> uhid52 at uhidev0 reportid 123: input=0, output=0, feature=2
> uhid53 at uhidev0 reportid 124: input=0, output=0, feature=1
> uhid54 at uhidev0 reportid 125: input=0, output=0, feature=1
> uhid55 at uhidev0 reportid 126: input=0, output=0, feature=1
> uhid56 at uhidev0 reportid 127: input=0, output=0, feature=1
> uhid57 at uhidev0 reportid 128: input=0, output=0, feature=1
> uhub1 at uhub0 port 3 configuration 1 interface 0 "Terminus Technology USB
> 2.0 Hub [MTT]" rev 2.00/1.00 addr 3
> uaudio0 at uhub1 port 1 configuration 1 interface 1 "Logitech HD Webcam
> C525" rev 2.00/0.10 addr 4
> uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
> audio1 at uaudio0
> uvideo0 at uhub1 port 1 configuration 1 interface 2 "Logitech HD Webcam
> C525" rev 2.00/0.10 addr 4
> video0 at uvideo0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> root on sd0a (dbef01e6a41a83d4.a) swap on sd0b dump on sd0b
> inteldrm0: 1024x768, 32bpp
> wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> 
> Broadcast Message from r...@mini.williamisitconsulting.com
>         ((not a tty)) at 8:10 ...
> 
> Communications with UPS lost.
> 

You can create a /etc/bsd.re-config and disable upd/uhidev without
compiling a new kernel. However, if you use a usb keyboard it will not
work. I usually just boot -c and disable upd/uhidev, this way I can
reboot with a working keyboard if I need to.

See bsd.re-config(5)

-- 
Chaz

Reply via email to