Skip to content

Commit 3158e7c

Browse files
committed
feat: add Lenovo ThinkPad P16s Intel Gen 2
@moduon MT-9339
1 parent e1f1215 commit 3158e7c

File tree

7 files changed

+88
-0
lines changed

7 files changed

+88
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ See code for all available configurations.
247247
| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `<nixos-hardware/lenovo/thinkpad/p14s/intel/gen3>` |
248248
| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen1>` |
249249
| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen2>` |
250+
| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `<nixos-hardware/lenovo/thinkpad/p16s/intel/gen2>` |
250251
| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `<nixos-hardware/lenovo/thinkpad/p1>` |
251252
| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `<nixos-hardware/lenovo/thinkpad/p50>` |
252253
| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `<nixos-hardware/lenovo/thinkpad/p51>` |
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
imports = [
3+
../.
4+
];
5+
}
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
imports = [
3+
../.
4+
];
5+
}

flake.nix

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3;
192192
lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1;
193193
lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2;
194+
lenovo-thinkpad-p16s-intel-gen2 = import ./lenovo/thinkpad/p16s/intel/gen2;
194195
lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50;
195196
lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51;
196197
lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52;
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{modulesPath, lib, ...}: {
2+
imports = [
3+
(modulesPath + "/installer/scan/not-detected.nix")
4+
../.
5+
];
6+
7+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
8+
}
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Lenovo Thinkpad P16s Gen 2
2+
3+
https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadp/thinkpad-p16s-gen-2-16-inch-intel/len101t0065
4+
5+
6+
## Tested Hardware
7+
8+
```shell
9+
lspci -nn
10+
00:00.0 Host bridge [0600]: Intel Corporation Raptor Lake-P/U 4p+8e cores Host Bridge/DRAM Controller [8086:a707]
11+
00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04)
12+
00:04.0 Signal processing controller [1180]: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant [8086:a71d]
13+
00:06.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port [8086:a74d]
14+
00:06.2 PCI bridge [0604]: Intel Corporation Device [8086:a73d]
15+
00:07.0 PCI bridge [0604]: Intel Corporation Raptor Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:a76e]
16+
00:07.2 PCI bridge [0604]: Intel Corporation Raptor Lake-P Thunderbolt 4 PCI Express Root Port #2 [8086:a72f]
17+
00:0d.0 USB controller [0c03]: Intel Corporation Raptor Lake-P Thunderbolt 4 USB Controller [8086:a71e]
18+
00:0d.2 USB controller [0c03]: Intel Corporation Raptor Lake-P Thunderbolt 4 NHI #0 [8086:a73e]
19+
00:0d.3 USB controller [0c03]: Intel Corporation Raptor Lake-P Thunderbolt 4 NHI #1 [8086:a76d]
20+
00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01)
21+
00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01)
22+
00:14.3 Network controller [0280]: Intel Corporation Raptor Lake PCH CNVi WiFi [8086:51f1] (rev 01)
23+
00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01)
24+
00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01)
25+
00:1f.0 ISA bridge [0601]: Intel Corporation Raptor Lake LPC/eSPI Controller [8086:519d] (rev 01)
26+
00:1f.3 Audio device [0403]: Intel Corporation Raptor Lake-P/U/H cAVS [8086:51ca] (rev 01)
27+
00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01)
28+
00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01)
29+
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (23) I219-V [8086:0dc6] (rev 01)
30+
02:00.0 Non-Volatile memory controller [0108]: SK hynix Platinum P41/PC801 NVMe Solid State Drive [1c5c:1959]
31+
03:00.0 3D controller [0302]: NVIDIA Corporation GA107GLM [RTX A500 Laptop GPU] [10de:25bb] (rev a1)
32+
33+
nix-info -m
34+
- system: `"x86_64-linux"`
35+
- host os: `Linux 6.12.10-zen1, NixOS, 24.11 (Vicuna), 24.11.20250304.6af28b8`
36+
- multi-user?: `yes`
37+
- sandbox: `yes`
38+
- version: `nix-env (Nix) 2.24.12`
39+
- nixpkgs: `/nix/store/cdjqlnn7kx4hfmxkry9yjfdvqp2pradh-source`
40+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{lib, ...}: {
2+
imports = [
3+
../.
4+
../../../../common/cpu/intel/raptor-lake
5+
../../../../common/gpu/intel/raptor-lake
6+
../../../../common/gpu/nvidia/ampere
7+
../../../../common/gpu/nvidia/prime.nix
8+
];
9+
10+
boot.initrd.availableKernelModules = [
11+
"nvme"
12+
"sd_mod"
13+
"thunderbolt"
14+
"usb_storage"
15+
"usbhid"
16+
"xhci_pci"
17+
];
18+
boot.kernelModules = ["kvm-intel"];
19+
20+
# DOCS https://wiki.nixos.org/wiki/NVIDIA#Offload_mode
21+
hardware.nvidia.prime = {
22+
intelBusId = lib.mkDefault "PCI:0:2:0";
23+
nvidiaBusId = lib.mkDefault "PCI:3:0:0";
24+
};
25+
26+
# HACK https://github.com/NVIDIA/open-gpu-kernel-modules/issues/472
27+
hardware.nvidia.open = lib.mkOverride 993 false;
28+
}

0 commit comments

Comments
 (0)