Files
nixos-hardware/tuxedo/pulse/15/gen2/default.nix
NAHO 40dffd02e3 tuxedo/pulse/15/gen2: defer amdgpu secure display warning to Stage 2
Defer the amdgpu secure display warning from Stage 1 to Stage 2, despite
the initial decision [1] of reverting commit dd18dc7714
("fix(tuxedo/pulse/15/gen2): prevent 'Secure display: Generic Failure'
warning") with commit 80d98a7d55 ("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
2025-09-07 21:43:50 +00:00

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"
]
)
);
}