edit efivars on MacOSX 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" &gt; /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.

(Related questions: here, here)
Yes and no.

Full access to all efivars is not that feasible or easy in macOS / from OS X.

But if you want to achieve the goals from the link and command you cited then go here please: GPU problem - Boot Hangs on Grey Screen 

There you will find the equivalent for a pure Mac environment:

nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00


Read the whole guide, though. It's still a bit of a dance to apply that variable and manage the consequences of it.