mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 13:03:30 +01:00
Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92e7eb27a6 | ||
|
|
daaae13dff | ||
|
|
4f4d97d7b7 | ||
|
|
36d0027ef4 | ||
|
|
e8c83f0759 | ||
|
|
fad7119291 | ||
|
|
05fa89d1c5 | ||
|
|
113cd39166 | ||
|
|
3970af5d58 | ||
|
|
e1f1215125 | ||
|
|
09e97074ad | ||
|
|
1b1acdc3e7 | ||
|
|
de70a293ae | ||
|
|
b416c1d56f | ||
|
|
59314eb9f5 | ||
|
|
14f45c1a63 | ||
|
|
d25dac1bd5 | ||
|
|
b48cc4dab0 | ||
|
|
ae546d018a | ||
|
|
71ab5581a0 | ||
|
|
5335d4303b | ||
|
|
52cfc084ef |
No files matched your search
@@ -9,5 +9,5 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v30
|
||||
- uses: cachix/install-nix-action@v31
|
||||
- run: nix run ./tests#run .
|
||||
@@ -120,12 +120,13 @@ See code for all available configurations.
|
||||
| [Deciso DEC series](deciso/dec) | `<nixos-hardware/deciso/dec>` |
|
||||
| [Dell G3 3779](dell/g3/3779) | `<nixos-hardware/dell/g3/3779>` |
|
||||
| [Dell G3 3579](dell/g3/3579) | `<nixos-hardware/dell/g3/3579>` |
|
||||
| [Dell Inspiron 3442](dell/inspiron/3442) | `<nixos-hardawre/dell/inspiron/3442>` |
|
||||
| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `<nixos-hardawre/dell/inspiron/14-5420>` |
|
||||
| [Dell Inspiron 3442](dell/inspiron/3442) | `<nixos-hardware/dell/inspiron/3442>` |
|
||||
| [Dell Inspiron 14 5420](dell/inspiron/14-5420) | `<nixos-hardware/dell/inspiron/14-5420>` |
|
||||
| [Dell Inspiron 5509](dell/inspiron/5509) | `<nixos-hardware/dell/inspiron/5509>` |
|
||||
| [Dell Inspiron 5515](dell/inspiron/5515) | `<nixos-hardware/dell/inspiron/5515>` |
|
||||
| [Dell Inspiron 7405](dell/inspiron/7405) | `<nixos-hardware/dell/inspiron/7405>` |
|
||||
| [Dell Inspiron 7460](dell/inspiron/7460) | `<nixos-hardware/dell/inspiron/7460>` |
|
||||
| [Dell Inspiron 7559](dell/inspiron/7559) | `<nixos-hardware/dell/inspiron/7559>` |
|
||||
| [Dell Latitude 3340](dell/latitude/3340) | `<nixos-hardware/dell/latitude/3340>` |
|
||||
| [Dell Latitude 3480](dell/latitude/3480) | `<nixos-hardware/dell/latitude/3480>` |
|
||||
| [Dell Latitude 5490](dell/latitude/5490) | `<nixos-hardware/dell/latitude/5490>` |
|
||||
@@ -230,6 +231,7 @@ See code for all available configurations.
|
||||
| [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `<nixos-hardware/lenovo/thinkpad/a475>` |
|
||||
| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `<nixos-hardware/lenovo/thinkpad/e14/amd>` |
|
||||
| [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `<nixos-hardware/lenovo/thinkpad/e14/intel>` |
|
||||
| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `<nixos-hardware/lenovo/thinkpad/e15/intel>` |
|
||||
| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `<nixos-hardware/lenovo/thinkpad/e470>` |
|
||||
| [Lenovo ThinkPad E495](lenovo/thinkpad/e495) | `<nixos-hardware/lenovo/thinkpad/e495>` |
|
||||
| [Lenovo ThinkPad L13 Yoga](lenovo/thinkpad/l13/yoga) | `<nixos-hardware/lenovo/thinkpad/l13/yoga>` |
|
||||
@@ -243,6 +245,7 @@ See code for all available configurations.
|
||||
| [Lenovo ThinkPad P14s AMD Gen 3](lenovo/thinkpad/p14s/amd/gen3) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen3>` |
|
||||
| [Lenovo ThinkPad P14s AMD Gen 4](lenovo/thinkpad/p14s/amd/gen4) | `<nixos-hardware/lenovo/thinkpad/p14s/amd/gen4>` |
|
||||
| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `<nixos-hardware/lenovo/thinkpad/p14s/intel/gen3>` |
|
||||
| [Lenovo ThinkPad P14s Intel Gen 5](lenovo/thinkpad/p14s/intel/gen5) | `<nixos-hardware/lenovo/thinkpad/p14s/intel/gen5>` |
|
||||
| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen1>` |
|
||||
| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen2>` |
|
||||
| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `<nixos-hardware/lenovo/thinkpad/p1>` |
|
||||
@@ -309,8 +312,8 @@ See code for all available configurations.
|
||||
| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `<nixos-hardware/lenovo/yoga/6/13ALC6>` |
|
||||
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `<nixos-hardware/lenovo/yoga/7/14ARH7/amdgpu>` |
|
||||
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `<nixos-hardware/lenovo/yoga/7/14ARH7/nvidia>` |
|
||||
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) |`<nixos-hardware/lenovo/yoga/7/14IAH7/integrated>` |
|
||||
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) |`<nixos-hardware/lenovo/yoga/7/14IAH7/hybrid>` |
|
||||
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Integrated)](lenovo/yoga/7/14IAH7/integrated) | `<nixos-hardware/lenovo/yoga/7/14IAH7/integrated>` |
|
||||
| [Lenovo Yoga Slim 7i Pro X 14IAH7 (Hybrid)](lenovo/yoga/7/14IAH7/hybrid) | `<nixos-hardware/lenovo/yoga/7/14IAH7/hybrid>` |
|
||||
| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `<nixos-hardware/lenovo/yoga/7/slim/gen8>` |
|
||||
| [MSI B550-A PRO](msi/b550-a-pro) | `<nixos-hardware/msi/b550-a-pro>` |
|
||||
| [MSI B350 TOMAHAWK](msi/b350-tomahawk) | `<nixos-hardware/msi/b350-tomahawk>` |
|
||||
@@ -373,6 +376,7 @@ See code for all available configurations.
|
||||
| [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `<nixos-hardware/tuxedo/infinitybook/v4>` |
|
||||
| [TUXEDO Aura 15 - Gen1](tuxedo/aura/15/gen1) | `<nixos-hardware/tuxedo/aura/15/gen1>` |
|
||||
| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `<nixos-hardware/tuxedo/infinitybook/pro14/gen7>` |
|
||||
| [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](tuxedo/infinitybook/pro14/gen9-intel) | `<nixos-hardware/tuxedo/infinitybook/pro14/gen9-intel>` |
|
||||
| [TUXEDO Pulse 14 - Gen3](tuxedo/pulse/14/gen3) | `<nixos-hardware/tuxedo/pulse/14/gen3>` |
|
||||
| [TUXEDO Pulse 15 - Gen2](tuxedo/pulse/15/gen2) | `<nixos-hardware/tuxedo/pulse/15/gen2>` |
|
||||
| [Xiaomi Redmibook 16 Pro 2024](xiaomi/redmibook/16-pro-2024) | `<nixos-hardware/xiaomi/redmibook/16-pro-2024>` |
|
||||
+28
-2
@@ -7,6 +7,8 @@
|
||||
|
||||
let
|
||||
inherit (lib) types;
|
||||
nixosVersion = lib.versions.majorMinor lib.version;
|
||||
|
||||
audioFiles = pkgs.fetchFromGitHub {
|
||||
owner = "kekrby";
|
||||
repo = "t2-better-audio";
|
||||
@@ -61,6 +63,19 @@ in
|
||||
example = "latest";
|
||||
description = "The kernel release stream to use.";
|
||||
};
|
||||
firmware = {
|
||||
enable = lib.mkEnableOption "automatic and declarative Wi-Fi and Bluetooth firmware configuration";
|
||||
version = lib.mkOption {
|
||||
type = types.enum [
|
||||
"monterey"
|
||||
"ventura"
|
||||
"sonoma"
|
||||
];
|
||||
default = "sonoma";
|
||||
example = "ventura";
|
||||
description = "The macOS version to use.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
@@ -82,8 +97,6 @@ in
|
||||
"iommu=pt"
|
||||
];
|
||||
|
||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
|
||||
services.pipewire.package = pipewirePackage;
|
||||
services.pipewire.wireplumber.package = pkgs.wireplumber.override {
|
||||
pipewire = pipewirePackage;
|
||||
@@ -92,11 +105,24 @@ in
|
||||
# Make sure post-resume.service exists
|
||||
powerManagement.enable = true;
|
||||
}
|
||||
|
||||
(if lib.versionAtLeast nixosVersion "25.05" then {
|
||||
services.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
} else {
|
||||
hardware.pulseaudio.package = overrideAudioFiles pkgs.pulseaudio "src/modules/";
|
||||
})
|
||||
|
||||
(lib.mkIf t2Cfg.enableIGPU {
|
||||
# Enable the iGPU by default if present
|
||||
environment.etc."modprobe.d/apple-gmux.conf".text = ''
|
||||
options apple-gmux force_igd=y
|
||||
'';
|
||||
})
|
||||
(lib.mkIf t2Cfg.firmware.enable {
|
||||
# Configure Wi-Fi and Bluetooth firmware
|
||||
hardware.firmware = [
|
||||
(pkgs.callPackage ./pkgs/brcm-firmware { version = t2Cfg.firmware.version; })
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
callPackage,
|
||||
vmTools,
|
||||
util-linux,
|
||||
linux,
|
||||
kmod,
|
||||
version,
|
||||
}:
|
||||
|
||||
let
|
||||
get-firmware = callPackage ./get-firmware.nix { };
|
||||
fetchmacos = callPackage ./fetchmacos.nix { };
|
||||
|
||||
# See https://github.com/kholia/OSX-KVM/blob/master/fetch-macOS-v2.py#L534-L546.
|
||||
# Versions before macOS Monterey don't have Bluetooth firmware.
|
||||
# Whereas macOS Sequoia doesn't have firmware for MacBook Air 2018 and 2019.
|
||||
boards = {
|
||||
monterey = {
|
||||
boardId = "Mac-B809C3757DA9BB8D";
|
||||
mlb = "00000000000000000";
|
||||
osType = "latest";
|
||||
hash = "sha256-My8FLnqHZn+THfGPIhTSApW/kIWM0ZZhjBxWujhhWPM=";
|
||||
};
|
||||
ventura = {
|
||||
boardId = "Mac-4B682C642B45593E";
|
||||
mlb = "00000000000000000";
|
||||
osType = "latest";
|
||||
hash = "sha256-Qy9Whu8pqHo+m6wHnCIqURAR53LYQKc0r87g9eHgnS4=";
|
||||
};
|
||||
sonoma = {
|
||||
boardId = "Mac-827FAC58A8FDFA22";
|
||||
mlb = "00000000000000000";
|
||||
osType = "default";
|
||||
hash = "sha256-phlpwNTYhugqX2KGljqxpbfGtCFDgggQPzB7U29XSmM=";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
vmTools.runInLinuxVM (
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "brcm-firmware";
|
||||
inherit version;
|
||||
|
||||
src = fetchmacos {
|
||||
name = version;
|
||||
inherit (boards.${version})
|
||||
boardId
|
||||
mlb
|
||||
osType
|
||||
hash
|
||||
;
|
||||
};
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
util-linux
|
||||
get-firmware
|
||||
];
|
||||
buildPhase = ''
|
||||
ln -s ${linux}/lib /lib
|
||||
${kmod}/bin/modprobe loop
|
||||
${kmod}/bin/modprobe hfsplus
|
||||
|
||||
imgdir=$(mktemp -d)
|
||||
loopdev=$(losetup -f | cut -d "/" -f 3)
|
||||
losetup -P $loopdev $src
|
||||
loopdev_partition=/dev/$(lsblk -o KNAME,TYPE,MOUNTPOINT -n | grep $loopdev | tail -1 | awk '{print $1}')
|
||||
mount $loopdev_partition $imgdir
|
||||
|
||||
get-bluetooth $imgdir/usr/share/firmware/bluetooth bluetooth/
|
||||
get-wifi $imgdir/usr/share/firmware/wifi wifi/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/firmware/brcm
|
||||
cp bluetooth/brcm/* $out/lib/firmware/brcm/
|
||||
cp wifi/brcm/* $out/lib/firmware/brcm/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Wi-Fi and Bluetooth firmware for T2 Macs";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ mkorje ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
callPackage,
|
||||
dmg2img,
|
||||
}:
|
||||
|
||||
let
|
||||
macrecovery = callPackage ./macrecovery.nix { };
|
||||
in
|
||||
|
||||
{
|
||||
name,
|
||||
boardId,
|
||||
mlb,
|
||||
osType,
|
||||
hash,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = name;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
macrecovery
|
||||
dmg2img
|
||||
];
|
||||
buildPhase = ''
|
||||
macrecovery download -o . -b ${boardId} -m ${mlb} -os ${osType}
|
||||
dmg2img -s BaseSystem.dmg fw.img
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp fw.img $out
|
||||
'';
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = hash;
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
diff --git a/asahi_firmware/bluetooth.py b/asahi_firmware/bluetooth.py
|
||||
index 0934225..3eaa442 100644
|
||||
--- a/asahi_firmware/bluetooth.py
|
||||
+++ b/asahi_firmware/bluetooth.py
|
||||
@@ -1,8 +1,25 @@
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: MIT
|
||||
import logging, os, os.path, re, sys
|
||||
from collections import namedtuple, defaultdict
|
||||
+from hashlib import sha256
|
||||
|
||||
-from .core import FWFile
|
||||
+class FWFile(object):
|
||||
+ def __init__(self, name, data):
|
||||
+ self.name = name
|
||||
+ self.data = data
|
||||
+ self.sha = sha256(data).hexdigest()
|
||||
+
|
||||
+ def __repr__(self):
|
||||
+ return f"FWFile({self.name!r}, <{self.sha[:16]}>)"
|
||||
+
|
||||
+ def __eq__(self, other):
|
||||
+ if other is None:
|
||||
+ return False
|
||||
+ return self.sha == other.sha
|
||||
+
|
||||
+ def __hash__(self):
|
||||
+ return hash(self.sha)
|
||||
|
||||
log = logging.getLogger("asahi_firmware.bluetooth")
|
||||
|
||||
@@ -127,16 +144,16 @@ class BluetoothFWCollection(object):
|
||||
|
||||
if __name__ == "__main__":
|
||||
col = BluetoothFWCollection(sys.argv[1])
|
||||
-
|
||||
- if len(sys.argv) > 2:
|
||||
- from . import FWPackage
|
||||
-
|
||||
- pkg = FWPackage(sys.argv[2])
|
||||
- pkg.add_files(sorted(col.files()))
|
||||
- pkg.close()
|
||||
-
|
||||
- for i in pkg.manifest:
|
||||
- print(i)
|
||||
- else:
|
||||
- for name, fwfile in col.files():
|
||||
- print(name, f"{fwfile.name} ({len(fwfile.data)} bytes)")
|
||||
+
|
||||
+ dir = os.path.join(sys.argv[2], "brcm")
|
||||
+ os.makedirs(dir)
|
||||
+
|
||||
+ hashes = {}
|
||||
+ for name, data in sorted(col.files()):
|
||||
+ path = os.path.join(sys.argv[2], name)
|
||||
+ if data.sha in hashes:
|
||||
+ os.link(hashes[data.sha], path)
|
||||
+ else:
|
||||
+ with open(path, "wb") as f:
|
||||
+ f.write(data.data)
|
||||
+ hashes[data.sha] = path
|
||||
diff --git a/asahi_firmware/wifi.py b/asahi_firmware/wifi.py
|
||||
index 346965c..261aa32 100644
|
||||
--- a/asahi_firmware/wifi.py
|
||||
+++ b/asahi_firmware/wifi.py
|
||||
@@ -1,6 +1,24 @@
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: MIT
|
||||
import sys, os, os.path, pprint, statistics, logging
|
||||
-from .core import FWFile
|
||||
+from hashlib import sha256
|
||||
+
|
||||
+class FWFile(object):
|
||||
+ def __init__(self, name, data):
|
||||
+ self.name = name
|
||||
+ self.data = data
|
||||
+ self.sha = sha256(data).hexdigest()
|
||||
+
|
||||
+ def __repr__(self):
|
||||
+ return f"FWFile({self.name!r}, <{self.sha[:16]}>)"
|
||||
+
|
||||
+ def __eq__(self, other):
|
||||
+ if other is None:
|
||||
+ return False
|
||||
+ return self.sha == other.sha
|
||||
+
|
||||
+ def __hash__(self):
|
||||
+ return hash(self.sha)
|
||||
|
||||
log = logging.getLogger("asahi_firmware.wifi")
|
||||
|
||||
@@ -40,7 +58,9 @@ class WiFiFWCollection(object):
|
||||
self.prune()
|
||||
|
||||
def load(self, source_path):
|
||||
+ included_folders = ["C-4355__s-C1", "C-4364__s-B2", "C-4364__s-B3", "C-4377__s-B3"]
|
||||
for dirpath, dirnames, filenames in os.walk(source_path):
|
||||
+ dirnames[:] = [d for d in dirnames if d in included_folders]
|
||||
if "perf" in dirnames:
|
||||
dirnames.remove("perf")
|
||||
if "assert" in dirnames:
|
||||
@@ -141,18 +161,16 @@ class WiFiFWCollection(object):
|
||||
|
||||
if __name__ == "__main__":
|
||||
col = WiFiFWCollection(sys.argv[1])
|
||||
- if len(sys.argv) > 2:
|
||||
- from .core import FWPackage
|
||||
-
|
||||
- pkg = FWPackage(sys.argv[2])
|
||||
- pkg.add_files(sorted(col.files()))
|
||||
- pkg.close()
|
||||
-
|
||||
- for i in pkg.manifest:
|
||||
- print(i)
|
||||
- else:
|
||||
- for name, fwfile in col.files():
|
||||
- if isinstance(fwfile, str):
|
||||
- print(name, "->", fwfile)
|
||||
- else:
|
||||
- print(name, f"({len(fwfile.data)} bytes)")
|
||||
+
|
||||
+ dir = os.path.join(sys.argv[2], "brcm")
|
||||
+ os.makedirs(dir)
|
||||
+
|
||||
+ hashes = {}
|
||||
+ for name, data in sorted(col.files()):
|
||||
+ path = os.path.join(sys.argv[2], name)
|
||||
+ if data.sha in hashes:
|
||||
+ os.link(hashes[data.sha], path)
|
||||
+ else:
|
||||
+ with open(path, "wb") as f:
|
||||
+ f.write(data.data)
|
||||
+ hashes[data.sha] = path
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "get-firmware";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AsahiLinux";
|
||||
repo = "asahi-installer";
|
||||
rev = "v0.7.9";
|
||||
hash = "sha256-vbhepoZ52k5tW2Gd7tfQTZ5CLqzhV7dUcVh6+AYwECk=";
|
||||
};
|
||||
|
||||
patches = [ ./get-firmware-standalone.patch ];
|
||||
|
||||
buildInputs = [ python3 ];
|
||||
|
||||
installPhase = ''
|
||||
cd asahi_firmware
|
||||
install -Dm755 bluetooth.py $out/bin/get-bluetooth
|
||||
install -Dm755 wifi.py $out/bin/get-wifi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Patched Asahi Linux Installer scripts to get brcm firmware";
|
||||
homepage = "https://github.com/AsahiLinux/asahi-installer";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mkorje ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "macrecovery";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "acidanthera";
|
||||
repo = "OpenCorePkg";
|
||||
rev = "1.0.4";
|
||||
hash = "sha256-5Eypza9teSJSulHaK7Sxh562cTKedXKn3y+Z3+fC6sM=";
|
||||
};
|
||||
|
||||
buildInputs = [ python3 ];
|
||||
|
||||
installPhase = ''
|
||||
cd Utilities/macrecovery
|
||||
install -Dm755 macrecovery.py $out/opt/macrecovery
|
||||
cp boards.json $out/opt/boards.json
|
||||
mkdir $out/bin
|
||||
ln -s $out/opt/macrecovery $out/bin/macrecovery
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool that helps to automate recovery interaction";
|
||||
homepage = "https://github.com/acidanthera/OpenCorePkg";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ mkorje ];
|
||||
mainProgram = "macrecovery";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -40,6 +40,7 @@ kernel.override (
|
||||
HID_APPLETB_BL = module;
|
||||
HID_APPLETB_KBD = module;
|
||||
HID_APPLE = module;
|
||||
HID_MAGICMOUSE = module;
|
||||
DRM_APPLETBDRM = module;
|
||||
HID_SENSOR_ALS = module;
|
||||
SND_PCM = module;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/73bbcb413e8c9294c27ec9b53f84d8b19ecd3f05/",
|
||||
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/4109f2144b626097a34b21def849a5d8cbcf3f7c/",
|
||||
"patches": [
|
||||
{
|
||||
"name": "1001-Add-apple-bce-driver.patch",
|
||||
@@ -38,16 +38,12 @@
|
||||
"hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0="
|
||||
},
|
||||
{
|
||||
"name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch",
|
||||
"hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ="
|
||||
},
|
||||
{
|
||||
"name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch",
|
||||
"hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo="
|
||||
"name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch",
|
||||
"hash": "sha256-Ky19+cCiYDaHBh2o5IhZO8J1ExDT7o8K9cgPz+AL8Cg="
|
||||
},
|
||||
{
|
||||
"name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch",
|
||||
"hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI="
|
||||
"hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA="
|
||||
},
|
||||
{
|
||||
"name": "2008-i915-4-lane-quirk-for-mbp15-1.patch",
|
||||
@@ -94,8 +90,20 @@
|
||||
"hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns="
|
||||
},
|
||||
{
|
||||
"name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch",
|
||||
"hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc="
|
||||
"name": "4001-asahi-trackpad.patch",
|
||||
"hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY="
|
||||
},
|
||||
{
|
||||
"name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch",
|
||||
"hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8="
|
||||
},
|
||||
{
|
||||
"name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch",
|
||||
"hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g="
|
||||
},
|
||||
{
|
||||
"name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch",
|
||||
"hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk="
|
||||
},
|
||||
{
|
||||
"name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch",
|
||||
@@ -103,7 +111,7 @@
|
||||
},
|
||||
{
|
||||
"name": "8001-Add-APFS-driver.patch",
|
||||
"hash": "sha256-40Gl8eR9RB6qEoU+vY7+sVWms8e566OUmAb9LZWZK3w="
|
||||
"hash": "sha256-T0ZmO99nmnpNVLjlzMRc7wrkBON7w2F6HaPk4pQVV7A="
|
||||
},
|
||||
{
|
||||
"name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/19c29ff4bbda9f512b7b69d63d249de269dc66ab/",
|
||||
"base_url": "https://raw.githubusercontent.com/t2linux/linux-t2-patches/dd2e78d234fc289d3ebadf1852d761498e668a02/",
|
||||
"patches": [
|
||||
{
|
||||
"name": "1001-Add-apple-bce-driver.patch",
|
||||
@@ -38,16 +38,12 @@
|
||||
"hash": "sha256-TJjXAlQ4WEROnq/xd6/4JHTuEJjqT7dLLcE4etKdzc0="
|
||||
},
|
||||
{
|
||||
"name": "1012-lib-vsprintf-Add-support-for-generic-FOURCCs-by-exte.patch",
|
||||
"hash": "sha256-cMl4WJcT/nM/z12LEsnLxssQgnRqKE+d/P2uMr5PUDQ="
|
||||
},
|
||||
{
|
||||
"name": "1014-drm-format-helper-add-helper-for-BGR888-to-XRGB8888-.patch",
|
||||
"hash": "sha256-iBM2z+/jZb/3+c9wHjC7W359oRl+DzFDZ1KL5eUc3qo="
|
||||
"name": "1014-drm-format-helper-Add-conversion-from-XRGB8888-to-BG.patch",
|
||||
"hash": "sha256-Ky19+cCiYDaHBh2o5IhZO8J1ExDT7o8K9cgPz+AL8Cg="
|
||||
},
|
||||
{
|
||||
"name": "1015-drm-tiny-add-driver-for-Apple-Touch-Bars-in-x86-Macs.patch",
|
||||
"hash": "sha256-sTb+ruY6W18wz9XRJzZKlfl4a8fGo1nrtCoOYNaPAjI="
|
||||
"hash": "sha256-zFeDJeoM/XS+Ds3DBLEcv4JbUhlEk9z4rHQ4t6XaghA="
|
||||
},
|
||||
{
|
||||
"name": "2008-i915-4-lane-quirk-for-mbp15-1.patch",
|
||||
@@ -94,8 +90,20 @@
|
||||
"hash": "sha256-skYKmLsJ6O42/wINLccZWoKS0XhVlC1Nfxi1Ekloxns="
|
||||
},
|
||||
{
|
||||
"name": "4001-Input-bcm5974-Add-support-for-the-T2-Macs.patch",
|
||||
"hash": "sha256-CaviinY3rYqQh+/DGyeBTzLL/ZfIvguOQlWCs3KN4zc="
|
||||
"name": "4001-asahi-trackpad.patch",
|
||||
"hash": "sha256-NOuGgUxDQEfFPlij/EnhWmgqeG3/l+j+r2T1YJG7raY="
|
||||
},
|
||||
{
|
||||
"name": "4002-HID-quirks-remove-T2-devices-from-hid_mouse_ignore_l.patch",
|
||||
"hash": "sha256-DdUo4/4254VD+MzEaLI3opSS0Z7+UwsitJaS2lAlpI8="
|
||||
},
|
||||
{
|
||||
"name": "4003-HID-apple-ignore-the-trackpad-on-T2-Macs.patch",
|
||||
"hash": "sha256-PZpdvPKvVsLsg3vx3jmq3QCapBUcUVE35N37usBRb6g="
|
||||
},
|
||||
{
|
||||
"name": "4004-HID-magicmouse-Add-support-for-trackpads-found-on-T2.patch",
|
||||
"hash": "sha256-pmGR0JdMMwGWG3zwMwMBuSyzltLvvzjTgfi1Ii1cglk="
|
||||
},
|
||||
{
|
||||
"name": "7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch",
|
||||
@@ -103,7 +111,7 @@
|
||||
},
|
||||
{
|
||||
"name": "8001-Add-APFS-driver.patch",
|
||||
"hash": "sha256-RjEhzCqGvwRSGFjMgg1Z1kFwbxB9VT3SkVKoOdtDvP0="
|
||||
"hash": "sha256-xjB7lqE4bweUvDa6Tx6LurxWlUlX4nUN+DbTRQb5bQI="
|
||||
},
|
||||
{
|
||||
"name": "8002-Necessary-modifications-to-build-APFS-with-the-kerne.patch",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
../cpu-only.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./cpu-only.nix
|
||||
../../../gpu/intel/skylake
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
boot.kernelParams = [
|
||||
"i915.enable_guc=2"
|
||||
];
|
||||
|
||||
# VP9 decoding not supported when using intel-media-driver
|
||||
# https://github.com/intel/media-driver/issues/1024
|
||||
# NixOS Wiki recommends using the legacy intel-vaapi-driver with the hybrid codec over that one for Skylake.
|
||||
# https://wiki.nixos.org/wiki/Accelerated_Video_Playback
|
||||
hardware.intelgpu = {
|
||||
vaapiDriver = "intel-vaapi-driver";
|
||||
enableHybridCodec = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
## Dell Inspiron 7559
|
||||
|
||||
### Tested Hardware
|
||||
|
||||
```shellsession
|
||||
$ lspci -nn
|
||||
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1910] (rev 07)
|
||||
00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
|
||||
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) [8086:1905] (rev 07)
|
||||
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
|
||||
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 07)
|
||||
00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)
|
||||
00:14.2 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem [8086:a131] (rev 31)
|
||||
00:15.0 Signal processing controller [1180]: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 [8086:a160] (rev 31)
|
||||
00:16.0 Communication controller [0780]: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a] (rev 31)
|
||||
00:17.0 SATA controller [0106]: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] [8086:a103] (rev 31)
|
||||
00:1c.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 [8086:a110] (rev f1)
|
||||
00:1c.4 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 [8086:a114] (rev f1)
|
||||
00:1c.5 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 [8086:a115] (rev f1)
|
||||
00:1c.6 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #7 [8086:a116] (rev f1)
|
||||
00:1f.0 ISA bridge [0601]: Intel Corporation HM170 Chipset LPC/eSPI Controller [8086:a14e] (rev 31)
|
||||
00:1f.2 Memory controller [0580]: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121] (rev 31)
|
||||
00:1f.3 Audio device [0403]: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] (rev 31)
|
||||
00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)
|
||||
02:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev a2)
|
||||
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
|
||||
05:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 79)
|
||||
06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01)
|
||||
|
||||
```
|
||||
|
||||
### Extra Configuration
|
||||
|
||||
#### Bluetooth
|
||||
|
||||
To enable bluetooth support, set `hardware.bluetooth.enable = true;`.
|
||||
|
||||
#### Prime Offloading
|
||||
|
||||
This configuration uses Nvidia Prime offloading, which allows use of the `nvidia-offload` script for running commands on the dGPU. For example, you can instruct Steam to launch a game offloaded to the GPU by setting the launch options for that game to `nvidia-offload %command%`.
|
||||
|
||||
#### SSD
|
||||
|
||||
This laptop has an optional M.2 SSD slot, which isn't accounted for here. If you are using the SSD, you could look into implementing the options in [ssd](common/pc/laptop/ssd) manually. Some sources also say you should ensure your SATA Mode is set to AHCI in your BIOS for it to be detected, however I think this is a prerequisite to installing Linux on this laptop in the first place so you probably already have that set.
|
||||
|
||||
#### Subwoofer
|
||||
|
||||
Tested with the default PipeWire configuration on Plasma, the subwoofer appears to work depending on the device Profile in sound settings ("Analog Stereo Duplex" works best for me). I have had issues with it in the past on other distros, so if it's not working on your system you could try the solution in [this thread](https://bbs.archlinux.org/viewtopic.php?id=207222).
|
||||
|
||||
#### Other issues
|
||||
|
||||
There are plenty of documented bugs and threads around issues on Dell laptops like this. Some of them stem from using the nouveau drivers, but we're using the proprietary Nvidia drivers here. Some things to look into if you're experiencing issues:
|
||||
|
||||
* I/O is slow: `nouveau` could be added as a kernel blocklist item: searching this repo shows other laptops with this configuration
|
||||
* Power drain while sleeping: add the following as boot.kernelParams: `"mem_sleep_default=deep"`
|
||||
* Issues coming back from suspend (particularly if the previous kernelParam is applied): add the following as boot.kernelParams: `"acpi_rev_override=1"` `"acpi_osi=Linux"`
|
||||
* I also spotted [one person recommending](https://connorkuehl.github.io/dell-inspiron-7559-linux-guide/) setting just `"acpi_osi="`. This article is quite old though and I haven't tested the difference.
|
||||
* Brightness function keys don't work: add the following as boot.kernelParams: `"acpi_backlight=vendor"` or `"acpi_backlight=native"`
|
||||
@@ -0,0 +1,24 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/hdd
|
||||
../../../common/cpu/intel/skylake
|
||||
../../../common/gpu/nvidia/maxwell
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
];
|
||||
|
||||
hardware = {
|
||||
nvidia.prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:2:0:0";
|
||||
};
|
||||
|
||||
enableRedistributableFirmware = lib.mkDefault true;
|
||||
};
|
||||
|
||||
services = {
|
||||
thermald.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/cpu/intel/lunar-lake
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
dell-inspiron-5515 = import ./dell/inspiron/5515;
|
||||
dell-inspiron-7405 = import ./dell/inspiron/7405;
|
||||
dell-inspiron-7460 = import ./dell/inspiron/7460;
|
||||
dell-inspiron-7559 = import ./dell/inspiron/7559;
|
||||
dell-latitude-3340 = import ./dell/latitude/3340;
|
||||
dell-latitude-3480 = import ./dell/latitude/3480;
|
||||
dell-latitude-5490 = import ./dell/latitude/5490;
|
||||
@@ -173,6 +174,7 @@
|
||||
lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475;
|
||||
lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd;
|
||||
lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel;
|
||||
lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel;
|
||||
lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470;
|
||||
lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495;
|
||||
lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13;
|
||||
@@ -187,6 +189,7 @@
|
||||
lenovo-thinkpad-p14s-amd-gen3 = import ./lenovo/thinkpad/p14s/amd/gen3;
|
||||
lenovo-thinkpad-p14s-amd-gen4 = import ./lenovo/thinkpad/p14s/amd/gen4;
|
||||
lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3;
|
||||
lenovo-thinkpad-p14s-intel-gen5 = import ./lenovo/thinkpad/p14s/intel/gen5;
|
||||
lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1;
|
||||
lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2;
|
||||
lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50;
|
||||
@@ -326,6 +329,7 @@
|
||||
tuxedo-aura-15-gen1 = import ./tuxedo/aura/15/gen1;
|
||||
tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4;
|
||||
tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7;
|
||||
tuxedo-infinitybook-pro14-gen9-intel = import ./tuxedo/infinitybook/pro14/gen9-intel;
|
||||
tuxedo-pulse-14-gen3 = import ./tuxedo/pulse/14/gen3;
|
||||
tuxedo-pulse-15-gen2 = import ./tuxedo/pulse/15/gen2;
|
||||
xiaomi-redmibook-16-pro-2024 = import ./xiaomi/redmibook/16-pro-2024;
|
||||
|
||||
@@ -9,9 +9,10 @@ Symptoms:
|
||||
- It goes into suspend, then seems to boot and hang. Sometimes it suspends successfully, but waking it from suspend puts it in the "zombie" state.
|
||||
- By playing chicken with volatile storage and flicking the power switch on the back of power supply, you can sometimes get it to wake from suspend as the card un-powers before volatile storage does.
|
||||
|
||||
Fix: disable GPP0 and GPP8 (And, for some cards, potentially PTXH, I can't test) in /proc/acpi/wakeup
|
||||
- To do this permanently, a systemd service is provided
|
||||
This can be fixed by disabling GPP0 and GPP8 (And, for some cards, potentially PTXH, I can't test) in /proc/acpi/wakeup.
|
||||
|
||||
But because /proc/acpi/wakeup only supports toggling (not disabling) wakeups, we use a udev rule to disable wakeups for
|
||||
the same device by PCI device ID instead.
|
||||
|
||||
## This affects at least:
|
||||
- Gigabyte b550m-d3sh (my machine)
|
||||
|
||||
@@ -1,35 +1,13 @@
|
||||
{ pkgs, lib, ... } :
|
||||
|
||||
{
|
||||
systemd.services.bugfixSuspend-GPP0 = {
|
||||
enable = lib.mkDefault true;
|
||||
description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)";
|
||||
unitConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "root"; # root may not be necessary
|
||||
# check for gppN, disable if enabled
|
||||
# lifted from https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay
|
||||
ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP0' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP0' > /proc/acpi/wakeup; fi'";
|
||||
RemainAfterExit = "yes"; # required to not toggle when `nixos-rebuild switch` is ran
|
||||
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
systemd.services.bugfixSuspend-GPP8 = {
|
||||
enable = lib.mkDefault true;
|
||||
description = "Fix crash on wakeup from suspend/hibernate (b550 bugfix)";
|
||||
unitConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStart = "-${pkgs.bash}/bin/bash -c 'if grep 'GPP8' /proc/acpi/wakeup | grep -q 'enabled'; then echo 'GPP8' > /proc/acpi/wakeup; fi'";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
# Work around an issue causing the system to unsuspend immediately after suspend
|
||||
# and/or hang after suspend.
|
||||
#
|
||||
# See https://www.reddit.com/r/gigabyte/comments/p5ewjn/comment/ksbm0mb/ /u/Demotay
|
||||
#
|
||||
# Most suggestions elsewhere are to disable GPP0 and/or GPP8 using /proc/acpi/wakeup, but that is
|
||||
# inconvenient because it toggles. This does essentially the same thing using udev, which can set
|
||||
# the wakeup attribute to a specific value.
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1022", ATTR{device}=="0x1483", ATTR{power/wakeup}="disabled"
|
||||
'';
|
||||
}
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttr: {
|
||||
pname = "bmi260";
|
||||
version = "1.0.0";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hhd-dev";
|
||||
repo = finalAttr.pname;
|
||||
rev = "v${finalAttr.version}";
|
||||
hash = "sha256-EFous0pPpCuVoCsFz6/4NryQRSH9Jw9Qng+RY1hiX1c=";
|
||||
hash = "sha256-So8rWDTXYsMUgLBU9WrJp47txA8dI98tcxXNy92AYgg=";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
@@ -38,6 +38,6 @@ stdenv.mkDerivation (finalAttr: {
|
||||
gpl2Only
|
||||
];
|
||||
maintainers = with maintainers; [ Cryolitia ];
|
||||
platforms = platforms.linux;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,45 @@
|
||||
# Lenovo Thinkpad E15
|
||||
|
||||
This is tested on an [E15 Gen4](https://psref.lenovo.com/WDProduct/ThinkPad/ThinkPad_E15_Gen_4_Intel).
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
```bash
|
||||
lspci -nn
|
||||
00:00.0 Host bridge [0600]: Intel Corporation Alder Lake-U15 Host and DRAM Controller [8086:4601] (rev 04)
|
||||
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics] [8086:46a8] (rev 0c)
|
||||
00:04.0 Signal processing controller [1180]: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant [8086:461d] (rev 04)
|
||||
00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 04)
|
||||
00:07.0 PCI bridge [0604]: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 [8086:466e] (rev 04)
|
||||
00:08.0 System peripheral [0880]: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator [8086:464f] (rev 04)
|
||||
00:0a.0 Signal processing controller [1180]: Intel Corporation Platform Monitoring Technology [8086:467d] (rev 01)
|
||||
00:0d.0 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller [8086:461e] (rev 04)
|
||||
00:0d.2 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 [8086:463e] (rev 04)
|
||||
00:0d.3 USB controller [0c03]: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #1 [8086:466d] (rev 04)
|
||||
00:14.0 USB controller [0c03]: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller [8086:51ed] (rev 01)
|
||||
00:14.2 RAM memory [0500]: Intel Corporation Alder Lake PCH Shared SRAM [8086:51ef] (rev 01)
|
||||
00:14.3 Network controller [0280]: Intel Corporation Alder Lake-P PCH CNVi WiFi [8086:51f0] (rev 01)
|
||||
00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01)
|
||||
00:15.2 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #2 [8086:51ea] (rev 01)
|
||||
00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01)
|
||||
00:1f.0 ISA bridge [0601]: Intel Corporation Alder Lake PCH eSPI Controller [8086:5182] (rev 01)
|
||||
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Alder Lake PCH-P High Definition Audio Controller [8086:51c8] (rev 01)
|
||||
00:1f.4 SMBus [0c05]: Intel Corporation Alder Lake PCH-P SMBus Host Controller [8086:51a3] (rev 01)
|
||||
00:1f.5 Serial bus controller [0c80]: Intel Corporation Alder Lake-P PCH SPI Controller [8086:51a4] (rev 01)
|
||||
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (16) I219-V [8086:1a1f] (rev 01)
|
||||
01:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD PC SN740 NVMe SSD 512GB (DRAM-less) [15b7:5016] (rev 01)
|
||||
```
|
||||
|
||||
## Updating Firmware
|
||||
|
||||
First enable `fwupd` in your config
|
||||
|
||||
```nix
|
||||
services.fwupd.enable = true;
|
||||
```
|
||||
|
||||
Then run
|
||||
|
||||
```bash
|
||||
$ fwupdmgr update
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# Force use of the thinkpad_acpi driver for backlight control.
|
||||
# This allows the backlight save/load systemd service to work.
|
||||
"acpi_backlight=native"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../common/cpu/intel/alder-lake
|
||||
];
|
||||
|
||||
services.throttled.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
../../../../../common/gpu/nvidia/prime.nix
|
||||
../../../../../common/gpu/nvidia/turing
|
||||
];
|
||||
|
||||
hardware = {
|
||||
intelgpu.driver = "i915"; #xe driver may be used on newer kernels
|
||||
nvidia = {
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,4 +5,6 @@
|
||||
];
|
||||
|
||||
services.xserver.wacom.enable = lib.mkDefault config.services.xserver.enable;
|
||||
|
||||
services.hardware.bolt.enable = lib.mkDefault true;
|
||||
}
|
||||
@@ -7,14 +7,14 @@ let
|
||||
|
||||
cfg = config.microsoft-surface;
|
||||
|
||||
version = "6.12.17";
|
||||
version = "6.12.19";
|
||||
kernelPatches = surfacePatches {
|
||||
inherit version;
|
||||
patchFn = ./patches.nix;
|
||||
};
|
||||
kernelPackages = linuxPackage {
|
||||
inherit version kernelPatches;
|
||||
sha256 = "sha256-XCBc00+Al05Jc+MhywCPX2iVqKqMJXfwapRIzXfeY7M=";
|
||||
sha256 = "sha256-1zvwV77ARDSxadG2FkGTb30Ml865I6KB8y413U3MZTE=";
|
||||
ignoreConfigErrors=true;
|
||||
};
|
||||
|
||||
|
||||
@@ -12,3 +12,11 @@ firmware.
|
||||
|
||||
Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to
|
||||
deal with and understand than having to deal with _U-Boot_ manually.
|
||||
|
||||
## Console
|
||||
|
||||
To configure default console I/O to use serial instead of HDMI (default):
|
||||
|
||||
```nix
|
||||
hardware.rockpro64.console = "serial";
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
options.hardware.rockpro64.console = lib.mkOption {
|
||||
default = "hdmi";
|
||||
description = "Default console to use at boot.";
|
||||
type = lib.types.enum [
|
||||
"hdmi"
|
||||
"serial"
|
||||
];
|
||||
};
|
||||
config = lib.mkIf (config.hardware.rockpro64.console == "hdmi") {
|
||||
boot.kernelParams = [
|
||||
"console=ttyS0"
|
||||
"console=tty0"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,17 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./console.nix
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
# PCIe/NVMe
|
||||
"nvme"
|
||||
"pcie_rockchip_host"
|
||||
"phy_rockchip_pcie"
|
||||
# Network
|
||||
"dwmac_rk"
|
||||
# HDMI
|
||||
"rockchipdrm"
|
||||
];
|
||||
# control the fan on the rockpro64 (like the one in the NAS case)
|
||||
hardware.fancontrol = {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{ lib, options, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common/pc/laptop
|
||||
../../common/pc/ssd
|
||||
];
|
||||
|
||||
# Enable TUXEDO's kernel drivers if they are available
|
||||
hardware = lib.optionalAttrs (options.hardware ? tuxedo-drivers) {
|
||||
tuxedo-drivers.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../.
|
||||
../../../../common/cpu/intel
|
||||
../../../../common/pc/laptop
|
||||
../../../../common/pc/ssd
|
||||
];
|
||||
|
||||
# Cooling management
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# [TUXEDO InfinityBook Pro 14 - Gen9 - INTEL](https://www.tuxedocomputers.com/en/TUXEDO-InfinityBook-Pro-14-Gen9-INTEL)
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
../../.
|
||||
../../../../common/cpu/intel
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user