Skip to content

Add --auto-resume: complete activation automatically after the BIOS-t…#4

Merged
88plug merged 1 commit into
mainfrom
feat/auto-resume
Jun 10, 2026
Merged

Add --auto-resume: complete activation automatically after the BIOS-t…#4
88plug merged 1 commit into
mainfrom
feat/auto-resume

Conversation

@88plug

@88plug 88plug commented Jun 10, 2026

Copy link
Copy Markdown
Owner

…oggle reboot

When the firmware refuses with AMT_STATUS_NOT_PERMITTED (manageability disabled in BIOS, e.g. P3 Ultra 30HA factory state), amt-activate now offers to finish the job itself:

  • stages the think-lmi BIOS toggle (tries ManageabilityControl, then AMTControl) so no BIOS menu visit is needed
  • installs a self-disabling one-shot amt-autoactivate.service that re-runs activation at next boot via the new --resume mode (reuses the saved password non-interactively, disables the unit on success, retries next boot if the toggle still is not live)
  • --auto-resume does the same without prompting, for headless/automation

Also fixes a latent bug: rpc exits non-zero on refusal (Error 4 AmtNotReady), and under set -euo pipefail the activate|tee pipeline killed the script before any post-activation handling ran — including the NOT_PERMITTED hint added in #3. The pipeline now tolerates rpc's exit code and the handlers actually execute.

Bumps script VERSION to 0.2.0. README: quick-start, Lenovo section, and troubleshooting row updated for the automatic path.

…oggle reboot

When the firmware refuses with AMT_STATUS_NOT_PERMITTED (manageability
disabled in BIOS, e.g. P3 Ultra 30HA factory state), amt-activate now
offers to finish the job itself:

- stages the think-lmi BIOS toggle (tries ManageabilityControl, then
  AMTControl) so no BIOS menu visit is needed
- installs a self-disabling one-shot amt-autoactivate.service that
  re-runs activation at next boot via the new --resume mode (reuses the
  saved password non-interactively, disables the unit on success,
  retries next boot if the toggle still is not live)
- --auto-resume does the same without prompting, for headless/automation

Also fixes a latent bug: rpc exits non-zero on refusal (Error 4
AmtNotReady), and under set -euo pipefail the activate|tee pipeline
killed the script before any post-activation handling ran — including
the NOT_PERMITTED hint added in #3. The pipeline now tolerates rpc's
exit code and the handlers actually execute.

Bumps script VERSION to 0.2.0. README: quick-start, Lenovo section,
and troubleshooting row updated for the automatic path.
@88plug 88plug merged commit ca71855 into main Jun 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant