[REGRESSION] Failure to write the NVRAM variables starting from kernel 6.0 on T2 Macs

From: Aditya Garg
Date: Wed Oct 19 2022 - 15:26:13 EST


Starting from linux kernel 6.0, the ability to write to the NVRAM has been lost on T2 Macs.

This has been observed especially during installation of boot loaders like GRUB, causing errors as shown :-

Installing for x86_64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0001.
grub-install: warning: efivarfs_set_variable: writing to fd 7 failed: Invalid argument.
grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: Invalid argument.
grub-install: error: failed to register the EFI boot entry: Invalid argument.

I couldn't find any relevant error in journalctl though, but I still am posting my journalctl just in case I missed any error.

https://gist.github.com/AdityaGarg8/da7a9a2c891f5b2f68f71dc0d0e77f9a

Regards
Aditya