Bug 238576

Summary: Raspberry Pi 3B+ "shutdown -p" does not shut off power
Product: Base System Reporter: Ed Maste <emaste>
Component: kernAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: Open ---    
Severity: Affects Some People CC: freebsd-arm, mafsys1234, otaciliodearaujo, sparvu
Priority: --- Keywords: needs-patch, needs-qa
Version: 12.0-RELEASEFlags: koobs: mfc-stable12?
koobs: mfc-stable11?
Hardware: arm64   
OS: Any   

Description Ed Maste freebsd_committer 2019-06-15 10:01:06 UTC

Executing "shutdown -p now" I would expect the device to power off but it reboots and boots FreeBSD again:

root@generic:~ # shutdown -p now
Shutdown NOW!
shutdown: [pid 913]
root@generic:~ #                                     Stopping cron.
Waiting for PIDS: 852.
Stopping sshd.
Waiting for PIDS: 848.
Stopping devd.
Waiting for PIDS: 572.
Writing entropy file:.
Writing early boot entropy file:.
Dec  7 03:42:27 generic syslogd: exiting on signal 15
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop... 
Syncing disks, vnodes remaining... 0 0 0 done
Waiting (max 60 seconds) for system thread `bufdaemon' to stop... done
Waiting (max 60 seconds) for system thread `bufspacedaemon-0' to stop... done
All buffers synced.
Uptime: 1m17s
MMC:   mmc@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
starting USB...
USB0:   scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
MMC Device 0 not found
no mmc device at slot 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@7e300000.blk...
Found 3 disks
FDT memrsv map 0: Failed to add to map
637384 bytes read in 57 ms (10.7 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
FDT memrsv map 0: Failed to add to map
## Starting EFI application at 00080000 ...
Consoles: EFI console  
FreeBSD/arm64 EFI loader, Revision 1.1
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-15 10:37:30 UTC
Much of an arm64 delta from 12.0 -> current to warrant testing a recent snapshot?
Comment 2 Stefan Parvu 2019-12-01 21:18:16 UTC
At least in 12.1 Release RBPI3B+ does NOT shutdown the system. It does reboot.
Comment 3 xxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXXxx 2021-09-20 02:59:33 UTC
I can confirm as at Sep 1, 2021, RPI3B+ does not shutdown under 13R.

There was, gpioshutdown for use with RPI2B, and this worked fine, shutting down the system. Can this be upgraded/updated to handle RPI3B+?