Skip to content

Cannot disambiguate between multiple questions with the same name #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lwfitzgerald opened this issue Feb 26, 2025 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@lwfitzgerald
Copy link

lwfitzgerald commented Feb 26, 2025

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

@xaionaro
Copy link
Member

xaionaro commented May 24, 2025

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 AFULNX: 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.

@xaionaro xaionaro added the enhancement New feature or request label May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants