Skip to content

powermenu: reboot into firmware setup from the power menu - #3877

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
matthewyjiang:firmware-reboot-ux
Oct 23, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
matthewyjiang:firmware-reboot-ux

Conversation

@matthewyjiang

@matthewyjiang matthewyjiang commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Getting into UEFI setup today means rebooting and mashing F2/Del at the right moment, which many laptops make hard with fast boot. The power menu can now reboot straight into firmware setup.

  • Settings → Power & sleep has a Firmware setup toggle at the top of the reboot card. The card is now called Reboot targets, since firmware setup isn't another OS.
  • With the toggle on, the power menu and launcher show Reboot to firmware setup, with shortcut F. It sits before the boot entries, matching the order in settings. Hold to confirm applies, and the action is not offered as the default selected action.
  • The shell runs systemctl reboot --firmware-setup, or loginctl reboot --firmware-setup on elogind (OpenRC, Artix, Gentoo, Void). It uses the same choice powerManagerCommand() already makes. On an active local session logind allows this without a password.
  • The toggle and action only show when the firmware supports it. The startup detect script reads bit 0 of the OsIndicationsSupported EFI variable, the same bit logind checks. The script also needs systemctl or loginctl, and the action stays hidden on BSD. Legacy BIOS boots, firmware without the feature, and setups with no logind (seatd only) never see it. The check adds one od call to the existing startup script and nothing at idle.
  • If the command fails, for example when polkit refuses it, a toast shows its error output instead of failing silently.

Known limits

  • This action skips the custom reboot command. Neither systemctl nor loginctl can set the firmware flag without also rebooting, so SessionService.reboot() cannot run afterwards the way it does for boot entries.
  • If logind sets the flag but then refuses the reboot, for example because of an inhibitor, the flag stays set and the next normal reboot opens firmware setup. Clearing it on failure looked riskier: if systemctl dies during a real shutdown it also exits non-zero, and clearing the flag then would undo the request.

Local testing

  • The detect script, pulled out of the QML and run on its own, reports support on my machine. It reports no support for a variable with the bit cleared, a truncated variable, and a missing file.
  • systemctl reboot --firmware-setup --dry-run sets logind's RebootToFirmwareSetup property to true. I cleared it afterwards.
  • run-qml.py logic and run-qml.py qt pass, the settings search index is regenerated, and the i18n term-variant check passes.
  • Ran the shell from this branch: turned on the toggle, held F in the power menu, and the machine rebooted straight into UEFI setup. The next boot was normal, and RebootToFirmwareSetup read false afterwards.
  • make lint-qml passes.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Follows #3568.

Docs: duxlabs-dev/dux-docs#181

Screenshots / video

Reboot targets card with the Firmware setup toggle off above the saved Windows Boot Manager entry Reboot targets card with the Firmware setup toggle on above the saved Windows Boot Manager entry Power menu with Reboot to firmware setup, shortcut F, above Reboot to Windows Boot Manager

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

AI assistance was used to make this pr.

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Claude review

Looks good to merge.

No issues found.
Checked: the OsIndicationsSupported detect line and how the parser reads it, firmwareSetupSupported gating (BSD, systemctl/loginctl, toggle), the firmwaresetup action in execute/data/extra actions and its F key against existing shortcuts, hold-to-confirm and default-action handling in PowerMenuContent, the launcher keywords, the failure toast Process (no idle cost), the settings card visibility, I18n strings and the regenerated search index. Model: claude-opus-5-5.

@bbedward
bbedward merged commit e50bb08 into duxlabs-dev:master Oct 23, 2026
2 checks passed
dux-ci Bot pushed a commit that referenced this pull request Oct 23, 2026
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.

2 participants