omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Pre-T2 15-inch dGPU stuck at full power with no power interface (MacBookPro11,4/11,5)

Open rand0mdud3 opened this issue 2 months ago • 10 comments

Hardware

MacBookPro11,5 (2015, pre-T2, dual GPU: Intel Iris Pro + AMD Venus XT R9 M370X). Both kernel drivers for the dGPU (amdgpu, radeon) are blacklisted (the stock-suspend workaround), so the discrete GPU has no driver:

01:00.0 VGA compatible controller: AMD Venus XT [Radeon HD 8870M / R9 M370X/M370X] (rev 83)
driver: (none bound)
power_state: D0
power/control: on
power/runtime_status: active
d3cold_allowed: 1

No vgaswitcheroo (kernel has CONFIG_VGA_SWITCHEROO=y, but nothing registers a handler with the dGPU driverless), so there is no OFF/IGD switch, no DRI_PRIME, no runtime PM -- the card sits in D0 burning power permanently, and nothing in Omarchy can query or idle it.

The actual problem: a forced tradeoff with no documented side

On 11,4/11,5 today you get exactly one of:

  • Blacklist the dGPU drivers -> suspend/resume works, but the card burns power in D0 forever with zero power interface. This is the configuration above.
  • Stock drivers -> vgaswitcheroo and PM controls exist in principle, but suspend/resume is broken (resume never comes back; see #11351 for the neighboring failure mode), so the machine can't sleep.

There is no path to both, and Omarchy documents neither side: no quirk, no manual tradeoff note, nothing. Neighboring generations at least have half a story each (#6929 for hybrid T2, #7196 idling the 2016-2017 Radeon, #10826 working around 01:00.0 being the dGPU on dual-GPU boards).

What unblocks it

Any dGPU power quirk is blocked on the stock-suspend root cause: power control requires a bound driver, and a bound driver currently costs working suspend. The prerequisite work is diagnosing why resume dies stock on 11,x; only then can a power quirk (vgaswitcheroo OFF, runtime PM) be built and measured (battery discharge before/after).

Options (for the maintainer's call)

  • Document the tradeoff in the Mac support manual so 11,4/11,5 owners choose knowingly.
  • Take the stock-suspend diagnosis as the prerequisite project, power quirk to follow.
  • Deliberate wontfix: 2015 hardware, limited runway.

I have this 11,5 on hand for measurement, quirk iteration, or docs confirmation. Related: #6929, #7196, #10826, #11351.

rand0mdud3 avatar Sep 11 '26 22:09 rand0mdud3

Experimental results from this 11,5 (all reverted afterwards; machine back on its blacklist setup):

  1. Supplier theory CONFIRMED: with fw_devlink=off, amdgpu binds the dGPU on boot (not radeon -- amdgpu wins the chip with default -1/-1 flags) and vgaswitcheroo appears: IGD:+:Pwr, DIS: :Pwr, DIS-Audio DynOff. The waiting_for_supplier block was the entire reason no driver ever bound.

  2. The power win is NOT reachable that way: echo OFF to the DIS switch turned the screen off and hard-hung the machine (force reboot required). The mux/HDA-audio coupling on this board does not tolerate the power cut, at least under amdgpu. Untried: radeon + OFF (the historically-correct combo for 2015 Macs; dmesg itself suggests radeon.si_support=1 amdgpu.si_support=0), left for a braver day.

  3. Also learned along the way: this machine carries TWO blacklists, not one -- KERNEL_CMDLINE module_blacklist=amdgpu,radeon (limine drop-in) AND blacklist lines in /etc/modprobe.d/disable-amd-dgpu.conf. Removing only the first changes nothing, and si_support/cik_support flags are moot while the supplier block stands.

So the tradeoff in this issue stands, sharpened: blacklist = working suspend + D0 forever; stock path = bindable-only with fw_devlink=off (debug-grade, not shippable) + OFF hangs. A shippable quirk would need the radeon+OFF combination proven safe first.

rand0mdud3 avatar Sep 11 '26 23:09 rand0mdud3

Full experimental record, all reverted afterwards (machine back on its blacklist setup):

  • fw_devlink=off lets a driver bind (supplier theory proven): amdgpu takes the chip with default flags, vgaswitcheroo appears (IGD:+:Pwr, DIS: :Pwr).
  • amdgpu is unusable here beyond binding: echo OFF hung the screen into a force reboot, and a later session froze minutes in with amdgpu merely loaded. Matches the GCN1.0 flakiness in #4069.
  • radeon via si_support arbitration binds cleanly (initialized 2.51.0, zero errors) -- the better driver, as far as binding goes.
  • But runpm=1 never suspends it: two minutes idle stays active/D0. Blockers visible: Hyprland/Xwayland/logind hold the DRM nodes open, and autosuspend reads back EIO. Unloading live is impossible (in use), so runpm needs a reboot per attempt.
  • Net: no parkable configuration found. Bound+D0 (radeon, suspend broken) vs blacklisted+D0 (suspend works) is power-neutral, so the blacklist wins and the tradeoff in this issue stands as the steady state. The remaining untested branch is radeon+OFF, deliberately not attempted after the amdgpu OFF hang.

rand0mdud3 avatar Sep 11 '26 23:09 rand0mdud3

Correction to the supplier theory above: reverse-proof failed. With fw_devlink=off removed (si arbitration only, no blacklists), radeon binds at boot anyway, switcheroo registers (IGD:+:Pwr, DIS: :Pwr), and waiting_for_supplier is absent. So the flag is NOT necessary, and the original stuck-supplier observation was likely stale fallout from the blacklist era carried across warm reboots rather than a standing block. Current steady state is cleaner for it: si flags alone, one experimental knob instead of two.

rand0mdud3 avatar Sep 12 '26 17:09 rand0mdud3

Update: suspend/resume works with radeon bound (si arbitration, no blacklists, no fw_devlink flag). Two lid cycles: 2s suspend entry, ~1s kernel resume, session intact. The 30s the user feels is panel re-init plus lock-screen flow, all underneath already running. So the tradeoff in this issue narrows further: the only remaining cost of the unblacklisted setup found so far is Wi-Fi needing the reload hook, which fired correctly here.

rand0mdud3 avatar Sep 12 '26 17:09 rand0mdud3

Driver-arbitration half shipped as PR #11548 (related, not closing -- power still open): limine drop-in pinning radeon.si_support=1 amdgpu.si_support=0 on MacBookPro11,5, with migration (change-guarded rebuild) and tests. Proven live here across boots and lid cycles. My machine now runs the PR-named file instead of the experiment drop-in, so a future update converges exactly.

rand0mdud3 avatar Sep 12 '26 18:09 rand0mdud3

Closing the last open branch: OFF under radeon works. vgaswitcheroo DIS went Pwr -> Off, PCI state D0 -> D3hot, session fully alive on Intel throughout, no hang. So the complete 11,5 dGPU story: blacklist = D0 forever; radeon + OFF = D3hot on demand; amdgpu + OFF = hang; runtime PM never engages. The only wrinkle is persistence -- switcheroo resets at boot, so keeping it off wants a boot-time unit, which would be a natural extension of #11548.

rand0mdud3 avatar Sep 12 '26 18:09 rand0mdud3

Killing the OFF direction entirely, with evidence: a boot-time switcheroo OFF (After=graphical.target, so ordering was not the issue) Oopsed inside radeon_suspend_kms during the transition itself, and the fallout corrupted switcheroo state badly enough that a later reader wedged in vga_switcheroo_show -- unfreezable, so every subsequent suspend aborted and the machine sat frozen with the screen on until a hard reboot. OFF on this board is not merely risky, it poisons suspend for the whole boot. The si-arbitration half (#11548) stands unaffected -- radeon bound and healthy is still the right steady state; parking the card is not achievable safely here.

rand0mdud3 avatar Sep 12 '26 19:09 rand0mdud3

Thanks for the thorough experimental record. Here is what I checked against quattro (c4803d7d7).

Omarchy does not blacklist the dGPU. Nothing in install/, migrations/, bin/ or default/ on quattro or dev blacklists amdgpu or radeon, adds module_blacklist=, or writes /etc/modprobe.d/disable-amd-dgpu.conf. The two blacklists you found on this machine were local configuration, so a stock install of this model binds a driver to the M370X rather than leaving it driverless. Omarchy also ships nothing that sets up vga_switcheroo or dGPU runtime PM on pre-T2 Macs, so there is no Omarchy code path for the remaining power cost to be a defect in.

What is left is a cost with no safe fix yet. Going by your later comments: radeon bound via SI arbitration suspends and resumes correctly, runtime PM never engages, and switcheroo OFF hangs under amdgpu and oopses in radeon_suspend_kms under radeon, poisoning later suspends. That leaves the card in D0 whichever driver holds it. A quirk to park it would need a power-off path that has been shown to be safe, and none has, so I have not drafted a fix. I could not reproduce any of this: it depends on the MacBookPro11,5 board, and the test workers are virtual machines.

One correction to the title: MacBookPro11,4 is the Iris Pro-only 15-inch model with no discrete GPU, so this concerns MacBookPro11,5 alone.

Related: #11548 (pins radeon on MacBookPro11,5) is worked as its own pull request and does not close this issue. #11351 covers hibernate resume on the same model.

No second opinion ran on this one: the configured reviewer, Codex Medium, answered a ping, but today's review allowance was already spent. So this is one model's reading. It now waits on the maintainer to decide between documenting the D0 cost for 11,5 owners and accepting it as it stands.

omarchybot avatar Oct 11 '26 13:10 omarchybot

Data from a MacBookPro11,5 (R9 M370X 1002:6821) on linux-omarchy 7.2.15-1, amdgpu built with upstream 5b56ede88031 (SI reset on Macs with VRAM at 0; omacom/omarchy-pkgs#2364). It is now possible to power the dGPU off for a whole session, but not to power it back on.

Setup ("Battery" boot entry)

  • The panel is muxed to Intel before Linux by bbatchelder/macbookpro11-5-intel-efi (no NVRAM writes), plus initcall_blacklist=simpledrm_platform_driver_init,efifb_driver_init.
  • amdgpu stays loaded. Hyprland is limited to Intel with AQ_DRM_DEVICES.
  • Before the display manager starts, with no DRM clients on either GPU, a oneshot unit runs echo IGD then echo OFF on vgaswitcheroo/switch.
    • vga_switcheroo refuses to switch while any client holds either GPU, including Hyprland on i915, so this has to run before the display manager.
  • At shutdown, the gmux selectors are written back to AMD (DDC=2, DISPLAY=3, indexed protocol via /dev/port). Otherwise the next boot's firmware and Limine menu render only on the HDMI output, and the internal panel stays black.

Results

  • amdgpu: switched off, DIS Off, no hang.
  • S3 works with the dGPU off.
  • Idle on battery at the same backlight (157/1023): 10.8 W vs 15.3 W with amdgpu driving the panel. That's about −4.5 W, roughly 9 h idle instead of 6.5 h on a healthy 98 Wh pack.

Still broken: powering the dGPU back on (echo ON), so no PRIME offload or HDMI until reboot:

[drm:atom_op_jump [amdgpu]] *ERROR* atombios stuck in loop for more than 20secs aborting
[drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing C360 (len 320, WS 0, PS 0) @ 0xC487
amdgpu 0000:01:00.0: amdgpu asic init failed
amdgpu 0000:01:00.0: Wait for MC idle timedout !
WARNING: gfx_v6_0.c:1635 at gfx_v6_0_hw_init  (num_active_tcc != num_max_tcc - hweight32(dis_tcc_mask))
amdgpu 0000:01:00.0: ASIC reset failed with error, -22 ... GPU Recovery Failed: -22

After a gmux power cycle, the VBIOS asic_init loops. S3, where the platform firmware sequences dGPU power, re-posts fine. That suggests the gmux power-on path skips something the VBIOS needs, such as a power-rail or memory-training precondition. A stuck amdgpu then blocks freezing on the next suspend, so in practice "off" has to stay off until reboot.


How this was produced: this comment was written by Claude Opus 5.5 (Anthropic's AI model), working as an autonomous agent on my behalf, and is posted with my approval. Method: hardware-in-the-loop testing on my own MacBookPro11,5. An Ubuntu mini-PC drove the Mac over SSH (Tailscale) and through a JetKVM (HDMI capture + USB HID keyboard for login and remote wake). A scripted S3 harness armed an RTC alarm (or sent a USB HID wake), suspended with systemctl suspend, waited for the Mac to return, then pulled the kernel journal for that cycle (journal cursor) and counted ring/IB/UVD results, GPU lockup/stall lines, si_dpm errors and brcmf failures into a JSONL log. Mesa builds (26.2.5 + patch, stock 26.0.8) were compiled in an Arch container and loaded only from a private prefix via LIBVA_DRIVERS_PATH. Nothing was installed system-wide. Decode tests used ffmpeg -hwaccel vaapi on generated 1080p30 clips. I did the physical power-button presses when the machine froze.

teuteuguy avatar Nov 09 '26 06:11 teuteuguy

@teuteuguy's November 9 results change the earlier finding: session-long dGPU power-off is now reported working on one MacBookPro11,5, with S3 working while it stays off. That result uses a locally patched kernel, an Intel EFI handoff, framebuffer changes, pre-session switching and a shutdown gmux restore. It does not yet establish a stock configuration or automatic runtime power management.

The 10.8 W versus 15.3 W measurement compares Intel driving the panel with the dGPU off against AMD driving the panel. It therefore measures the combined configuration change. Isolating the benefit of power-off would require a comparison with Intel driving the panel in both cases, with the dGPU on versus off. The kernel also treats the two operations differently: IGD switching checks whether device clients allow switching; OFF takes a separate path without that check. These details limit what can be attributed to timing or power-off alone. See the upstream switcheroo source.

Upstream commit 5b56ede88031 normalizes the initial VRAM layout for later S3 resume; it does not establish a fix for the reported ON failure. The VBIOS initialization timeout and subsequent failed suspend remain unexplained. omarchy-pkgs#2364 tracks the kernel patch request; #11548 pins radeon and does not implement GPU parking. Neither closes the power issue.

I checked current quattro at 419a5a7095d118a218d5f84548dbd83ce90067e6, the Apple setup scripts, Mac manual, related reports and upstream code. No hardware reproduction or tests ran: the workers lack this Mac's gmux and GPU. No contained Omarchy fix is established, so no quirk was filed. The issue remains open for the maintainer to decide how to proceed with documentation or the reported boot profile; powering the GPU back on still needs hardware investigation.

Reviewed by GPT-6 High in Codex, with second opinions from Opus 5.5 High and muse-wonder via pi, thinking high. The second opinions identified the measurement baseline and switching-path limits above; independence from the supplied brief is not guaranteed.

omarchybot avatar Nov 18 '26 03:11 omarchybot