For a long time now I’ve been wondering how to enable S3 sleep on the laptop, there’s UMAF, which I assumed to NOT be safe, given the experience one of my friends had with their HP laptop and UMAF (HP 15s-eq2144au) where they enabled S3 sleep through UMAF, their laptop got bricked and it’s NVRAM couldn’t be reset by normal means.
So I went with a route that could be safer, such as GitHub - datasone/grub-mod-setup_var: A modified grub allowing tweaking hidden BIOS settings.
but in order to use that, I had to find the setup var name, offset and size for the setting that controls whether the laptop uses Modern Standby or S3 Sleep.
After finding out that the BIOS was already in my NVMe’s ESP (EFI System Partition) because of the HP BIOS Updater leaving it there, I copied it out of the ESP to somewhere else so that I could get to extracting modules using UEFITool, I started by extracting the “Setup” DXE, “AodSetupDxe” but that’s where I was stuck for quite some time, until I found where the AMD PBS settings were and it turned out to be in it’s own module called “AmdPbsSetupDxe”, out of curiosity I looked for the CBS settings and found it as “CbsSetupDxeRN”, but I’m focusing on the PBS settings, since that’s where “S3/Modern Standby Support” is.
After extracting AmdPbsSetupDxe, I used IFRExtractor-RS with verbose then used the IFR-Formatter from GitHub - BoringBoredom/UEFI-Editor: Aptio V UEFI Editor: an alternative to AMIBCP to get a better look at things and found the following:
S3/Modern Standby Support | VarStore: AMD_PBS_SETUP | VarOffset: 0x38 | Size: 0x1
S3 Enable: 0x0
Modern Standby Enable: 0x1
AMD PBS Option
Modern Standby Type | VarStore: AMD_PBS_SETUP | VarOffset: 0x42 | Size: 0x1
Modern Standby + S0i2: 0x0
Modern Standby + S0i3: 0x1
Modern Standby + S0i2 + S0i3: 0x2
With these two in mind, I started reading their values using the modified GRUB shell and so, Modern Standby is enabled and it’s using S0i3 alone instead of S0i2 or both S0i2 and S0i3.
Now, if I want to enable S3 Sleep, why am I not doing it? well it’s because I’m not desperate and I don’t want to risk anything, not even a CMOS reset.
I just want to get some opinions on this and see if anyone wants to do the same, though it should be noted that my laptop has a Ryzen 5 5600H, which might as well be the last gen of Ryzen CPUs that can have S3 sleep working out of the box after enabling it in the BIOS, not sure if this could work on any newer gens so yeah, keep this in mind if you want to do something like this.
EDIT: This laptop has an AMI-based BIOS.