mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 08:47:13 +08:00
Defer the amdgpu secure display warning from Stage 1 to Stage 2, despite the initial decision [1] of reverting commitdd18dc7714("fix(tuxedo/pulse/15/gen2): prevent 'Secure display: Generic Failure' warning") with commit80d98a7d55("feat(tuxedo/pulse/15/gen2): use default 'hardware.amdgpu.loadInInitrd'"). Since this noisy warning is an inherit property of this hardware, deferring it is the desired behavior. [1]: https://github.com/NixOS/nixos-hardware/pull/755#discussion_r1359669448
35 lines
1003 B
Nix
35 lines
1003 B
Nix
{ pkgs, ... }:
|
|
{
|
|
imports = [
|
|
../../../../common/cpu/amd
|
|
../../../../common/cpu/amd/pstate.nix
|
|
../../../../common/cpu/amd/zenpower.nix
|
|
../../../../common/gpu/amd
|
|
../../../../common/hidpi.nix
|
|
../../../../common/pc
|
|
../../../../common/pc/laptop
|
|
../../../../common/pc/ssd
|
|
];
|
|
|
|
# Defer the following Stage 1 warning to Stage 2:
|
|
#
|
|
# loading module amdgpu...
|
|
# [...] amdgpu 0000:05:00.0: amdgpu: Secure display: Generic Failure.
|
|
# [...] amdgpu 0000:05:00.0: amdgpu: SECUREDISPLAY: query securedisplay TA failed. ret 0x0
|
|
hardware.amdgpu.initrd.enable = false;
|
|
|
|
services.udev.extraRules = builtins.concatStringsSep "\n" (
|
|
[ "# Properly suspend the system." ]
|
|
++ (map
|
|
(
|
|
device:
|
|
''SUBSYSTEM=="pci", ACTION=="add", ATTR{vendor}=="0x144d", ATTR{device}=="${device}", RUN+="${pkgs.runtimeShell} -c 'echo 0 > /sys/bus/pci/devices/$kernel/d3cold_allowed'"''
|
|
)
|
|
[
|
|
"0xa80a"
|
|
"0xa808"
|
|
]
|
|
)
|
|
);
|
|
}
|