Repository navigation
soc: apple: sleep: read a T6050 power word through its region - #2177
Merged
Merged
Conversation
sleep_ps_full() read the power word at s->ps + offset. On T6050 the words are region-encoded (SLEEP_REGION(w)), and sleep_power_reg() is what turns one into its address; sleep_ps_on() and the other readers went through it with the T6050 support, which missed this one. Since the T8142 sleep support, the bound display-coprocessor check in apple_sleep_refuse() and the bound gate checks in apple_sleep_gate_failed() call sleep_asc_running(), and so sleep_ps_full(), during T6050's early-entry refusal checks, with interrupts off on the last CPU. There it read a wrong address, and the J716c reset during every deep sleep instead of sleeping. Read the word through sleep_power_reg(), which is s->ps + offset on the SoCs without regions, so nothing changes there. Developed with Claude Code. Fixes: 5ce3491 ("soc: apple: sleep: T6050 (M5 Pro) suspend to RAM") Signed-off-by: Erik Bourget <erik@ebourget.net>
Contributor
Author
This was referenced Nov 18, 2026
Contributor
|
Tested on my J813 (MacBook Air 13" M5). I have no Pro/Max or 15" Air to test with.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a J716c (M5 Max), every deep sleep on the current
integration/auroraresets the Mac instead of sleeping. It came in with #2135.sleep_ps_full()read the power word ats->ps + offset. T6050's power words are region-encoded, andsleep_power_reg()is what turns one into its address;sleep_ps_on()and the other readers already go through it. Since #2135, the bound display-coprocessor check inapple_sleep_refuse()and the bound gate checks inapple_sleep_gate_failed()callsleep_asc_running(), and sosleep_ps_full(), during T6050's early-entry refusal checks with interrupts off. There it read a wrong address.Change
sleep_ps_full()reads the word throughsleep_power_reg(). That iss->ps + offseton the SoCs without regions, so nothing changes for them.Testing
On a J716c (M5 Max, 128 GB), with this fix plus #1956, #1957 and #2162 on
integration/aurora59b02d5:mem_sleepdeep,rtcwake -m mem -s 30) reset the Mac each time (3 of 3).suspend_stats/success1), all four displays (internal and two 4K240 over Thunderbolt) come back, no oops or warning, ANE add-128 1000/1000 bit exact after the wake.checkpatch --strict: clean.🤖 Generated with Claude Code