Cannot disambiguate between multiple questions with the same name
Hi,
I'm trying to use uefisettings to flip the Multi-VC (Enable/Disable Multiple Virtual Channel) option in my UEFI's settings, but because this option is present for each PCI-e root port (up to 3), the question appears three times with an identical name:
sudo ./uefisettings hii list-questions | grep -B 1 -A7 'Multi-VC'
Question {
name: "Multi-VC",
answer: "Enabled",
options: [
"Disabled",
"Enabled",
],
help: "Enable/Disable Multi Virtual Channel",
},
--
Question {
name: "Multi-VC",
answer: "Disabled",
options: [
"Disabled",
"Enabled",
],
help: "Enable/Disable Multi Virtual Channel",
},
--
Question {
name: "Multi-VC",
answer: "Disabled",
options: [
"Disabled",
"Enabled",
],
help: "Enable/Disable Multi Virtual Channel",
},
When I try to use uefisettings hii get, only the first question is returned (note only the first is Enabled):
sudo ./uefisettings hii get 'Multi-VC'
GetResponseList {
responses: [
GetResponse {
selector: "899407D7-99FE-43D8-9A21-79EC328CAC21",
backend: Backend::Hii,
question: Question {
name: "Multi-VC",
answer: "Enabled",
options: [
"Disabled",
"Enabled",
],
help: "Enable/Disable Multi Virtual Channel",
},
is_translated: false,
},
],
}
Is there any way to select the question to get/set more granularly such that I can choose the other questions?
Thanks in advance, Luke
Hello. Sorry for missing your question.
Is there any way to select the question to get/set more granularly such that I can choose the other questions?
As far as I remember, there are no such capability yet. As a workaround for get-ting, I can suggest only to use list-questions with flag -j (to get a JSON output) and use jq to filter the response. And there is no workaround for set-ting.
Pull Requests are welcomed, though :)
I can explain what needs to be done. I can also explain how to correctly interpret deactivated/grayed-out questions (to make them not appear in the lists; as it should be). But I don't have time to fix this myself in this year :(
Another (hopefully temporary) workaround could be: you can download the tool provided the vendor of you motherboard. For example, very often the proprietary variant of the tool for that is SCELNX: it does allow you make a full dump of all questions with answers, modify it, and upload back.
And one more workaround: you may change the values manually, using dd. If you are interested about this option, please let me know, I'll try to make an example how to do that.
i was the original hiitool author - iirc what we did there was have set optionally accept the name of the Form the question occurred in (though the Form names are not necessarily unique either)
@apage43 :
IIRC, hiitool also suffered from inability to distinguish duplicate questions. So, we added the support of filtering by "grayed-out"/inactive. In our practice it was a very rare case when we needed that, so this feature was not ported to uefisettings. Feel free to reach out to me directly, I can find the code change.