Target the actual NVMe controller in Apple suspend fix - #10877
Open
Drecullith wants to merge 1 commit into
Open
Conversation
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.
Summary
Fix the Apple NVMe suspend workaround so it targets the actual NVMe PCI controller instead of assuming it is always
0000:01:00.0.On MacBook models with discrete graphics, including MacBookPro13,3, PCI
01:00.0can be the dGPU while the NVMe controller is at another address such as02:00.0.The previous guard only checked whether
01:00.0exposedd3cold_allowed. Since that attribute is available on other PCI devices too, the installer could successfully disable D3cold on the GPU while leaving the NVMe untouched.This change:
/sys/class/nvme;d3cold_allowed;omarchy-nvme-suspend-fix.service;01:00.0setting;Fixes #10826.
Tests
Added
test/shell.d/apple-nvme-suspend-test.shcovering:0000:02:00.0is discovered correctly;d3cold_allowedis rejected;The focused regression tests pass locally.
Also verified:
bash -n install/hardware/apple/fix-suspend-nvme.shbash -n test/shell.d/apple-nvme-suspend-test.shsystemd-analyze verifyNo physical MacBook hardware test was available in this environment.