Cannot write to efivars











up vote
1
down vote

favorite












I have booted from an Ubuntu 17.10.1 live DVD on a 2011 MacBook Pro (in EFI mode) and I'm trying to issue the following command to disable the discrete GPU:



printf "x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9



And I am getting this error no matter what I do:



bash: printf: write error: Invalid argument



I know this question has been asked and answered before, but I have already verified that the efivars filesystem is mounted rw and I have removed the immutability flag with chattr -i.



I can touch the file to create it, and I can delete it with rm, but any attempt to actually write data to the file at all results in a write error, whether I use echo, printf, or try to cp or mv the file from another writeable directory. Nothing seems to work.



I have also tried this in Debian and that didn't work either.



Those that are familiar with the MacBook Pro GPU bug might suggest that I boot into single user mode and issue an nvram command from there, but the laptop does not have an operating system installed to boot into (and I can't install macOS because of the GPU).



Is there no way to write to efivars anymore?










share|improve this question






















  • Did you try booting using cmd-option-r and booting to the MacOS / internet recovery option? From there, open a terminal (it's in one of the pull downs on the first page) and you can use Apple's "nvram" command to write to the NVRAM? I haven't used this for GPU issues but did while trying to disabled the Apple "bong" on bootup after a bare metal Ubuntu install to a macbook pro7,1.
    – randy
    May 10 at 19:09















up vote
1
down vote

favorite












I have booted from an Ubuntu 17.10.1 live DVD on a 2011 MacBook Pro (in EFI mode) and I'm trying to issue the following command to disable the discrete GPU:



printf "x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9



And I am getting this error no matter what I do:



bash: printf: write error: Invalid argument



I know this question has been asked and answered before, but I have already verified that the efivars filesystem is mounted rw and I have removed the immutability flag with chattr -i.



I can touch the file to create it, and I can delete it with rm, but any attempt to actually write data to the file at all results in a write error, whether I use echo, printf, or try to cp or mv the file from another writeable directory. Nothing seems to work.



I have also tried this in Debian and that didn't work either.



Those that are familiar with the MacBook Pro GPU bug might suggest that I boot into single user mode and issue an nvram command from there, but the laptop does not have an operating system installed to boot into (and I can't install macOS because of the GPU).



Is there no way to write to efivars anymore?










share|improve this question






















  • Did you try booting using cmd-option-r and booting to the MacOS / internet recovery option? From there, open a terminal (it's in one of the pull downs on the first page) and you can use Apple's "nvram" command to write to the NVRAM? I haven't used this for GPU issues but did while trying to disabled the Apple "bong" on bootup after a bare metal Ubuntu install to a macbook pro7,1.
    – randy
    May 10 at 19:09













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have booted from an Ubuntu 17.10.1 live DVD on a 2011 MacBook Pro (in EFI mode) and I'm trying to issue the following command to disable the discrete GPU:



printf "x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9



And I am getting this error no matter what I do:



bash: printf: write error: Invalid argument



I know this question has been asked and answered before, but I have already verified that the efivars filesystem is mounted rw and I have removed the immutability flag with chattr -i.



I can touch the file to create it, and I can delete it with rm, but any attempt to actually write data to the file at all results in a write error, whether I use echo, printf, or try to cp or mv the file from another writeable directory. Nothing seems to work.



I have also tried this in Debian and that didn't work either.



Those that are familiar with the MacBook Pro GPU bug might suggest that I boot into single user mode and issue an nvram command from there, but the laptop does not have an operating system installed to boot into (and I can't install macOS because of the GPU).



Is there no way to write to efivars anymore?










share|improve this question













I have booted from an Ubuntu 17.10.1 live DVD on a 2011 MacBook Pro (in EFI mode) and I'm trying to issue the following command to disable the discrete GPU:



printf "x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9



And I am getting this error no matter what I do:



bash: printf: write error: Invalid argument



I know this question has been asked and answered before, but I have already verified that the efivars filesystem is mounted rw and I have removed the immutability flag with chattr -i.



I can touch the file to create it, and I can delete it with rm, but any attempt to actually write data to the file at all results in a write error, whether I use echo, printf, or try to cp or mv the file from another writeable directory. Nothing seems to work.



I have also tried this in Debian and that didn't work either.



Those that are familiar with the MacBook Pro GPU bug might suggest that I boot into single user mode and issue an nvram command from there, but the laptop does not have an operating system installed to boot into (and I can't install macOS because of the GPU).



Is there no way to write to efivars anymore?







command-line kernel permissions uefi






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 9 at 16:57









Wes Sayeed

1062




1062












  • Did you try booting using cmd-option-r and booting to the MacOS / internet recovery option? From there, open a terminal (it's in one of the pull downs on the first page) and you can use Apple's "nvram" command to write to the NVRAM? I haven't used this for GPU issues but did while trying to disabled the Apple "bong" on bootup after a bare metal Ubuntu install to a macbook pro7,1.
    – randy
    May 10 at 19:09


















  • Did you try booting using cmd-option-r and booting to the MacOS / internet recovery option? From there, open a terminal (it's in one of the pull downs on the first page) and you can use Apple's "nvram" command to write to the NVRAM? I haven't used this for GPU issues but did while trying to disabled the Apple "bong" on bootup after a bare metal Ubuntu install to a macbook pro7,1.
    – randy
    May 10 at 19:09
















Did you try booting using cmd-option-r and booting to the MacOS / internet recovery option? From there, open a terminal (it's in one of the pull downs on the first page) and you can use Apple's "nvram" command to write to the NVRAM? I haven't used this for GPU issues but did while trying to disabled the Apple "bong" on bootup after a bare metal Ubuntu install to a macbook pro7,1.
– randy
May 10 at 19:09




Did you try booting using cmd-option-r and booting to the MacOS / internet recovery option? From there, open a terminal (it's in one of the pull downs on the first page) and you can use Apple's "nvram" command to write to the NVRAM? I haven't used this for GPU issues but did while trying to disabled the Apple "bong" on bootup after a bare metal Ubuntu install to a macbook pro7,1.
– randy
May 10 at 19:09










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I think the command is wrong. I successfully used:



printf "x07x00x00x00x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9


Found here.



Note that in some resources the backslashes are missing (leading to the same error message).






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004619%2fcannot-write-to-efivars%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I think the command is wrong. I successfully used:



    printf "x07x00x00x00x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9


    Found here.



    Note that in some resources the backslashes are missing (leading to the same error message).






    share|improve this answer

























      up vote
      0
      down vote













      I think the command is wrong. I successfully used:



      printf "x07x00x00x00x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9


      Found here.



      Note that in some resources the backslashes are missing (leading to the same error message).






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        I think the command is wrong. I successfully used:



        printf "x07x00x00x00x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9


        Found here.



        Note that in some resources the backslashes are missing (leading to the same error message).






        share|improve this answer












        I think the command is wrong. I successfully used:



        printf "x07x00x00x00x01x00x00x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9


        Found here.



        Note that in some resources the backslashes are missing (leading to the same error message).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 1 at 20:08









        lumbric

        2,79812141




        2,79812141






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004619%2fcannot-write-to-efivars%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei