First put enable fwupd
services.fwupd.enable = true;
Then run
$ fwupdmgr update
As of firmware v03.03, a bug in the EC causes the system to wake if AC is connected despite the lid being closed. A workaround has been upstreamed in Linux v6.7. For older kernels, the following works around this, with the trade-off that keyboard presses also no longer wake the system.
{
hardware.framework.amd-7040.preventWakeOnAC = true;
}
See Framework AMD Ryzen 7040 Series lid wakeup behavior feedback.