linuxboot / linuxboot/uefisettings

Dealing with "provided value did not match any possible option"

Open
#2 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
95
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Thanks for this tool. I'm trying to change my BIOS setting to restore power after external power is lost (it's a remote server, so it is difficult to go hook up a KB and monitor to do this).

The server is running an Asrock AB350 motherboard, and I can see a few relevant parameters in the output of `uefisettings hii show-ifr`:

```
OpCode: Form
OpCode: Subtitle - S:
OpCode: EqIdVal
OpCode: OneOf - Q: Restore On AC Power Loss - Help: Restore Status On AC Power Loss
-Range8(Range8 { min_value: 1, max_value: 2, step: 0 })
-Answer: Unknown
OpCode: OneOfOption - S: Power On
-ValueType:0
-Value:NumSize8(1)
OpCode: OneOfOption - S: Power Off
-ValueType:0
-Value:NumSize8(2)
OpCode: OneOf - Q: GPIO Devices Support - Help: Enable/Disable GPIO ACPI Devices Support, disable it will disable i2C and uart interface device.
-Range8(Range8 { min_value: 1, max_value: 255, step: 0 })
-Answer: Unknown
OpCode: OneOfOption - S: Enabled
-ValueType:0
-Value:NumSize8(1)
OpCode: OneOfOption - S: Auto
-ValueType:0
-Value:NumSize8(255)
```

Likewise, in the `list-strings` output, I see that `"Restore On AC Power Loss"` as well:

```
469: "Restore On AC Power Loss",
470: "Restore Status On AC Power Loss",
```

If I get that value, it gives the following output:

```
$ sudo uefisettings hii get "Restore On AC Power Loss"
GetResponseList {
responses: [
GetResponse {
selector: "899407D7-99FE-43D8-9A21-79EC328CAC21",
backend: Backend::Hii,
question: Question {
name: "Restore On AC Power Loss",
answer: "Unknown",
options: [],
help: "Restore Status On AC Power Loss",
},
is_translated: false,
},
],
}
```

But if I try to set the value to one of the options indicated by `show-ifr`, I get an error:

```
$ sudo uefisettings hii set "Restore On AC Power Loss" "Power On"
{"error_message":"provided value did not match any possible option"}
```

I assume this is because there are no options allowed in the `Question` output above. Is there any way to set this value on my motherboard, or is this just likely unsupported?

Thanks for your help.

This is on a Linux (TrueNAS scale) system:

```
$ uname -a
Linux truenas 6.1.55-production+truenas #2 SMP PREEMPT_DYNAMIC Tue Oct 31 16:07:08 UTC 2023 x86_64 GNU/Linux
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with `uefisettings hii show-ifr`, `hii get`, and `hii set` for `Restore On AC Power Loss` on the reported motherboard. Trace how the HII question options are exposed and validated, then determine whether the command can set the firmware value or should report it as unsupported; done means the behavior is clarified or a reproducible fix is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.