Skip to content

add Dell Pro 14 PA14250 #1534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ See code for all available configurations.
| [Dell Precision 5490](dell/precision/5490) | `<nixos-hardware/dell/precision/5490>` | `dell-precision-5490` |
| [Dell Precision 5530](dell/precision/5530) | `<nixos-hardware/dell/precision/5530>` | `dell-precision-5530` |
| [Dell Precision 7520](dell/precision/7520) | `<nixos-hardware/dell/precision/7520>` | `dell-precision-7520` |
| [Dell Pro 14 PA14250](dell/dell-pro/PA14250) | `<nixos-hardware/dell/dell-pro/PA14250>` | `dell-pro-14-PA14250` |
| [Dell XPS 13 7390](dell/xps/13-7390) | `<nixos-hardware/dell/xps/13-7390>` | `dell-xps-13-7390` |
| [Dell XPS 13 9300](dell/xps/13-9300) | `<nixos-hardware/dell/xps/13-9300>` | `dell-xps-13-9300` |
| [Dell XPS 13 9310](dell/xps/13-9310) | `<nixos-hardware/dell/xps/13-9310>` | `dell-xps-13-9310` |
Expand Down
54 changes: 54 additions & 0 deletions dell/dell-pro/PA14250/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib, ... }:

# Xe module fails to load on 6.12.x for 6.12.35..6.12.40 and fixed in 6.12.41
#
# https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5373
let
brokenXeModule = version: lib.versionAtLeast version "6.12.35" && lib.versionOlder version "6.12.41";
in
{
imports = [
../../../common/cpu/intel/lunar-lake
../../../common/pc/laptop
../../../common/pc/ssd
];

hardware.intelgpu.driver = "xe";

boot = lib.mkMerge [
{
# use xe graphics module, i915 doesn't seem to work well
# just selecting xe seems to be not enough
blacklistedKernelModules = [ "i915" ];

kernelParams = [
# makes external display more stable
"xe.psr_safest_params=1"
# extra debug logs just in case something breaks
"xe.verbose_state_checks=true"
];
}

# we can't inspect config.boot.kernelPackages.kernel.version to override kernelPackages as it's create a loop
# instead let's auto-apply latest kernel if linux_default is broken
#
# TODO: this may unnecessarily bump kernel to latest if say 6.13 is manually selected in configuration
# maybe we need extra parameter to this module? Though should still already be possible to overrule module kernel selection.
# Looking at linux_default version is also less restrictive than always setting latest,
# once 6.12 is fixed we can update brokenXeModule expression and only do override on old nixpkgs versions that haven't yet
# upgraded to a fixed kernel
(lib.mkIf (brokenXeModule pkgs.linuxKernel.packageAliases.linux_default.kernel.version) {
kernelPackages = pkgs.linuxPackages_latest;
})
];

assertions = lib.optionals (config.hardware.intelgpu.driver == "xe") [
{
assertion = !(brokenXeModule config.boot.kernelPackages.kernel.version);
message = "xe driver would fail with 'probe with driver xe failed with error -110'";
}
];

# Recommended in NixOS/nixos-hardware#127
services.thermald.enable = lib.mkDefault true;
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
dell-precision-5530 = import ./dell/precision/5530;
dell-precision-5560 = import ./dell/precision/5560;
dell-precision-7520 = import ./dell/precision/7520;
dell-pro-14-PA14250 = import ./dell/dell-pro/PA14250;
dell-xps-13-7390 = import ./dell/xps/13-7390;
dell-xps-13-9300 = import ./dell/xps/13-9300;
dell-xps-13-9310 = import ./dell/xps/13-9310;
Expand Down
Loading