Skip to content

Conversation

@lucaspar
Copy link
Contributor

@lucaspar lucaspar commented Aug 19, 2025

What does this PR do

One of the reasons assume_yes is used is to reduce user prompts to a minimum. This prevents this prompt from fwupdmgr when updates are applied:

An update requires a reboot to complete. Restart now? [y|N]: 

Reference:

fwupdmgr update --help | grep -C 1 '\--no-reboot-check'
  --no-remote-check         Do not check if download remotes should be enabled
  --no-reboot-check         Do not check or prompt for reboot after update
  --no-safety-check         Do not perform device safety checks

Standards checklist

  • The PR title is descriptive
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself
  • If this PR introduces new user-facing messages they are translated

@GideonBear
Copy link
Member

I disagree that assume_yes should imply ignoring reboots. Instead I would prefer a solution like #1143 separating it into another configuration value, where ignoring the reboot can be the default.

However having a single option for both is probably preferred, do you agree? We should look at things like needrestart as well to unify this, having to set only a single configuration value for asking or ignoring.

I don't have the time for that right now, but I will look at it later. Thanks!

@lucaspar
Copy link
Contributor Author

lucaspar commented Aug 20, 2025

fwupdmgr doesn't offer an alternative for auto-reboot; our options are A. pass --no-reboot-check or B. require manual intervention.

Choosing B when assume_yes is enabled is not a good option IMO.

@GideonBear
Copy link
Member

fwupdmgr doesn't offer an alternative for auto-reboot; our options are A. pass --no-reboot-check or B. require manual intervention.

Does fwupdmgr create /var/run/reboot_required when you select N or pass --no-reboot-check?

@GideonBear
Copy link
Member

I just realized that firmware upgrades might actually be a different case than needrestart and Windows Updates.
During the reboot the firmware is actually flashed (I think, and an LLM tells me), which means that if you lose power during the reboot you might brick hardware. This means the user should be completely aware a firmware update is happening when they reboot. So I think --no-reboot-check should actually be only under a completely separate option (something like fwupd_ignore_reboot). ("should" completely based on my assumptions)
This is not at all the case for needrestart since Linux kernel updates and the like don't happen during a restart. Windows updates do, but are 1. basically safe to kill ("don't turn off your computer" is basically a myth, especially if you compare it to the real danger of mobo UEFI flashes), 2. probably more known by users, and 3. always clearly show "do not turn off your computer", while I wouldn't be surprised if a firmware upgrade is just a black screen.

Lmk what you think!

@lucaspar
Copy link
Contributor Author

yes, that makes sense to me

@GideonBear
Copy link
Member

If you want, you can edit this PR to do add this as a config option (like [fwupd] ignore_reboot) with clear documentation that this could be dangerous.

@GideonBear GideonBear mentioned this pull request Sep 8, 2025
@GideonBear
Copy link
Member

Opened #1299

@GideonBear GideonBear changed the title Firmware updates: not prompting for reboot when assume_yes feat(fwupdmgr): not prompting for reboot when assume_yes Nov 2, 2025
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