2a5eff93ec
Add deterministic S5 (soft-off) state derivation and structured error handling to acpid. Derive S5 parameters once at startup (or retry at shutdown if AML was not ready) instead of re-parsing the _S5 package on every shutdown attempt. Replace unit-return set_global_s_state() with ShutdownResult enum for proper error propagation and fallback handling. Changes: - S5State struct caches SLP_TYPa/b, PM1a/b ports, derivation timestamp - ShutdownError enum: MissingFadt, Pm1aZero, AmlNotReady, S5NotFound, S5NotPackage, SlpTypNotInteger, S5WriteFailed - ShutdownResult enum: Ok, FallbackReset, Err(ShutdownError) - derive_s5_state() method with early init attempt and lazy fallback - set_global_s_state() returns ShutdownResult instead of () - Early S5 derivation in AcpiContext::init() logs AML readiness status - main.rs logs shutdown result for debugging This is W2.1/W2.2 from ACPI-IMPROVEMENT-PLAN.md.