Dual GPU Mac (iMac mid-2015) driver issues
System details
iMac mid-2015
What's wrong?
Pulled from Discord.
Baseline Omarchy is still busted on my iMac mid-2015 and MacbookPro 2012; there's still a graphics driver issue in Omarchy 3.0.1 that causes chromium/brave glitching when the ozone wayland flags are set for chromium/brave and when the wrong graphics drivers are loaded, which they apparently are by default. This portion of script helps fix that:
https://github.com/cometaj2/config/blob/master/omarchy/mac/install.sh#L146
There's a more complex analysis in there to load the correct drivers out of the box bottom up (additively as a one-shot) rather than subtractively after the fact and that may in fact be an arch linux angle rather than an Omarchy angle?
Graphics section fix is now here: https://github.com/cometaj2/config/blob/434a9547f27883cb4a408c34028c350fcf12a3db/omarchy/mac/install.sh#L189
I'm trying to trouble shoot a similar problem with graphical glitches and hard locks on chromium/electron apps on a 2015 macbook pro with integrated intel and discrete amd gpus.
I've done the same steps as your script, but manually. As a result, this loads the amdgpu module first rather than what was previously happening with the radeon module being used.
Unfortunately, it seem amdgpu doesn't know how to initialize and drive the laptop's apple display. On a reboot that remains blank, but with an external display connected that does work. The good news is chromium can run without disabling the gpu, but I still see errors when running the electron 37, 1Password, or Signal desktop apps. All this is without commenting out the ozone-platform lines in chromium-flags.conf.
As a result, I've gone back to using the radeon module and disabling the gpu where ever possible to at least have a working environment.
Specs:
- MacBookPro 11,5 (1.0)
- Intel Corporation Crystal Well Integrated Graphics Controller (rev 08)
- Advanced Micro Devices, Inc. [AMD/ATI] Venus XT [Radeon HD 8870M / R9 M270X/M370X] (rev 83) -- Apple lists as R9 M370X
- Omarchy v3.0.1
@rshurts Yeah, hybrid graphics seems more complicated to handle/configure in general. I ended up having to use gpu-switch -i to force the use of the integrated card on my MacBook Pro 2012 since I couldn't get the discrete card to work properly.
A combination of changing the default drivers, adding driver configuration, removing wayland ozone flags and setting gpu-switch -i (integrated only) did the trick for me (no glitching in browser, and Steam games seem to work just fine with full driver support).
Interestingly, I think that your MacBook Pro 2015 is more akin to my iMac 2015 configuration in terms of drivers and config, except that you also have the hybrid graphics to deal with. So maybe a mix of both approaches would do it in your context?
So I'm thinking:
1- Setup iMac 2015 like drivers 2- Configure them the same way (file drop) 3- gpu-switch -i like switch to force the use of integrated only 4- remove all wayland ozone flags for chromium/brave
I ended up finding this guide and following some of the steps: https://dev.to/x1unix/archlinux-setup-guide-for-intel-macbook-pro-58b8. I'm not sure everything I did is necessary and I'm still trying to figure out if there is a great way to determine which gpu is in use at any time, but all the apps are currently launching error free.
I did the following:
Setup power management
In /etc/udev/rules.d/30-amdgpu-pm.rules add
ACTION=="add", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power/control}="auto"
ACTION=="add", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="low"
Add kernel modules
This results in amdgpu being the primary driver.
In /etc/modprobe.d/amdgpu.conf add
options amdgpu modeset=0
options amdgpu enable_psr=1
options amdgpu si_support=1
options amdgpu cik_support=0
options amdgpu runpm=1
In /etc/modprobe.d/radeon.conf add
options radeon si_support=0
options radeon cik_support=0
options radeon runpm=1
In /etc/modprobe.d/i915.conf add
options i915 enable_psr=1
options i915 enable_fbc=1
options i915 enable_dc=1
Run sudo mkinitpio -P
Use gpu switch to set integrated gpu
run sudo gpu-switch -i
Reboot
I think the key is gpu-switch -i. Since I doubt I'll be doing gaming, I think my best bet is to follow the instructions for writing a service and just powering off the amd gpu to save on battery, but I'll probably leave things as is for now to see what happens.
Disabling the dGPU is not a great solution, at least on an iMac 17,1, as it results in noticeably poorer performance and high CPU load. Forcing chromium to use x11 is one workaround that helped for me.
I was able to fix issue as @benlinzel mentioned by changing chromium-flags.conf to:
--ozone-platform=x11
--enable-features=TouchpadOverscrollHistoryNavigation
--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url
I have exactly the same radeon as @rshurts
It turns out the minimal working fix is actually adding the flag --use-gl=desktop to ~/.config/chromium-flags.conf
Older AMD GPUs (BONAIRE architecture) have poor Vulkan support. Chromium's ANGLE layer tries to use Vulkan and fails. --use-gl=desktop tells Chromium to skip ANGLE and use native OpenGL directly.
You can check if this applies in your case by running:
glxinfo | grep "OpenGL renderer"
The fix is to apply this to chromium and electon-based app configs. It might not be possible to solve it at the OS-level, but hopefully this helps anyone else who encounters this issue.
@benlinzel your solution worked finally with my iMac 2015 27inch! I highly appreciate it
Just installed Omarchy 3.1.3 on an iMac12,2 with graphics card as indicated by fastfetch:
- AMD Radeon HD 6730M/6770M/7690M XT (not sure which one it actually is, but that's what fastfetch lists)
- Intel 2nd Generation Core Processor Family Integrated Graphics
I just added --use-gl=desktop to ~/.config/chromium-flags.conf and it fixed the glitches and freezes for Chromium.
But the other electron apps, notably Obsidian and Typora still glitch and have completely garbled windows. How to apply this fix or workaround so that it applies to all electron instances and not just chromium?
Any help appreciated, thanks in advance!
Fresh install of Omarchy 3.1.5 on a MacBookPro15,1 here No issue so far with Chromium but it seems that all Electron-based apps are glitchy and unusable Like @SnapshotCiTy I am looking for a solution to get things working Any help is appreciated
Experiencing same issue here. Chromium and all other web apps glitching (and are unusable) on a fresh install on a mid-2015 Macbook Pro. Further information on my system: PC: MacBook Pro (Retina, 15-inch, Mid 2015) (1.0) │ ├: Intel(R) Core(TM) i7-4870HQ (8) @ 3.70 GHz │ ├: AMD Radeon R9 M370X │ ├: Intel Crystal Well Integrated Graphics Controller @ 1.20 GHz [Integrated] │ ├: 2880x1800 @ 2x in 15", 60 Hz [Built-in] │ ├: 17.39 GiB / 463.90 GiB (4%) - btrfs │ ├: 2.11 GiB / 15.49 GiB (14%) └ └: 0 B / 4.00 GiB (0%)
On mid-2015 Macbook Pro, adding --use-gl=desktop to ~/.config/chromium-flags.conf fixed the Chromium graphical glitches (and crashing).
I tried doing something similar for the Electron apps. Copying chromium-flags.conf to a file named typora-flags.conf fixed Typora's graphical glitches. I couldn't get this to work for 1Password or Signal.
What worked for me to fix Obsidian on a 2019 MacBook Pro 15" i9 + AMD was to put --use-gl=desktop into a file called ~/.config/electron-flags.conf. Maybe works for other electron based apps too that don't pick up their own special flags file?
Thanks @wolfgangrittner. The electron-flags.conf file fixed Obsidian on mid-2015 Macbook Pro.
It did not fix 1Password and Signal.
Hey folks,
I just installed Omarchy, and I immediately encountered Chromium graphics flickering and glitching especially when resized, and then eventually the display went black.
From my previous experience with getting Omakub working on my 15" 2015 MBP, I found that disabling iGPU was necessary. This is the opposite of what you folks seem to be trying to do.
Anyways, I added intel_iommu=igfx_off to the /etc/default/limine file
KERNEL_CMDLINE[default]+="rw quiet intel_iommu=igfx_off"
then I ran sudo limine-update
Seems to work flawlessly now, including the screensaver which wasn't showing up before.
P.S. I'm not entirely sure if this is the best way to disable the iGPU, so if you know of a better way let me know. Ideally without having to install anything that Omarchy doesn't already come with perhaps. Thanks.
TL;DR - disable iGPU to make 15" 2015 MBP that has dGPU work.