On Linux, I can edit the efivars of my MacBookPro via /sys/firmware/efi/efivars/
. E.g. here is a description to disable the AMD GPU via the efivars, which basically is this on Linux:
printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
Is it possible to edit the efivars directly on MacOSX? I still can sometimes boot to OSX, so I wonder if I need to use Linux for this or if I can directly edit them with some OSX tools.