These are sleep testing images for testing FreeBSD S0i3 entry on AMD machines.
More (and outdated - I'll update this soon, I swear!) info about this work here: https://obiw.ac/s0ix. The gist of it is that, when the OS enters an idle loop and suspends all devices (s2idle), the system will enter an S0ix state to save power (the goal being S0i3). So the OS doesn't explicitly initiate S0i3, but it sets up the conditions for the firmware to enter it by entering s2idle.
freebsd-ufs
): rootfs.img.xz
You can flash this to a USB drive, but do note that resuming from a USB rootfs will cause the kernel to panic. You can still see the sleep metrics of the previous suspend by running the sysctl command in the kdb console (see below for more examples):
sysctl dev.amdsmu.0
Login/password is root
/toor
.
SHA256 (s0i3.img.xz) = 9e26537a9fa03af6fe36f16b1c65d1ff36856e7a6f0dc06aeb69331dbfe16052 SHA256 (rootfs.img.xz) = 4bd94c494a8311faa5874b6c3742de4197f5d2d02b59cd39837f33fd775f5925
More usage and practical information is in the /root/README
file, the contents of which are copied here:
Checking supported sleep types ("s2idle" should appear here): sysctl kern.power.supported_stype Setting power button/lid behaviour to s2idle: sysctl hw.acpi.power_button_state=s2idle sysctl hw.acpi.lid_switch_state=s2idle You can also set these permanently by modifying the /etc/sysctl.conf file. If you need to put the system into s2idle more than once, run the s2idle command instead: s2idle This command includes a workaround to reset the USB4 controllers, which otherwise stops suspending properly after the first entry to S0i3. If, however, you're only testing one entry, it's probably best to use the power switch method, as the s2idle command is pretty hacky and may not always work. Getting the SMU values: sysctl dev.amdsmu.0 You can "filter" the results you get, e.g.: sysctl dev.amdsmu.0.metrics sysctl dev.amdsmu.0.idlemask sysctl dev.amdsmu.0.ip_blocks.CPU.last_time You can run the same commands from the kdb console if you need to get this information after the system has panicked. This is useful if you booted the image from a USB drive rootfs, because the kernel will panic upon resuming from this. Note that WiFi firmware isn't included in this image, but SSH is enabled if needed to evict sleep metrics/kernel logs. The following kernel modules are relevant to S0i3: - amdsmu: The SMU driver. - amdgpu: The GPU DRM driver. - amdgpio: The AMD GPIO controller driver. - tb: The USB4 (Thunderbolt) driver.