28 lines
1.1 KiB
Nix
28 lines
1.1 KiB
Nix
{ ... }: {
|
||
# T2: align with https://github.com/deqrocks/apple-bce#required-kernel-parameters (suspend stack).
|
||
# (Older t2linux guidance used s2idle + pcie_ports=compat; deqrocks fork expects deep + auto + pm_async=off.)
|
||
boot.kernelParams = [
|
||
"mem_sleep_default=deep"
|
||
"intel_iommu=on"
|
||
"iommu=pt"
|
||
"pcie_ports=auto"
|
||
"pm_async=off"
|
||
# https://wiki.t2linux.org/guides/hybrid-graphics/#enabling-the-igpu — helps some post-suspend black screens.
|
||
"i915.enable_guc=3"
|
||
];
|
||
|
||
# Hybrid T2 Macs: prefer Intel for display/GL (saves power; avoids broken AMDGPU after resume).
|
||
# https://wiki.t2linux.org/guides/hybrid-graphics/
|
||
boot.extraModprobeConfig = ''
|
||
options apple-gmux force_igd=y
|
||
'';
|
||
|
||
# If the AMD dGPU misbehaves after S3 (Electron apps won’t start, suspend breaks), keep it unloaded.
|
||
# See https://github.com/deqrocks/apple-bce#notes-for-dgpu-models — drop this list if you need DRI_PRIME
|
||
# or external displays wired through the dGPU.
|
||
boot.blacklistedKernelModules = [ "amdgpu" ];
|
||
|
||
boot.kernelModules = [ "apple-bce" ];
|
||
boot.initrd.availableKernelModules = [ "apple-bce" ];
|
||
}
|