How to Install Linux on a 2015 MacBook Pro A1398 (Dual Graphics)
tl;dr just don't do it
Give up. Buy a single GPU MacBook or a ThinkPad.
#!/The Problem
$ On a 2015 MacBook Pro A1398 with dual GPUs, installing any OS other than macOS causes the Apple UEFI to disable the integrated Intel GPU, leaving only the dedicated Radeon GPU. This results in two main issues:
$ Battery life: I benchmarked the battery performance by playing a YouTube video. On macOS, the battery lasted 4 hours and 15 minutes. On Ubuntu 22.04, the battery lasted only 1 hour and 38 minutes. For typical office work using a browser and an IDE, the battery lasted less than 1 hour.
$ Graphical issues and artifacts: Debian 12 was unusable for me. While the installer worked fine, the system was plagued with invisible or transparent windows after booting, making it unusable. This was likely due to missing drivers. Fixing it was difficult as the terminal background and font were white, and the settings menu was invisible.
$ Third reason: various issues that made the system unstable. Closing the lid to put the system to sleep was problematic; Ubuntu couldn't handle it and would crash. There were sound glitches, and the system could not recover after being put to sleep. The speakers were much quieter on Ubuntu compared to macOS. Sometimes there were booting issues where the disks were not detected, and the ACPI tables could not be found.
#!/rEFInd
$ rEFInd is a boot manager that tricks the system into thinking you are launching macOS when you are actually launching Linux. This resolved most graphical problems for me. Ubuntu detected both graphics cards, but I could not switch between them using third-party software like gpu-switch.
$ After installing rEFInd, go to /boot/efi/EFI/refind/refind.conf and add the line spoof_osx_version 12.7.3. After rebooting, you will see a new OS selection screen. Once you load Linux, both graphics cards should be available. You can verify this by running a command lscpi | grep VGAs
/boot/efi/EFI/refind/refind.conf
spoof_osx_version 12.7.3
lscpi | grep VGA
#!/gpu-switch
$ There is a software tool called gpu-switch that allows you to switch between the dedicated and integrated GPUs. However, it did not work for me.
$ Be careful when using this tool. If you end up in a situation where Apple has disabled one GPU and you disable the other by switching, you may end up with a black screen and a bricked device. Watch your step.
#!/Links
$ Here are some link, you may find helpfull in this journey.
> askubuntu/intel-amd-hybrid-graphics-ubuntu-18-04
> ubuntuforums/2409856
> azagramac
> archlinux/284687s
> apple-set-os
> gpu-switch
> gSwitch
> rEFInd