Skip to content

Commit 3747b96

Browse files
Merge branch 'master' into master
2 parents db7076a + de6fc55 commit 3747b96

File tree

15 files changed

+466
-337
lines changed

15 files changed

+466
-337
lines changed

README.md

+310-308
Large diffs are not rendered by default.

apple/t2/pkgs/linux-t2/latest.json

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/4109f2144b626097a34b21def849a5d8cbcf3f7c/",
2+
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/60a2912ad2d05f8a2d6c68a94641d912c3a555fd/",
33
"patches": [
44
{
55
"name": "1001-Add-apple-bce-driver.patch",
@@ -43,11 +43,11 @@
4343
},
4444
{
4545
"name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch",
46-
"hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA="
46+
"hash": "sha256-Ga0LlaS1jWTXSKh1ClcETPJctAymC6jYBQK9wwDU4Xs="
4747
},
4848
{
4949
"name": "2008-i915-4-lane-quirk-for-mbp15-1.patch",
50-
"hash": "sha256-f/PTDwRGEyVkGHFyypTKi+gIni3R4TmcsOneGc7Ay5A="
50+
"hash": "sha256-Ui9tK4IGSWfEscmD92emX/NfulO0m8zwLc9ivIClCFQ="
5151
},
5252
{
5353
"name": "2009-apple-gmux-allow-switching-to-igpu-at-probe.patch",
@@ -91,27 +91,35 @@
9191
},
9292
{
9393
"name": "4001-asahi-trackpad.patch",
94-
"hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY="
94+
"hash": "sha256-yfkTKKokb/+JtTwE0Dzht14S0nrSIwLFAFND90P/Cis="
9595
},
9696
{
9797
"name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch",
98-
"hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8="
98+
"hash": "sha256-0PMCE3IWHekir5YV1BD6Jakc7dOV6Fj2HfIGWZnXZV0="
9999
},
100100
{
101101
"name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch",
102-
"hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g="
102+
"hash": "sha256-JTeYtaBqMyTu5IdGb8x7wbP9ZE1rXT4lpEjudR1ySFI="
103103
},
104104
{
105105
"name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch",
106-
"hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk="
106+
"hash": "sha256-HcPX7gY3hnlwM/tY06pbtXnch04AqwHgC596E8ZqGY8="
107+
},
108+
{
109+
"name": "4005-HID-apple-Add-necessary-IDs-and-support-for-replacem.patch",
110+
"hash": "sha256-SRKESCbpxSYm7U0VyCmvkmT/er6/GEHhwo8tgJDO6mQ="
111+
},
112+
{
113+
"name": "4006-HID-magicmouse-Add-MacBookPro15-1-replacement-trackp.patch",
114+
"hash": "sha256-uAlT/4ADwYyKvbuPQaGwqCjZ2/myruC63etVV6cfFLk="
107115
},
108116
{
109117
"name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch",
110118
"hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M="
111119
},
112120
{
113121
"name": "8001-Add-APFS-driver.patch",
114-
"hash": "sha256-T0ZmO99nmnpNVLjlzMRc7wrkBON7w2F6HaPk4pQVV7A="
122+
"hash": "sha256-py4DNKBsUWvw6o730ApmNdUlSyabOFnFDoAPrF40DNE="
115123
},
116124
{
117125
"name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch",

apple/t2/pkgs/linux-t2/latest.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{ callPackage, linux_6_13, ... }@args:
1+
{ callPackage, linux_6_14, ... }@args:
22

33
callPackage ./generic.nix args {
4-
kernel = linux_6_13;
4+
kernel = linux_6_14;
55
patchesFile = ./latest.json;
66
}

apple/t2/pkgs/linux-t2/stable.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/dd2e78d234fc289d3ebadf1852d761498e668a02/",
2+
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/0543a832ecf1400798e8aef6727110ec21c3484a/",
33
"patches": [
44
{
55
"name": "1001-Add-apple-bce-driver.patch",
@@ -95,23 +95,31 @@
9595
},
9696
{
9797
"name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch",
98-
"hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8="
98+
"hash": "sha256-0PMCE3IWHekir5YV1BD6Jakc7dOV6Fj2HfIGWZnXZV0="
9999
},
100100
{
101101
"name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch",
102-
"hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g="
102+
"hash": "sha256-JTeYtaBqMyTu5IdGb8x7wbP9ZE1rXT4lpEjudR1ySFI="
103103
},
104104
{
105105
"name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch",
106-
"hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk="
106+
"hash": "sha256-HcPX7gY3hnlwM/tY06pbtXnch04AqwHgC596E8ZqGY8="
107+
},
108+
{
109+
"name": "4005-HID-apple-Add-necessary-IDs-and-support-for-replacem.patch",
110+
"hash": "sha256-SRKESCbpxSYm7U0VyCmvkmT/er6/GEHhwo8tgJDO6mQ="
111+
},
112+
{
113+
"name": "4006-HID-magicmouse-Add-MacBookPro15-1-replacement-trackp.patch",
114+
"hash": "sha256-uAlT/4ADwYyKvbuPQaGwqCjZ2/myruC63etVV6cfFLk="
107115
},
108116
{
109117
"name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch",
110118
"hash": "sha256-O6RHFxmKZn7aCq1D+r5z2T3jLt0r5+01EABD9rs0E5M="
111119
},
112120
{
113121
"name": "8001-Add-APFS-driver.patch",
114-
"hash": "sha256-xjB7lqE4bweUvDa6Tx6LurxWlUlX4nUN+DbTRQb5bQI="
122+
"hash": "sha256-1VHKrO2haBqXDCef2xt2fHfCCPv2q/AhFmmM4Xxu24E="
115123
},
116124
{
117125
"name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch",

apple/t2/pkgs/linux-t2/update-patches.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import subprocess
88
import sys
99
from tempfile import NamedTemporaryFile
10+
from concurrent.futures import ThreadPoolExecutor, as_completed
1011

1112
import requests
1213

@@ -50,6 +51,11 @@ def get_sri_hash(data: bytes):
5051
)
5152
return proc.stdout.decode("utf8").strip()
5253

54+
def download_task(patch: dict):
55+
patch_content = requests.get(patch["download_url"])
56+
patch_hash = get_sri_hash(patch_content.content)
57+
print(f"{patch['name']}: {patch_hash}")
58+
return {"name": patch["name"], "hash": patch_hash}
5359

5460
def main():
5561
args = parser.parse_args()
@@ -73,13 +79,13 @@ def main():
7379
patches = filter(lambda e: PATCH_PATTERN.match(e.get("name")), contents)
7480

7581
patches_with_hash = []
76-
for patch in patches:
77-
patch_content = requests.get(patch["download_url"])
78-
patch_hash = get_sri_hash(patch_content.content)
79-
print(f"{patch['name']}: {patch_hash}")
80-
patches_with_hash.append({"name": patch["name"], "hash": patch_hash})
82+
with ThreadPoolExecutor() as executor:
83+
futures = {executor.submit(download_task, patch) for patch in patches}
8184

82-
result = {"base_url": base_url, "patches": patches_with_hash}
85+
for future in as_completed(futures):
86+
patches_with_hash.append(future.result())
87+
88+
result = {"base_url": base_url, "patches": sorted(patches_with_hash, key=lambda p: p["name"])}
8389

8490
with open(args.filename, "w+") as f:
8591
json.dump(result, f, indent=2)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
imports = [
3+
../cpu-only.nix
4+
];
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
imports = [
3+
./cpu-only.nix
4+
../../../gpu/intel/whiskey-lake
5+
];
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
imports = [ ../. ];
3+
4+
boot.kernelParams = [ "i915.enable_guc=2" ];
5+
6+
hardware.intelgpu.vaapiDriver = "intel-media-driver";
7+
}

flake.nix

+2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@
191191
lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3;
192192
lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4;
193193
lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3;
194+
lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5;
194195
lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1;
195196
lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2;
197+
lenovo-thinkpad-p43s = import ./lenovo/thinkpad/p43s;
196198
lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50;
197199
lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51;
198200
lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52;

framework/13-inch/common/default.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{ lib, pkgs, ... }: {
1+
{ lib, config, ... }:
2+
{
23
imports = [
34
../../../common/pc/laptop
45
../../../common/pc/laptop/ssd
@@ -10,7 +11,7 @@
1011

1112
# Fix TRRS headphones missing a mic
1213
# https://community.frame.work/t/headset-microphone-on-linux/12387/3
13-
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") ''
14+
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6.8") ''
1415
options snd-hda-intel model=dell-headset-multi
1516
'';
1617

framework/16-inch/common/default.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{ lib, pkgs, ... }: {
1+
{ lib, config, ... }:
2+
{
23
imports = [
34
../../../common/pc/laptop
45
../../../common/pc/laptop/ssd
@@ -9,7 +10,7 @@
910

1011
# Fix TRRS headphones missing a mic
1112
# https://community.frame.work/t/headset-microphone-on-linux/12387/3
12-
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") ''
13+
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6.8") ''
1314
options snd-hda-intel model=dell-headset-multi
1415
'';
1516

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{ lib, pkgs, ... }:
2+
3+
{
4+
imports = [
5+
../.
6+
../../../../../common/gpu/nvidia/prime.nix
7+
../../../../../common/gpu/nvidia/turing
8+
];
9+
10+
hardware = {
11+
intelgpu.driver = "i915"; #xe driver may be used on newer kernels
12+
nvidia = {
13+
prime = {
14+
intelBusId = "PCI:0:2:0";
15+
nvidiaBusId = "PCI:1:0:0";
16+
};
17+
};
18+
};
19+
}

lenovo/thinkpad/p43s/README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Lenovo Thinkpad P43s
2+
3+
[Product page](https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadp/p43s/22ws2wpp43s)
4+
5+
## Tested Hardware
6+
```console
7+
foo@bar:~$ lspci -nn
8+
00:00.0 Host bridge [0600]: Intel Corporation Coffee Lake HOST and DRAM Controller [8086:3e34] (rev 0c)
9+
00:02.0 VGA compatible controller [0300]: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (rev 02)
10+
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 0c)
11+
00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model [8086:1911]
12+
00:12.0 Signal processing controller [1180]: Intel Corporation Cannon Point-LP Thermal Controller [8086:9df9] (rev 30)
13+
00:14.0 USB controller [0c03]: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller [8086:9ded] (rev 30)
14+
00:14.2 RAM memory [0500]: Intel Corporation Cannon Point-LP Shared SRAM [8086:9def] (rev 30)
15+
00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30)
16+
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 [8086:9de8] (rev 30)
17+
00:16.0 Communication controller [0780]: Intel Corporation Cannon Point-LP MEI Controller #1 [8086:9de0] (rev 30)
18+
00:16.3 Serial controller [0700]: Intel Corporation Cannon Point-LP Keyboard and Text (KT) Redirection [8086:9de3] (rev 30)
19+
00:1c.0 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #1 [8086:9db8] (rev f0)
20+
00:1c.4 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #5 [8086:9dbc] (rev f0)
21+
00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #9 [8086:9db0] (rev f0)
22+
00:1d.4 PCI bridge [0604]: Intel Corporation Cannon Point-LP PCI Express Root Port #13 [8086:9db4] (rev f0)
23+
00:1f.0 ISA bridge [0601]: Intel Corporation Cannon Point-LP LPC Controller [8086:9d84] (rev 30)
24+
00:1f.3 Audio device [0403]: Intel Corporation Cannon Point-LP High Definition Audio Controller [8086:9dc8] (rev 30)
25+
00:1f.4 SMBus [0c05]: Intel Corporation Cannon Point-LP SMBus Controller [8086:9da3] (rev 30)
26+
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller [8086:9da4] (rev 30)
27+
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (6) I219-LM [8086:15bd] (rev 30)
28+
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01)
29+
02:00.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01)
30+
03:00.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01)
31+
03:01.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01)
32+
03:02.0 PCI bridge [0604]: Intel Corporation JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] [8086:15c0] (rev 01)
33+
04:00.0 System peripheral [0880]: Intel Corporation JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016] [8086:15bf] (rev 01)
34+
3a:00.0 USB controller [0c03]: Intel Corporation JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016] [8086:15c1] (rev 01)
35+
3c:00.0 3D controller [0302]: NVIDIA Corporation GP108GLM [Quadro P520] [10de:1d34] (rev a1)
36+
3d:00.0 Non-Volatile memory controller [0108]: SK hynix PC601 NVMe Solid State Drive [1c5c:1627]
37+
```
38+
39+
## Tested Nix Configuration
40+
- system: `"x86_64-linux"`
41+
- host os: `Linux 6.12.18, NixOS, 25.05 (Warbler), 25.05.20250309.e3e32b6`
42+
- multi-user?: `yes`
43+
- sandbox: `yes`
44+
- version: `nix-env (Nix) 2.24.12`
45+
- nixpkgs: `/nix/store/g4ppspdl4fy7hnp4jgjl4ll03v7i08w3-source`

lenovo/thinkpad/p43s/default.nix

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{ lib, config, ... }: {
2+
imports = [
3+
../.
4+
../../../common/cpu/intel/whiskey-lake
5+
../../../common/pc/laptop/ssd
6+
../../../common/gpu/nvidia/pascal
7+
../../../common/gpu/nvidia/prime-sync.nix
8+
];
9+
10+
hardware = {
11+
graphics.enable = lib.mkDefault true;
12+
13+
nvidia = {
14+
prime = {
15+
intelBusId = lib.mkDefault "PCI:0:2:0";
16+
nvidiaBusId = lib.mkDefault "PCI:60:0:0";
17+
};
18+
19+
powerManagement.enable = lib.mkDefault config.hardware.nvidia.prime.sync.enable;
20+
};
21+
};
22+
}

lenovo/thinkpad/x1/yoga/7th-gen/default.nix

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
../../../../../common/pc/laptop/ssd
55
];
66

7-
# This laptop is too new for the kernel currently in nixos-unstable.
8-
# On Kernel 5.15.x, dmesg shows the `hardware is newer than drivers` message.
9-
# When starting the system with 5.15.x, only a tty is being displayed.
10-
# After our tests, at least version 5.19 is required for the system to work properly.
7+
# At least kernel 5.19 is required for the system to work properly.
118
boot.kernelPackages = lib.mkIf
129
(lib.versionOlder pkgs.linux.version "5.19")
1310
(lib.mkDefault pkgs.linuxPackages_latest);

0 commit comments

Comments
 (0)