mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-05 15:33:29 +01:00
- Fix boot screen invertion. - Add audio fixes for the Framework 13, given a shared chipset. - Add Bluetooth fixes. - Import AMD 7000-series GPU fix (Raphael). - Add GPD PPT (TDP) control from GPD Win Max 2 - Set `panel_orientation` kernel parameter. - Add AC wakeup fix as a config option; disabled by default. - Enable `power-profiles-daemon` by default, and disable TLP - can be configured. - Disable both PSR and PSR-SU on amdgpu module. - Fix touchscreen properties - upside down rotation - Update README.md for GPD Duo. Co-authored-by: Dom Rodriguez <shymega@shymega.org.uk>
63 lines
2.0 KiB
Nix
63 lines
2.0 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
cfg = config.hardware.gpd.ppt;
|
|
in
|
|
{
|
|
options.hardware.gpd.ppt = {
|
|
enable = mkEnableOption "Enable PPT control for device by ryzenadj." // {
|
|
# Default increase PPT to the BIOS default when power adapter plugin to increase performance.
|
|
default = true;
|
|
};
|
|
|
|
adapter = {
|
|
fast-limit = mkOption {
|
|
description = "Fast PTT Limit(milliwatt) when power adapter plugin.";
|
|
default = 35000;
|
|
type = types.ints.unsigned;
|
|
};
|
|
slow-limit = mkOption {
|
|
description = "Slow PTT Limit(milliwatt) when power adapter plugin.";
|
|
default = 32000;
|
|
type = types.ints.unsigned;
|
|
};
|
|
stapm-limit = mkOption {
|
|
description = "Stapm PTT Limit(milliwatt) when power adapter plugin.";
|
|
default = 28000;
|
|
type = types.ints.unsigned;
|
|
};
|
|
};
|
|
|
|
battery = {
|
|
fast-limit = mkOption {
|
|
description = "Fast PTT Limit(milliwatt) when using battery.";
|
|
default = 24000;
|
|
type = types.ints.unsigned;
|
|
};
|
|
slow-limit = mkOption {
|
|
description = "Slow PTT Limit(milliwatt) when using battery.";
|
|
default = 22000;
|
|
type = types.ints.unsigned;
|
|
};
|
|
stapm-limit = mkOption {
|
|
description = "Stapm PTT Limit(milliwatt) when using battery.";
|
|
default = 22000;
|
|
type = types.ints.unsigned;
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ pkgs.ryzenadj ];
|
|
services.udev.extraRules = ''
|
|
SUBSYSTEM=="power_supply", KERNEL=="ADP1", ATTR{online}=="1", RUN+="${getExe pkgs.ryzenadj} --stapm-limit ${toString cfg.adapter.stapm-limit} --fast-limit ${toString cfg.adapter.fast-limit} --slow-limit ${toString cfg.adapter.slow-limit}"
|
|
SUBSYSTEM=="power_supply", KERNEL=="ADP1", ATTR{online}=="0", RUN+="${getExe pkgs.ryzenadj} --stapm-limit ${toString cfg.battery.stapm-limit} --fast-limit ${toString cfg.battery.fast-limit} --slow-limit ${toString cfg.battery.slow-limit}"
|
|
'';
|
|
};
|
|
}
|