From d2ba75b421d4878a4afa61d1c884a1b95aa4f39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Eikmeyer?= Date: Sun, 21 Jun 2026 17:23:54 +0200 Subject: [PATCH 1/4] clarifies force igd and adds dgpu disable --- docs/guides/hybrid-graphics.md | 65 ++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/docs/guides/hybrid-graphics.md b/docs/guides/hybrid-graphics.md index b50a9bc6..11835225 100644 --- a/docs/guides/hybrid-graphics.md +++ b/docs/guides/hybrid-graphics.md @@ -24,7 +24,10 @@ If you experience system freezes followed by high fan speeds and sudden shutdown You can also control the AMD GPU DPM with GUI tools such as [radeon-profile](https://github.com/emerge-e-world/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 +## Making the iGPU the primary display adapter + +By default T2 Macs with hybrid graphics use the dGPU as primary display adapter, which in return requires the dGPU to be always powered on. +To save energy and reduce battery consumption, we can force the iGPU to be the primary display adapter and default graphics accelerator in a first step. 1. Configure apple-gmux to switch to the iGPU at boot @@ -34,8 +37,66 @@ If you experience system freezes followed by high fan speeds and sudden shutdown # Enable the iGPU by default if present options apple-gmux force_igd=y ``` + 2. Or alternatively, add kernel parameter `apple_gmux.force_igd=1` + +After reboot `glxinfo | grep "OpenGL renderer"` should show an Intel GPU. Running programs with `DRI_PRIME=1` will make them render on your AMD GPU. On Gnome, by right clicking an application you can choose to run it using dedicated graphics. + +## Disabling the dGPU + +We can take this a step further and save substantial amounts of energy by deactivating the discrete graphics card. + +1. We will create a systemd unit that will use `vgaswitcheroo` to disable the discrete graphics card on boot. Enter the full codeblock below and execute it. + + ``` + sudo tee /etc/systemd/system/amdgpu-off.service >/dev/null <<'EOF' + [Unit] + Description=Disable AMD dGPU via vgaswitcheroo + After=systemd-modules-load.service + Before=display-manager.service + + + [Service] + Type=oneshot + ExecStart=/bin/sh -c 'for i in $(seq 1 30); do [ -e /sys/kernel/debug/vgaswitcheroo/switch ] && exec sh -c "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch"; sleep 1; done; exit 1' + + [Install] + WantedBy=multi-user.target + EOF + + sudo systemctl daemon-reload + sudo systemctl enable amdgpu-off.service + ``` + We can now run `sudo systemctl enable amdgpu-off.service` and reboot to disable our dGPU. This will decrease power draw on a MacBook significantly from around 20 to 9 Watts on idle using 50% display brightness, resulting in much longer battery life. + Enabling the dGPU again is done using `sudo systemctl disable amdgpu-off.service` and reboot. A more convenient solution using aliases is explained in the next step. + +2. We can quickly disable, enable and check the current status of the dGPU by creating aliases. Simply execute the following block: + + ``` + alias dgpu-off='sudo systemctl enable disable-amdgpu.service; sleep 2; sudo reboot' + alias dgpu-on='sudo systemctl disable disable-amdgpu.service; sleep 2; sudo reboot' + alias dgpu-status='sudo cat /sys/kernel/debug/vgaswitcheroo/switch' + ``` + From now on you can check the status of the dGPU by simply entering `dgpu-status` : + + ``` + $ dgpu-status + 0:DIS-Audio: :DynOff:0000:01:00.1 + 1:IGD:+:Pwr:0000:00:02.0 + 2:DIS: :Off:0000:01:00.0 + ``` + `IGD` is the iGPU and `DIS` is the dGPU. The position of the `+` shows the GPU currently in use as the display adapter, while `Pwr` and `Off` refer to their respective power status. + Executing the aliases `dgpu-off` and `dgpu-on` will enable and disable our `amdgpu-off` systemd service and reboot the computer. + + **Example:** Given the status above, executing `dgpu-on` will reboot your Mac. After reboot `dgpu-status` should be: + + ``` + $ dgpu-status + 0:DIS-Audio: :DynAuto:0000:01:00.1 + 1:IGD:+:Pwr:0000:00:02.0 + 2:DIS: :Pwr:0000:01:00.0 + ``` + -`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. ### Suspend workaround From 3ba9b85f35036fd0945a3c869a488d9766521742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Eikmeyer?= Date: Sun, 21 Jun 2026 17:32:40 +0200 Subject: [PATCH 2/4] adds blank lines around code blocks --- docs/guides/hybrid-graphics.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/guides/hybrid-graphics.md b/docs/guides/hybrid-graphics.md index 11835225..a7ce77bc 100644 --- a/docs/guides/hybrid-graphics.md +++ b/docs/guides/hybrid-graphics.md @@ -37,6 +37,7 @@ To save energy and reduce battery consumption, we can force the iGPU to be the p # Enable the iGPU by default if present options apple-gmux force_igd=y ``` + 2. Or alternatively, add kernel parameter `apple_gmux.force_igd=1` After reboot `glxinfo | grep "OpenGL renderer"` should show an Intel GPU. Running programs with `DRI_PRIME=1` will make them render on your AMD GPU. On Gnome, by right clicking an application you can choose to run it using dedicated graphics. @@ -47,7 +48,7 @@ We can take this a step further and save substantial amounts of energy by deacti 1. We will create a systemd unit that will use `vgaswitcheroo` to disable the discrete graphics card on boot. Enter the full codeblock below and execute it. - ``` + ```plain sudo tee /etc/systemd/system/amdgpu-off.service >/dev/null <<'EOF' [Unit] Description=Disable AMD dGPU via vgaswitcheroo @@ -66,30 +67,33 @@ We can take this a step further and save substantial amounts of energy by deacti sudo systemctl daemon-reload sudo systemctl enable amdgpu-off.service ``` + We can now run `sudo systemctl enable amdgpu-off.service` and reboot to disable our dGPU. This will decrease power draw on a MacBook significantly from around 20 to 9 Watts on idle using 50% display brightness, resulting in much longer battery life. Enabling the dGPU again is done using `sudo systemctl disable amdgpu-off.service` and reboot. A more convenient solution using aliases is explained in the next step. 2. We can quickly disable, enable and check the current status of the dGPU by creating aliases. Simply execute the following block: - ``` + ```plain alias dgpu-off='sudo systemctl enable disable-amdgpu.service; sleep 2; sudo reboot' alias dgpu-on='sudo systemctl disable disable-amdgpu.service; sleep 2; sudo reboot' alias dgpu-status='sudo cat /sys/kernel/debug/vgaswitcheroo/switch' ``` + From now on you can check the status of the dGPU by simply entering `dgpu-status` : - ``` + ```plain $ dgpu-status 0:DIS-Audio: :DynOff:0000:01:00.1 1:IGD:+:Pwr:0000:00:02.0 2:DIS: :Off:0000:01:00.0 ``` + `IGD` is the iGPU and `DIS` is the dGPU. The position of the `+` shows the GPU currently in use as the display adapter, while `Pwr` and `Off` refer to their respective power status. Executing the aliases `dgpu-off` and `dgpu-on` will enable and disable our `amdgpu-off` systemd service and reboot the computer. **Example:** Given the status above, executing `dgpu-on` will reboot your Mac. After reboot `dgpu-status` should be: - ``` + ```plain $ dgpu-status 0:DIS-Audio: :DynAuto:0000:01:00.1 1:IGD:+:Pwr:0000:00:02.0 From 417d49262e478ad1fd7b8bf5976e8207a7fd5ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Eikmeyer?= Date: Sun, 21 Jun 2026 17:42:19 +0200 Subject: [PATCH 3/4] removes trailing spaces --- docs/guides/hybrid-graphics.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/guides/hybrid-graphics.md b/docs/guides/hybrid-graphics.md index a7ce77bc..c2bea18d 100644 --- a/docs/guides/hybrid-graphics.md +++ b/docs/guides/hybrid-graphics.md @@ -26,7 +26,7 @@ If you experience system freezes followed by high fan speeds and sudden shutdown ## Making the iGPU the primary display adapter -By default T2 Macs with hybrid graphics use the dGPU as primary display adapter, which in return requires the dGPU to be always powered on. +By default T2 Macs with hybrid graphics use the dGPU as primary display adapter, which in return requires the dGPU to be always powered on. To save energy and reduce battery consumption, we can force the iGPU to be the primary display adapter and default graphics accelerator in a first step. 1. Configure apple-gmux to switch to the iGPU at boot @@ -68,8 +68,8 @@ We can take this a step further and save substantial amounts of energy by deacti sudo systemctl enable amdgpu-off.service ``` - We can now run `sudo systemctl enable amdgpu-off.service` and reboot to disable our dGPU. This will decrease power draw on a MacBook significantly from around 20 to 9 Watts on idle using 50% display brightness, resulting in much longer battery life. - Enabling the dGPU again is done using `sudo systemctl disable amdgpu-off.service` and reboot. A more convenient solution using aliases is explained in the next step. + We can now run `sudo systemctl enable amdgpu-off.service` and reboot to disable our dGPU. This will decrease power draw on a MacBook significantly from around 20 to 9 Watts on idle using 50% display brightness, resulting in much longer battery life. + Enabling the dGPU again is done using `sudo systemctl disable amdgpu-off.service` and reboot. A more convenient solution using aliases is explained in the next step. 2. We can quickly disable, enable and check the current status of the dGPU by creating aliases. Simply execute the following block: @@ -79,7 +79,7 @@ We can take this a step further and save substantial amounts of energy by deacti alias dgpu-status='sudo cat /sys/kernel/debug/vgaswitcheroo/switch' ``` - From now on you can check the status of the dGPU by simply entering `dgpu-status` : + From now on you can check the status of the dGPU by simply entering `dgpu-status` : ```plain $ dgpu-status @@ -87,11 +87,11 @@ We can take this a step further and save substantial amounts of energy by deacti 1:IGD:+:Pwr:0000:00:02.0 2:DIS: :Off:0000:01:00.0 ``` - - `IGD` is the iGPU and `DIS` is the dGPU. The position of the `+` shows the GPU currently in use as the display adapter, while `Pwr` and `Off` refer to their respective power status. - Executing the aliases `dgpu-off` and `dgpu-on` will enable and disable our `amdgpu-off` systemd service and reboot the computer. - - **Example:** Given the status above, executing `dgpu-on` will reboot your Mac. After reboot `dgpu-status` should be: + + `IGD` is the iGPU and `DIS` is the dGPU. The position of the `+` shows the GPU currently in use as the display adapter, while `Pwr` and `Off` refer to their respective power status. + Executing the aliases `dgpu-off` and `dgpu-on` will enable and disable our `amdgpu-off` systemd service and reboot the computer. + + **Example:** Given the status above, executing `dgpu-on` will reboot your Mac. After reboot `dgpu-status` should be: ```plain $ dgpu-status @@ -100,8 +100,6 @@ We can take this a step further and save substantial amounts of energy by deacti 2:DIS: :Pwr:0000:01:00.0 ``` - - ### Suspend workaround If using the iGPU causes the screen to be black after waking up from suspend, then try one of these workarounds: From 15c7f876041d1b6c755527e0b89e5e3347ecdcef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Eikmeyer?= Date: Sun, 21 Jun 2026 17:45:16 +0200 Subject: [PATCH 4/4] removes even more trailing stuff.... --- docs/guides/hybrid-graphics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/hybrid-graphics.md b/docs/guides/hybrid-graphics.md index c2bea18d..6388dd50 100644 --- a/docs/guides/hybrid-graphics.md +++ b/docs/guides/hybrid-graphics.md @@ -86,7 +86,7 @@ We can take this a step further and save substantial amounts of energy by deacti 0:DIS-Audio: :DynOff:0000:01:00.1 1:IGD:+:Pwr:0000:00:02.0 2:DIS: :Off:0000:01:00.0 - ``` + ``` `IGD` is the iGPU and `DIS` is the dGPU. The position of the `+` shows the GPU currently in use as the display adapter, while `Pwr` and `Off` refer to their respective power status. Executing the aliases `dgpu-off` and `dgpu-on` will enable and disable our `amdgpu-off` systemd service and reboot the computer. @@ -98,7 +98,7 @@ We can take this a step further and save substantial amounts of energy by deacti 0:DIS-Audio: :DynAuto:0000:01:00.1 1:IGD:+:Pwr:0000:00:02.0 2:DIS: :Pwr:0000:01:00.0 - ``` + ``` ### Suspend workaround