Skip to content

Introduction

This page describes how to use the iGPU on MacBookPro's with Hybrid Graphics (2 GPUs). 13 inch MacBooks only have an iGPU, and do not need this. Using the iGPU means you can save power by putting the more powerful AMD dGPU in a low power state when you don't need it.

This has been tested on the MacBookPro16,1 and the MacBookPro15,1. The 15,3 and 16,4 models are very similar and should work too.

Make sure you have a t2 kernel of version greater than 6.6.2-2 (you can check this with uname -r).

Issues

If you experience system freezes, then the laptop's fans becoming loud, before the whole computer shuts off (CPU CATERR), or if the amdgpu is making the computer too hot, consider trying:

  1. Set iGPU as main gpu (instructions below)

  2. Set AMD GPU Dynamic Power Management from auto to low or high. Low can be safer option to avoid thermal issues or save battery.

    You can test it quickly with: echo low | sudo tee /sys/bus/pci/drivers/amdgpu/0000:0?:00.0/power_dpm_force_performance_level

    To apply the low level automatically, create /etc/udev/rules.d/30-amdgpu-pm.rules file with the following contents:

    KERNEL=="card0", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="low"
    

    To check which card is the amdgpu, we can run:

    basename /sys/bus/pci/drivers/amdgpu/0000:0?:00.0/drm/card?
    

    You can also control the AMD GPU DPM with GUI tools such as radeon-profile. For GPU intensive tasks like playing games, machine learning or rendering you can try setting the DPM to high instead.

Enabling the iGPU

  1. Configue apple-gmux to switch to the IGPU at boot

    1. Create /etc/modprobe.d/apple-gmux.conf with the following contents:

      # Enable the iGPU by default if present
      options apple-gmux force_igd=y
      
  2. Add apple_set_os as a kernel parameter to make Apple's firmware show the iGPU so that apple-gmux will be able to switch to it.

glxinfo | grep "OpenGL renderer" should show an Intel GPU. Running programs with DRI_PRIME=1 will make them render on your AMD GPU (some things do this automatically). You will get more battery time now as your AMD GPU can be turned off when not needed.

MacBookPro16,4

Currently the Radeon 5600M AMD GPU on MacBookPro16,4 is not working with Linux. As a workaround:

If you are able to edit your kernel command line:

  1. Edit the kernel command line of this boot and add the nomodeset kernel parameter. This will enable you to access your Linux system in safe graphics.

  2. Follow the instructions above.

  3. You can now remove the nomodeset parameter from your kernel command line.

If you are unable to edit your kernel command line:

  1. Boot into macOS

    1. Mount your Linux EFI partition over there. In most cases it should be disk0s1 and can be mounted by running sudo diskutil mount disk0s1 in the terminal. If you are using a separate EFI partition, the you can run diskutil list and find your partition in the output, and mount it accordingly.

    2. Install apple-os-set loader from here using macOS, and put it in your Linux EFI partition.

  2. Restart into macOS Recovery by immediately pressing and holding Command+R on startup.

    1. Open the terminal there and run nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00.
  3. Restart into Linux. You should now be able to access your Linux installation.

  4. Follow the instructions above.

  5. Remove apple-os-set loader.

Use on Windows

The iGPU only works on Windows if there's no driver for it installed. Windows likes installing drivers.

If you want to switch GPU for Windows, use 0xbb's gpu-switch script.

VFIO GPU passthrough

Refer to this gist for quirks required to pass through the dGPU to a Windows Virtual Machine, while having Linux use the iGPU.