>From the APU2 manual - possibly:
J2 power / reset: Pins 1-2 = SPI write protect (requires additional software support toconfigure SPI flash) Pins 2-3 = power button <--- Pins 4-5 = reset button Pins 5-6 = enable NCT5104D watchdog reset (requires additional softwaresupport) On 6/2/23 11:40, Paul de Weerd wrote: > Thanks Claudio, > > On Fri, Jun 02, 2023 at 07:03:49PM +0200, Claudio Jeker wrote: > | The problem here is that this signal is sent before init installed its > | signal handlers. So this is ultra early. > | Now I think there are two places where this can be triggered: > | dev/acpi/acpi.c: prsignal(initprocess, SIGUSR2); > | dev/acpi/acpitz.c: prsignal(initprocess, SIGUSR2); > | > | I would add some debug printf() in both places and see which one triggers. > > It's the one in acpi.c: > > ... > spkr0 at pcppi0 > lpt0 at isa0 port 0x378/4 irq 7 > intr_establish: pic ioapic0 pin 7: can't share type 3 with 2 > wbsio0 at isa0 port 0x2e/2: NCT5104D rev 0x52 > vmm0 at mainbus0: SVM/RVI > acpi.c: acpi_powerdown_task pre prsignal > acpi.c: acpi_powerdown_task post prsignal > uhub2 at uhub1 port 1 configuration 1 interface 0 "Advanced Micro Devices > Hub" rev 2.00/0.18 addr 2 > vscsi0 at root > scsibus2 at vscsi0: 256 targets > softraid0 at root > scsibus3 at softraid0: 256 targets > root on sd0a (425cdd38685451a6.a) swap on sd0b dump on sd0b > Process (pid 1) got signal 31 > > So, somehow, the system is convinced the power button has been > pressed (acpi_powerdown_task is called from acpi_pbtn_task in acpi.c > and from acpibtn_notify in acpibtn.c, both when the power button is > pressed). > > With some more experimenting - this signal doesn't appear when the > machine is rebooted, only when it cold boots. Now, the APU doesn't > really have a power button, but "plugging in* power basically has the > same effect of course (it's just .. to *turn on* the system, not to > turn it off). > > Is the conclusion here that the system behaves erratically by > signalling its power button has been pressed, but the machine doesn't > power down because init hasn't installed its signal handlers (probably > hasn't even been started) yet? > > Paul >