mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-01 05:23:29 +01:00
Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce98bebf0f | ||
|
|
e7ac747157 | ||
|
|
c3e369baa6 | ||
|
|
cb3173dc5c | ||
|
|
f8d5f4ea3e | ||
|
|
abe22227d7 | ||
|
|
3883dfe5ee | ||
|
|
b31613ae10 | ||
|
|
b678606690 | ||
|
|
91c1069cba | ||
|
|
06c52bbc79 | ||
|
|
8870dcaff6 | ||
|
|
e315f86472 | ||
|
|
d73a04dabf | ||
|
|
4f339f6be2 | ||
|
|
ca30f8501a | ||
|
|
75a920536c | ||
|
|
95a812557b | ||
|
|
4c5c3be74d | ||
|
|
d3b4fe46c8 | ||
|
|
b98df1827a | ||
|
|
4c0d42b582 |
No files matched your search
@@ -93,6 +93,8 @@ See code for all available configurations.
|
||||
| [Apple Macs with a T2 Chip](apple/t2) | `<nixos-hardware/apple/t2>` |
|
||||
| [Asus Pro WS X570-ACE](asus/pro-ws-x570-ace) | `<nixos-hardware/asus/pro-ws-x570-ace>` |
|
||||
| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `<nixos-hardware/asus/ally/rc71l>` |
|
||||
| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `<nixos-hardware/asus/flow/gv302x/amdgpu>` |
|
||||
| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `<nixos-hardware/asus/flow/gv302x/nvidia>` |
|
||||
| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `<nixos-hardware/asus/rog-strix/g513im>` |
|
||||
| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `<nixos-hardware/asus/rog-strix/g713ie>` |
|
||||
| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `<nixos-hardware/asus/rog-strix/g733qs>` |
|
||||
@@ -107,6 +109,7 @@ See code for all available configurations.
|
||||
| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `<nixos-hardware/asus/zephyrus/gu603h>` |
|
||||
| [Asus TUF FX504GD](asus/fx504gd) | `<nixos-hardware/asus/fx504gd>` |
|
||||
| [Asus TUF FX506HM](asus/fx506hm) | `<nixos-hardware/asus/fx506hm>` |
|
||||
| [Asus TUF FA506IC](asus/fa506ic) | `<nixos-hardware/asus/fa506ic>` |
|
||||
| [Asus TUF FA507RM](asus/fa507rm) | `<nixos-hardware/asus/fa507rm>` |
|
||||
| [Asus TUF FA507NV](asus/fa507nv) | `<nixos-hardware/asus/fa507nv>` |
|
||||
| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `<nixos-hardware/asus/zenbook/ux371>` |
|
||||
@@ -122,6 +125,7 @@ See code for all available configurations.
|
||||
| [Dell Inspiron 7460](dell/inspiron/7460) | `<nixos-hardware/dell/inspiron/7460>` |
|
||||
| [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>` |
|
||||
| [Dell Latitude 5520](dell/latitude/5520) | `<nixos-hardware/dell/latitude/5520>` |
|
||||
| [Dell Latitude 7280](dell/latitude/7280) | `<nixos-hardware/dell/latitude/7280>` |
|
||||
| [Dell Latitude 7390](dell/latitude/7390) | `<nixos-hardware/dell/latitude/7390>` |
|
||||
@@ -177,6 +181,7 @@ See code for all available configurations.
|
||||
| [GPD MicroPC](gpd/micropc) | `<nixos-hardware/gpd/micropc>` |
|
||||
| [GPD P2 Max](gpd/p2-max) | `<nixos-hardware/gpd/p2-max>` |
|
||||
| [GPD Pocket 3](gpd/pocket-3) | `<nixos-hardware/gpd/pocket-3>` |
|
||||
| [GPD Pocket 4](gpd/pocket-4) | `<nixos-hardware/gpd/pocket-4>` |
|
||||
| [GPD WIN 2](gpd/win-2) | `<nixos-hardware/gpd/win-2>` |
|
||||
| [GPD WIN Max 2 2023](gpd/win-max-2/2023) | `<nixos-hardware/gpd/win-max-2/2023>` |
|
||||
| [GPD WIN Mini 2024](gpd/win-mini/2024) | `<nixos-hardware/gpd/win-mini/2024>` |
|
||||
@@ -191,6 +196,7 @@ See code for all available configurations.
|
||||
| [Huawei Matebook X Pro (2020)](huawei/machc-wa) | `<nixos-hardware/huawei/machc-wa>` |
|
||||
| [i.MX8QuadMax Multisensory Enablement Kit](nxp/imx8qm-mek/) | `<nixos-hardware/nxp/imx8qm-mek>` |
|
||||
| [Intel NUC 8i7BEH](intel/nuc/8i7beh/) | `<nixos-hardware/intel/nuc/8i7beh>` |
|
||||
| [Lenovo IdeaCentre K330](lenovo/ideacentre/k330) | `<nixos-hardware/lenovo/ideacentre/k330>` |
|
||||
| [Lenovo IdeaPad 3 15alc6](lenovo/ideapad/15alc6) | `<nixos-hardware/lenovo/ideapad/15alc6>` |
|
||||
| [Lenovo IdeaPad Gaming 3 15arh05](lenovo/ideapad/15arh05) | `<nixos-hardware/lenovo/ideapad/15arh05>` |
|
||||
| [Lenovo IdeaPad Gaming 3 15ach6](lenovo/ideapad/15ach6) | `<nixos-hardware/lenovo/ideapad/15ach6>` |
|
||||
@@ -315,6 +321,7 @@ See code for all available configurations.
|
||||
| [Hardkernel Odroid HC4](hardkernel/odroid-hc4/default.nix) | `<nixos-hardware/hardkernel/odroid-hc4>` |
|
||||
| [Hardkernel Odroid H3](hardkernel/odroid-h3/default.nix) | `<nixos-hardware/hardkernel/odroid-h3>` |
|
||||
| [Omen 14-fb0798ng](omen/14-fb0798ng) | `<nixos-hardware/omen/14-fb0798ng>` |
|
||||
| [Omen 15-ce002ns](omen/15-ce002ns) | `<nixos-hardware/omen/15-ce002ns>` |
|
||||
| [Omen 15-en0010ca](omen/15-en0010ca) | `<nixos-hardware/omen/15-en0010ca>` |
|
||||
| [Omen 16-n0005ne](omen/16-n0005ne) | `<nixos-hardware/omen/16-n0005ne>` |
|
||||
| [Omen 16-n0280nd](/omen/16-n0280nd) | `<nixos-hardware/omen/16-n0280nd>` |
|
||||
@@ -335,6 +342,7 @@ See code for all available configurations.
|
||||
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` |
|
||||
| [Raspberry Pi 5](raspberry-pi/5) | `<nixos-hardware/raspberry-pi/5>` |
|
||||
| [Samsung Series 9 NP900X3C](samsung/np900x3c) | `<nixos-hardware/samsung/np900x3c>` |
|
||||
| [Slimbook Hero RPL-RTX](slimbook/hero/rpl-rtx) | `<nixos-hardware/slimbook/hero/rpl-rtx>` |
|
||||
| [StarFive VisionFive v1](starfive/visionfive/v1) | `<nixos-hardware/starfive/visionfive/v1>` |
|
||||
| [StarFive VisionFive 2](starfive/visionfive/v2) | `<nixos-hardware/starfive/visionfive/v2>` |
|
||||
| [StarLabs StarLite 5 (I5)](starlabs/starlite/i5) | `<nixos-hardware/starlabs/starlite/i5>` |
|
||||
@@ -352,3 +360,4 @@ See code for all available configurations.
|
||||
| [TUXEDO InfinityBook Pro 14 - Gen7](tuxedo/infinitybook/pro14/gen7) | `<nixos-hardware/tuxedo/infinitybook/pro14/gen7>` |
|
||||
| [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>` |
|
||||
@@ -0,0 +1,33 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/cpu/amd
|
||||
../../common/cpu/amd/pstate.nix
|
||||
../../common/gpu/amd
|
||||
../../common/gpu/nvidia/prime.nix
|
||||
../../common/gpu/nvidia/ampere
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
open = lib.mkDefault false;
|
||||
nvidiaSettings = lib.mkDefault true;
|
||||
dynamicBoost.enable = lib.mkDefault true;
|
||||
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:0:6:0";
|
||||
nvidiaBusId = "PCI:0:1:0";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
asusd = {
|
||||
enable = lib.mkDefault true;
|
||||
enableUserService = lib.mkDefault true;
|
||||
};
|
||||
supergfxd.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{ config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkMerge;
|
||||
cfg = config.hardware.asus.flow.gv302x;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../shared.nix
|
||||
];
|
||||
|
||||
options.hardware.asus.flow.gv302x.amdgpu = {
|
||||
recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = false; };
|
||||
sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = true; };
|
||||
psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { default = true; };
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.amdgpu.recovery.enable {
|
||||
# Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating
|
||||
# (Though, I'm very suspicious of the Mediatek Wifi...)
|
||||
boot.kernelParams = [
|
||||
"amdgpu.gpu_recovery=1"
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf (!cfg.amdgpu.sg_display.enable) {
|
||||
# Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled
|
||||
boot.kernelParams = [
|
||||
"amdgpu.sg_display=0"
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf (!cfg.amdgpu.psr.enable) {
|
||||
# Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled
|
||||
boot.kernelParams = [
|
||||
"amdgpu.dcdebugmask=0x10"
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{ lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../shared.nix
|
||||
## "prime.nix" loads this, aleady:
|
||||
# ../../../common/gpu/nvidia
|
||||
../../../../common/gpu/nvidia/prime.nix
|
||||
../../../../common/gpu/nvidia/ada-lovelace
|
||||
|
||||
];
|
||||
|
||||
# NVIDIA GeForce RTX 4070 Mobile
|
||||
|
||||
boot = {
|
||||
blacklistedKernelModules = [ "nouveau" ];
|
||||
};
|
||||
|
||||
|
||||
|
||||
hardware = {
|
||||
## Enable the Nvidia card, as well as Prime and Offload:
|
||||
amdgpu.initrd.enable = mkDefault true;
|
||||
|
||||
nvidia = {
|
||||
|
||||
#to avoid problems with gnome 47 vulkan
|
||||
package = mkDefault config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = mkDefault true;
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = mkDefault true;
|
||||
enableOffloadCmd = mkDefault true;
|
||||
};
|
||||
amdgpuBusId = "PCI:69:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
|
||||
powerManagement = {
|
||||
enable = mkDefault true;
|
||||
finegrained = mkDefault true;
|
||||
};
|
||||
|
||||
dynamicBoost.enable = mkDefault true;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
{ config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder;
|
||||
|
||||
cfg = config.hardware.asus.flow.gv302x;
|
||||
in {
|
||||
|
||||
imports = [
|
||||
../../../common/cpu/amd
|
||||
# Better power-savings from AMD PState:
|
||||
../../../common/cpu/amd/pstate.nix
|
||||
../../../common/gpu/amd
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/ssd
|
||||
];
|
||||
|
||||
options.hardware.asus.flow.gv302x = {
|
||||
# Kernels earlier than 6.9 (possibly even earlier) tend to take 1-2 key-presses
|
||||
# to wake-up the internal keyboard after the device is suspended.
|
||||
# Therefore, this option disables auto-suspend for the keyboard by default, but
|
||||
# enables it for kernel 6.9.x onwards.
|
||||
#
|
||||
# Note: the device name is "ASUS N-KEY Device".
|
||||
keyboard.autosuspend.enable = (
|
||||
mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Flow GV302X"
|
||||
) // {
|
||||
default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
|
||||
defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\"";
|
||||
};
|
||||
# The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop.
|
||||
# After the first successful hibernate, it will work as expected, however.
|
||||
# NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up.
|
||||
ite-device.wakeup.enable = mkEnableOption "Enable power wakeup on the internal USB keyboard-like device (8295 ITE Device) on Flow GV302X";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
# Configure basic system settings:
|
||||
boot = {
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelParams = [
|
||||
"mem_sleep_default=deep"
|
||||
"pcie_aspm.policy=powersupersave"
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
asusd = {
|
||||
enable = mkDefault true;
|
||||
enableUserService = mkDefault true;
|
||||
};
|
||||
|
||||
supergfxd.enable = mkDefault true;
|
||||
|
||||
udev = {
|
||||
extraHwdb = ''
|
||||
# Fixes mic mute button
|
||||
evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
|
||||
KEYBOARD_KEY_ff31007c=f20
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
#flow devices are 2 in 1 laptops
|
||||
hardware.sensor.iio.enable = mkDefault true;
|
||||
|
||||
}
|
||||
|
||||
(mkIf (! cfg.keyboard.autosuspend.enable) {
|
||||
services.udev.extraRules = ''
|
||||
# Disable power auto-suspend for the ASUS N-KEY device, i.e. USB Keyboard.
|
||||
# Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends.
|
||||
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{idVendor}=="0b05", ATTR{idProduct}=="19b6", ATTR{power/autosuspend}="-1"
|
||||
'';
|
||||
})
|
||||
|
||||
(mkIf (! cfg.ite-device.wakeup.enable) {
|
||||
services.udev.extraRules = ''
|
||||
# Disable power wakeup for the 8295 ITE device.
|
||||
# Otherwise on certain kernel-versions, it will tend to cause the laptop to immediately wake-up when suspending.
|
||||
# ACTION=="add|change", SUBSYSTEM=="usb", DRIVER="usb", TEST="power/wakeup", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193b", ATTR{power/wakeup}="disabled"
|
||||
ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="193b", ATTR{power/wakeup}="disabled"
|
||||
'';
|
||||
})
|
||||
|
||||
(mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal) {
|
||||
# Meditek doesn't seem to be quite sensitive enough on the default roaming settings:
|
||||
# https://wiki.archlinux.org/title/Wpa_supplicant#Roaming
|
||||
# https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming
|
||||
#
|
||||
# But NixOS doesn't have the tweaks for IWD, yet.
|
||||
networking.wireless.iwd.settings = {
|
||||
General = {
|
||||
RoamThreshold = -75;
|
||||
RoamThreshold5G = -80;
|
||||
RoamRetryInterval = 20;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
config = {
|
||||
hardware.intelgpu.driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe";
|
||||
boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "i915") [ "i915.enable_guc=3" ];
|
||||
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
boot = {
|
||||
# Kernel Panic on suspend fix, taken from ArchLinux wiki.
|
||||
kernelParams = "acpi_enforce_resources=lax i915.enable_dc=0";
|
||||
kernelParams = [ "acpi_enforce_resources=lax" "i915.enable_dc=0" ];
|
||||
# Audio Mute LED
|
||||
extraModprobeConfig = ''
|
||||
options snd-hda-intel model=mute-led-gpio
|
||||
|
||||
@@ -31,8 +31,11 @@
|
||||
asus-ally-rc71l = import ./asus/ally/rc71l;
|
||||
asus-fx504gd = import ./asus/fx504gd;
|
||||
asus-fx506hm = import ./asus/fx506hm;
|
||||
asus-fa506ic = import ./asus/fa506ic;
|
||||
asus-fa507nv = import ./asus/fa507nv;
|
||||
asus-fa507rm = import ./asus/fa507rm;
|
||||
asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu;
|
||||
asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia;
|
||||
asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace;
|
||||
asus-rog-strix-g513im = import ./asus/rog-strix/g513im;
|
||||
asus-rog-strix-g713ie = import ./asus/rog-strix/g713ie;
|
||||
@@ -61,6 +64,7 @@
|
||||
dell-inspiron-7460 = import ./dell/inspiron/7460;
|
||||
dell-latitude-3340 = import ./dell/latitude/3340;
|
||||
dell-latitude-3480 = import ./dell/latitude/3480;
|
||||
dell-latitude-5490 = import ./dell/latitude/5490;
|
||||
dell-latitude-5520 = import ./dell/latitude/5520;
|
||||
dell-latitude-7280 = import ./dell/latitude/7280;
|
||||
dell-latitude-7390 = import ./dell/latitude/7390;
|
||||
@@ -118,6 +122,7 @@
|
||||
gpd-micropc = import ./gpd/micropc;
|
||||
gpd-p2-max = import ./gpd/p2-max;
|
||||
gpd-pocket-3 = import ./gpd/pocket-3;
|
||||
gpd-pocket-4 = import ./gpd/pocket-4;
|
||||
gpd-win-2 = import ./gpd/win-2;
|
||||
gpd-win-max-2-2023 = import ./gpd/win-max-2/2023;
|
||||
gpd-win-mini-2024 = import ./gpd/win-mini/2024;
|
||||
@@ -130,6 +135,7 @@
|
||||
huawei-machc-wa = import ./huawei/machc-wa;
|
||||
hp-notebook-14-df0023 = import ./hp/notebook/14-df0023;
|
||||
intel-nuc-8i7beh = import ./intel/nuc/8i7beh;
|
||||
lenovo-ideacentre-k330 = import ./lenovo/ideacentre/k330;
|
||||
lenovo-ideapad-15alc6 = import ./lenovo/ideapad/15alc6;
|
||||
lenovo-ideapad-15arh05 = import ./lenovo/ideapad/15arh05;
|
||||
lenovo-ideapad-15ach6 = import ./lenovo/ideapad/15ach6;
|
||||
@@ -264,6 +270,7 @@
|
||||
hardkernel-odroid-hc4 = import ./hardkernel/odroid-hc4;
|
||||
hardkernel-odroid-h3 = import ./hardkernel/odroid-h3;
|
||||
omen-14-fb0798ng = import ./omen/14-fb0798ng;
|
||||
omen-15-ce002ns = import ./omen/15-ce002ns;
|
||||
omen-15-en0010ca = import ./omen/15-en0010ca;
|
||||
omen-16-n0005ne = import ./omen/16-n0005ne;
|
||||
omen-16-n0280nd = import ./omen/16-n0280nd;
|
||||
@@ -285,6 +292,7 @@
|
||||
raspberry-pi-5 = import ./raspberry-pi/5;
|
||||
kobol-helios4 = import ./kobol/helios4;
|
||||
samsung-np900x3c = import ./samsung/np900x3c;
|
||||
slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx;
|
||||
starfive-visionfive-v1 = import ./starfive/visionfive/v1;
|
||||
starfive-visionfive-2 = import ./starfive/visionfive/v2;
|
||||
starlabs-starlite-i5 = import ./starlabs/starlite/i5;
|
||||
@@ -303,6 +311,7 @@
|
||||
tuxedo-infinitybook-pro14-gen7 = import ./tuxedo/infinitybook/pro14/gen7;
|
||||
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;
|
||||
|
||||
common-cpu-amd = import ./common/cpu/amd;
|
||||
common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix;
|
||||
|
||||
@@ -27,43 +27,3 @@ As of firmware v03.03, a bug in the EC causes the system to wake if AC is connec
|
||||
```
|
||||
|
||||
See [Framework AMD Ryzen 7040 Series lid wakeup behavior feedback](https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45).
|
||||
|
||||
## Getting the fingerprint sensor to work
|
||||
|
||||
The firmware on the fingerprint sensor needs a downgrade to make it work on Linux.
|
||||
The process is documented [here](https://knowledgebase.frame.work/en_us/updating-fingerprint-reader-firmware-on-linux-for-13th-gen-and-amd-ryzen-7040-series-laptops-HJrvxv_za).
|
||||
|
||||
However on recent NixOS versions also fwupd can no longer update the firmware.
|
||||
Using the following snippet allows to temporarly downgrade fwupd to an old-enough version:
|
||||
|
||||
```nix
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
# we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
|
||||
services.fwupd.package = (import (builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
|
||||
sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
|
||||
}) {
|
||||
inherit (pkgs) system;
|
||||
}).fwupd;
|
||||
}
|
||||
```
|
||||
|
||||
Afterwards the downgraded driver can be downloaded and installed like this:
|
||||
|
||||
```
|
||||
wget https://github.com/FrameworkComputer/linux-docs/raw/main/goodix-moc-609c-v01000330.cab
|
||||
sudo fwupdtool install --allow-reinstall --allow-older goodix-moc-609c-v01000330.cab
|
||||
Loading… [ - ]/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/f55npw04a2s6xmrbx4jw12xq16b3avb8-gvfs-1.52.1/lib/gio/modules/libgvfsdbus.so)
|
||||
Failed to load module: /nix/store/f55npw04a2s6xmrbx4jw12xq16b3avb8-gvfs-1.52.1/lib/gio/modules/libgvfsdbus.so
|
||||
Loading… [ ]12:16:46.348 FuHistory schema version 9 is unknown
|
||||
Writing… [************************************* ]12:16:57.055 FuEngine failed to update-cleanup after failed update: failed to get device before update cleanup: failed to wait for detach replug: device d432baa2162a32c1554ef24bd8281953b9d07c11 did not come back
|
||||
|
||||
failed to write: failed to reply: transfer timed out
|
||||
```
|
||||
|
||||
The error message above is harmless. After a reboot, I was able to enroll my fingerprint like this:
|
||||
|
||||
```
|
||||
sudo fprintd-enroll $USER
|
||||
```
|
||||
@@ -51,6 +51,17 @@ For the Framework 13 laptops, there are common configuration modules available u
|
||||
including some modules specific to AMD- or Intel-based laptops. By preference, there will already be a specialised
|
||||
module for your model's configuration. Otherwise, it can be added alongside the existing modules.
|
||||
|
||||
## OS integration
|
||||
|
||||
`hardware.framework.enableKmod` enables the [community-created Framework kernel
|
||||
module](https://github.com/DHowett/framework-laptop-kmod) which exposes EC functionality like battery charge limit,
|
||||
privacy switches, and system LEDs as standard driver interfaces. This enables, for example, configuring the charge limit
|
||||
using the KDE settings GUI. The option is enabled by default when NixOS `>= 24.05` and linux kernel version `>= 6.10`.
|
||||
|
||||
On AMD Framework 13 and 16, before kernel 6.10, additional kernel patches are required for the kernel module to function
|
||||
properly. Manually setting `hardware.framework.enableKmod = true` will apply the patches, requiring a kernel
|
||||
recompilation.
|
||||
|
||||
## Support Tools
|
||||
|
||||
### fw-ectool
|
||||
|
||||
+34
-9
@@ -1,17 +1,42 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
options.hardware.framework.enableKmod = lib.mkEnableOption
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
kernel_version_compatible = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.10";
|
||||
in {
|
||||
options.hardware.framework.enableKmod = (lib.mkEnableOption
|
||||
"Enable the community created Framework kernel module that allows interacting with the embedded controller from sysfs."
|
||||
// {
|
||||
# Enable by default if on new enough version of NixOS
|
||||
default = (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05");
|
||||
) // {
|
||||
# enable by default on NixOS >= 24.05 and kernel >= 6.10
|
||||
default = lib.and
|
||||
(lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.05")
|
||||
kernel_version_compatible;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.hardware.framework.enableKmod {
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||
|
||||
config.boot = lib.mkIf config.hardware.framework.enableKmod {
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
framework-laptop-kmod
|
||||
];
|
||||
|
||||
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
|
||||
boot.kernelModules = [ "cros_ec" "cros_ec_lpcs" ];
|
||||
kernelModules = [ "cros_ec" "cros_ec_lpcs" ];
|
||||
|
||||
# add required patch if enabled on kernel <6.10
|
||||
kernelPatches = lib.mkIf (!kernel_version_compatible) [
|
||||
rec {
|
||||
name = "platform/chrome: cros_ec_lpc: add support for AMD Framework Laptops";
|
||||
msgid = "20240403004713.130365-1-dustin@howett.net";
|
||||
version = "3";
|
||||
hash = "sha256-aQSyys8CMzlj9EdNhg8vtp76fg1qEwUVeJL0E+8w5HU=";
|
||||
patch = pkgs.runCommandLocal "patch-${msgid}" {
|
||||
nativeBuildInputs = with pkgs; [ b4 git cacert ];
|
||||
SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
outputHash = hash;
|
||||
} ''
|
||||
export HOME="$TMP"
|
||||
PYTHONHASHSEED=0 ${pkgs.b4}/bin/b4 -n am -C -T -v ${version} -o- "${msgid}" > "$out"
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let inherit (lib) mkDefault;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/cpu/amd
|
||||
../../common/cpu/amd/pstate.nix
|
||||
../../common/gpu/amd
|
||||
../../common/hidpi.nix
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
# The GPD Pocket 4 uses a tablet LTPS display, that is mounted rotated 90° counter-clockwise
|
||||
"fbcon=rotate:1" "video=eDP-1:panel_orientation=right_side_up"
|
||||
];
|
||||
|
||||
fonts.fontconfig = {
|
||||
subpixel.rgba = "vbgr"; # Pixel order for rotated screen
|
||||
|
||||
# The display has √(2560² + 1600²) px / 8.8in ≃ 343 dpi
|
||||
# Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow.
|
||||
hinting.enable = mkDefault false;
|
||||
};
|
||||
|
||||
# More HiDPI settings
|
||||
services.xserver.dpi = 343;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# Lenovo IdeaCentre K330
|
||||
|
||||
The specific system I took for reference has the following hardware configuration:
|
||||
|
||||
- Intel Core i7 2600
|
||||
- NVIDIA GeForce GT 545 [Latest supported (proprietary) driver (390.xx)](https://www.nvidia.com/en-us/drivers/details/196213/)
|
||||
- Some SSD (originally had a Seagate Barracuda hard drive)
|
||||
|
||||
This hardware configuration was motivated by #1297
|
||||
|
||||
I recommend enabling xserver instead of trying to use Wayland. As documented in the above linked issue, using Wayland with this rather old hardware lead to the system freezing after a short time of operation.
|
||||
|
||||
```nix
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/gpu/nvidia # Is it possible/advisable to pin this to the 390.xx driver family in case the user wants to use non-free drivers?
|
||||
../../../common/gpu/amd # The K330 could be bought with AMD GPUs but I don't have that configuration
|
||||
../../../common/pc
|
||||
];
|
||||
|
||||
# On my machine Wayland causes the desktop to freeze after a short time of operation
|
||||
services.displayManager.sddm.wayland.enable = false;
|
||||
|
||||
# Should this be a conditional default in case plasma is activated?
|
||||
# What if somebody installs both plasma AND another DE?
|
||||
# The goal is to prefer x11 over wayland due to compatibility issues with the old hardware
|
||||
|
||||
|
||||
services.displayManager.defaultSession = lib.mkIf config.services.xserver.desktopManager.plasma6.enable (lib.mkDefault "plasmax11");
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, ...}:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -7,10 +7,15 @@
|
||||
|
||||
environment.etc."asound.conf".source = ./asound.conf;
|
||||
|
||||
networking.networkmanager.fccUnlockScripts = [
|
||||
{
|
||||
id = "2c7c:030a";
|
||||
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/2c7c:030a";
|
||||
}
|
||||
];
|
||||
networking =
|
||||
let
|
||||
fcc_unlock_script = rec {
|
||||
id = "2c7c:030a";
|
||||
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/${id}";
|
||||
};
|
||||
in
|
||||
if lib.versionOlder lib.version "25.05pre" then
|
||||
{ networkmanager.fccUnlockScripts = [ fcc_unlock_script ]; }
|
||||
else
|
||||
{ modemmanager.fccUnlockScripts = [ fcc_unlock_script ]; };
|
||||
}
|
||||
@@ -7,14 +7,14 @@ let
|
||||
|
||||
cfg = config.microsoft-surface;
|
||||
|
||||
version = "6.12.8";
|
||||
version = "6.12.9";
|
||||
kernelPatches = surfacePatches {
|
||||
inherit version;
|
||||
patchFn = ./patches.nix;
|
||||
};
|
||||
kernelPackages = linuxPackage {
|
||||
inherit version kernelPatches;
|
||||
sha256 = "sha256-IpHaBlygS3Fcie5QNirsPwIadBS8lj8bVnNmgsgSKXk=";
|
||||
sha256 = "sha256-h74DYN8JMbNA0rrDUWGlSAcPvDqMNSxJ4h6WZmwmrrQ=";
|
||||
ignoreConfigErrors=true;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# HP Omen 15-ce002ns
|
||||
|
||||
Profile for the following laptop: https://support.hp.com/us-en/document/c05552952
|
||||
|
||||
```bash
|
||||
$ lspci -nn
|
||||
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5910] (rev 05)
|
||||
00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 05)
|
||||
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 05)
|
||||
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:1d.0 PCI bridge [0604]: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9 [8086:a118] (rev f1)
|
||||
00:1f.0 ISA bridge [0601]: Intel Corporation HM175 Chipset LPC/eSPI Controller [8086:a152] (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 CM238 HD Audio Controller [8086:a171] (rev 31)
|
||||
00:1f.4 SMBus [0c05]: Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123] (rev 31)
|
||||
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106BM [GeForce GTX 1060 Mobile 6GB] [10de:1c60] (rev a1)
|
||||
01:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)
|
||||
3b:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 16)
|
||||
3c:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 61)
|
||||
3d:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader [10ec:522a] (rev 01)
|
||||
3e:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961/SM963 [144d:a804]
|
||||
```
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../common/cpu/intel/kaby-lake
|
||||
../../common/gpu/nvidia/pascal
|
||||
../../common/pc/laptop
|
||||
../../common/pc/laptop/ssd
|
||||
../../common/pc/laptop/hdd
|
||||
];
|
||||
}
|
||||
@@ -13,10 +13,7 @@
|
||||
loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
generationsDir.enable = lib.mkDefault false;
|
||||
raspberryPi = {
|
||||
enable = lib.mkDefault true;
|
||||
version = lib.mkDefault 2;
|
||||
};
|
||||
generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
# [Slimbook HERO](https://slimbook.com/en/shop/product/hero-intel-i7-13620h-1115)
|
||||
|
||||
This configuration is for the Slimbook Hero with an i7-13620H and an RTX 4060.
|
||||
Model name: SLIMBOOK HERO-RPL-RTX.
|
||||
|
||||
To run software on your Nvidia GPU, use the `nvidia-offload` command. For example:
|
||||
```bash
|
||||
nvidia-offload `nix-shell -p glxinfo --run 'glxgears'`
|
||||
```
|
||||
For more information, visit: https://wiki.nixos.org/wiki/NVIDIA#Offload_mode
|
||||
|
||||
<details><summary>System information</summary>
|
||||
|
||||
```bash
|
||||
>neofetch
|
||||
OS: NixOS 24.11.20241216.3945713 (Vicuna) x86_64
|
||||
Host: SLIMBOOK HERO-RPL-RTX
|
||||
Kernel: 6.6.66
|
||||
Uptime: 37 mins
|
||||
Packages: 1296 (nix-system), 893 (nix-user), 2 (nix-default), 9 (flatpak)
|
||||
Shell: bash 5.2.37
|
||||
Resolution: 2560x1440
|
||||
DE: GNOME 47.1 (Wayland)
|
||||
WM: Mutter
|
||||
WM Theme: Adwaita
|
||||
Theme: Adwaita [GTK2/3]
|
||||
Icons: Adwaita [GTK2/3]
|
||||
Terminal: kgx
|
||||
CPU: 13th Gen Intel i7-13620H (16) @ 4.700GHz
|
||||
GPU: Intel Raptor Lake-P [UHD Graphics]
|
||||
GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile
|
||||
Memory: 4448MiB / 15734MiB
|
||||
|
||||
$ lspci -nn
|
||||
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:a715]
|
||||
00:01.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCI Express 5.0 Graphics Port (PEG010) [8086:a70d]
|
||||
00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [UHD Graphics] [8086:a7a8] (rev 04)
|
||||
00:04.0 Signal processing controller [1180]: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant [8086:a71d]
|
||||
00:06.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port [8086:a74d]
|
||||
00:06.2 PCI bridge [0604]: Intel Corporation Device [8086:a73d]
|
||||
00:08.0 System peripheral [0880]: Intel Corporation GNA Scoring Accelerator module [8086:a74f]
|
||||
00:0a.0 Signal processing controller [1180]: Intel Corporation Raptor Lake Crashlog and Telemetry [8086:a77d] (rev 01)
|
||||
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 Raptor Lake PCH CNVi WiFi [8086:51f1] (rev 01)
|
||||
00:15.0 Serial bus controller [0c80]: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 [8086:51e8] (rev 01)
|
||||
00:16.0 Communication controller [0780]: Intel Corporation Alder Lake PCH HECI Controller [8086:51e0] (rev 01)
|
||||
00:1c.0 PCI bridge [0604]: Intel Corporation Alder Lake PCH-P PCI Express Root Port #9 [8086:51bf] (rev 01)
|
||||
00:1f.0 ISA bridge [0601]: Intel Corporation Raptor Lake LPC/eSPI Controller [8086:519d] (rev 01)
|
||||
00:1f.3 Audio device [0403]: Intel Corporation Raptor Lake-P/U/H cAVS [8086:51ca] (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)
|
||||
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28a0] (rev a1)
|
||||
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:22be] (rev a1)
|
||||
02:00.0 Non-Volatile memory controller [0108]: MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202 (DRAM-less) [1e4b:1202] (rev 01)
|
||||
03:00.0 Non-Volatile memory controller [0108]: Micron Technology Inc 2550 NVMe SSD (DRAM-less) [1344:5416] (rev 01)
|
||||
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Power Management
|
||||
My testing shows suspend issues (tested in GNOME) when using `hardware.nvidia.powerManagement.enabled = true`, regardless of the value of `hardware.nvidia.powerManagement.finegrained`.
|
||||
This seems related to this [issue](https://github.com/NixOS/nixpkgs/issues/336723), which is offered a solution in [this discouse thread](https://discourse.nixos.org/t/suspend-resume-cycling-on-system-resume/32322/12) with this config:
|
||||
|
||||
<details>
|
||||
|
||||
```nix
|
||||
systemd = {
|
||||
services."gnome-suspend" = {
|
||||
description = "suspend gnome shell";
|
||||
before = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
"nvidia-suspend.service"
|
||||
"nvidia-hibernate.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''${pkgs.procps}/bin/pkill -f -STOP ${pkgs.gnome-shell}/bin/gnome-shell'';
|
||||
};
|
||||
};
|
||||
services."gnome-resume" = {
|
||||
description = "resume gnome shell";
|
||||
after = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
"nvidia-resume.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"systemd-suspend.service"
|
||||
"systemd-hibernate.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''${pkgs.procps}/bin/pkill -f -CONT ${pkgs.gnome-shell}/bin/gnome-shell'';
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
At the same time, the Nvidia driver reports power management to still be working even with `nvidia.powerManagement.enable = false`:
|
||||
```bash
|
||||
>cat /proc/driver/nvidia/gpus/0000:01:00.0/power
|
||||
Runtime D3 status: Enabled (fine-grained)
|
||||
Video Memory: Off
|
||||
|
||||
GPU Hardware Support:
|
||||
Video Memory Self Refresh: Supported
|
||||
Video Memory Off: Supported
|
||||
|
||||
S0ix Power Management:
|
||||
Platform Support: Supported
|
||||
Status: Disabled
|
||||
```
|
||||
|
||||
For more information see the [Nvidia documentation](https://download.nvidia.com/XFree86/Linux-x86_64/565.77/README/powermanagement.html), chapters 21 and 22.
|
||||
@@ -0,0 +1,34 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/gpu/intel
|
||||
../../../common/gpu/nvidia/ada-lovelace
|
||||
../../../common/gpu/nvidia/prime.nix
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = lib.mkDefault true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
};
|
||||
nvidia = {
|
||||
prime = {
|
||||
intelBusId = lib.mkDefault "PCI:0:2:0";
|
||||
nvidiaBusId = lib.mkDefault "PCI:1:0:0";
|
||||
};
|
||||
powerManagement = {
|
||||
enable = lib.mkDefault false; # Causes sleep issues. See README for more information
|
||||
finegrained = lib.mkDefault false;
|
||||
};
|
||||
dynamicBoost.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
fwupd.enable = lib.mkDefault true;
|
||||
thermald.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
profile
|
||||
({ config, lib, ... }: {
|
||||
nixpkgs.pkgs = pkgs;
|
||||
boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable && !config.boot.loader.raspberryPi.enable;
|
||||
boot.loader.systemd-boot.enable = !config.boot.loader.generic-extlinux-compatible.enable;
|
||||
# we forcefully disable grub here just for testing purposes, even though some profiles might still use grub in the end.
|
||||
boot.loader.grub.enable = false;
|
||||
|
||||
|
||||
Generated
+12
-12
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730504689,
|
||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||
"lastModified": 1736143030,
|
||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,11 +22,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1730874081,
|
||||
"narHash": "sha256-VK7LkfdcpUi8tqcgMIYY2jejDh4O3MNw9An0FcKveRQ=",
|
||||
"lastModified": 1736232973,
|
||||
"narHash": "sha256-8YT/8TMwWRRYFiLWMS98wPW50YBwYeErX7nQ7EmSaVA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "12ad8c1bf13ff15ffa6afe82c59b4af0b9226035",
|
||||
"rev": "3713545aca79365cba20d7873b6e51044890b4e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -37,11 +37,11 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1730741070,
|
||||
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
|
||||
"lastModified": 1735563628,
|
||||
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
|
||||
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -53,11 +53,11 @@
|
||||
},
|
||||
"nixos-unstable-small": {
|
||||
"locked": {
|
||||
"lastModified": 1730858696,
|
||||
"narHash": "sha256-us4xhqqW6OkjCihXYuFArhwx91cTzns8FEY8lE4v7JQ=",
|
||||
"lastModified": 1736208088,
|
||||
"narHash": "sha256-2030VBfWuPLPEUrONVY/uF79EuNCztKunuKLgKkQWqM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8541b4db5adb9dd835ed5d0023dec229987b7391",
|
||||
"rev": "42de2bcb35ccf24626325bd6114ef9d812eaeb0d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
# Required fix to allow booting NixOS on certain Xiaomi laptops
|
||||
# https://discourse.nixos.org/t/system-wont-boot-path-efi-stub/29212/12
|
||||
boot.kernelPatches = lib.singleton {
|
||||
name = "Fix boot";
|
||||
patch = null;
|
||||
extraStructuredConfig = with lib.kernel; {
|
||||
ACPI_DEBUG = yes;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# Xiaomi Redmibook 16 Pro (2024)
|
||||
|
||||
Note that the boot fix requires building the kernel. As such, you might run out
|
||||
of space during nixos-rebuild if you mount tmpfs on `/tmp`.
|
||||
|
||||
## Tested Hardware
|
||||
|
||||
```shellsession
|
||||
$ lspci -nn
|
||||
00:00.0 Host bridge [0600]: Intel Corporation Device [8086:7d14] (rev 04)
|
||||
00:01.0 PCI bridge [0604]: Intel Corporation Device [8086:7ecc] (rev 10)
|
||||
00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08)
|
||||
00:04.0 Signal processing controller [1180]: Intel Corporation Meteor Lake-P Dynamic Tuning Technology [8086:7d03] (rev 04)
|
||||
00:06.0 PCI bridge [0604]: Intel Corporation Device [8086:7e4d] (rev 20)
|
||||
00:07.0 PCI bridge [0604]: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #1 [8086:7ec5] (rev 10)
|
||||
00:08.0 System peripheral [0880]: Intel Corporation Meteor Lake-P Gaussian & Neural-Network Accelerator [8086:7e4c] (rev 20)
|
||||
00:0a.0 Signal processing controller [1180]: Intel Corporation Meteor Lake-P Platform Monitoring Technology [8086:7d0d] (rev 01)
|
||||
00:0b.0 Processing accelerators [1200]: Intel Corporation Meteor Lake NPU [8086:7d1d] (rev 04)
|
||||
00:0d.0 USB controller [0c03]: Intel Corporation Meteor Lake-P Thunderbolt 4 USB Controller [8086:7ec0] (rev 10)
|
||||
00:0d.2 USB controller [0c03]: Intel Corporation Meteor Lake-P Thunderbolt 4 NHI #0 [8086:7ec2] (rev 10)
|
||||
00:12.0 Serial controller [0700]: Intel Corporation Meteor Lake-P Integrated Sensor Hub [8086:7e45] (rev 20)
|
||||
00:14.0 USB controller [0c03]: Intel Corporation Meteor Lake-P USB 3.2 Gen 2x1 xHCI Host Controller [8086:7e7d] (rev 20)
|
||||
00:14.2 RAM memory [0500]: Intel Corporation Device [8086:7e7f] (rev 20)
|
||||
00:14.3 Network controller [0280]: Intel Corporation Meteor Lake PCH CNVi WiFi [8086:7e40] (rev 20)
|
||||
00:15.0 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #0 [8086:7e78] (rev 20)
|
||||
00:16.0 Communication controller [0780]: Intel Corporation Meteor Lake-P CSME HECI #1 [8086:7e70] (rev 20)
|
||||
00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:7e02] (rev 20)
|
||||
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28] (rev 20)
|
||||
00:1f.4 SMBus [0c05]: Intel Corporation Meteor Lake-P SMBus Controller [8086:7e22] (rev 20)
|
||||
00:1f.5 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P SPI Controller [8086:7e23] (rev 20)
|
||||
01:00.0 Non-Volatile memory controller [0108]: SK hynix BC511 NVMe SSD [1c5c:1339]
|
||||
02:00.0 Non-Volatile memory controller [0108]: Yangtze Memory Technologies Co.,Ltd PC300 NVMe SSD (DRAM-less) [1e49:1033] (rev 03)
|
||||
```
|
||||
|
||||
## Extra Configuration
|
||||
|
||||
### Bluetooth
|
||||
|
||||
To enable bluetooth support, set `hardware.bluetooth.enable = true;`.
|
||||
@@ -0,0 +1,13 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../fix-boot-quirk.nix
|
||||
../../../common/cpu/intel
|
||||
../../../common/pc/laptop
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
}
|
||||
Reference in new issue
Block a user