mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-06 07:53:30 +01:00
gpd/duo: init GPD Duo profile
- 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>
This commit is contained in:
1 parent
2e790b0a6b
commit
cf3de37ade
10 files changed
+642
No files matched your search
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./ppt.nix
|
||||
./power-saving.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.hardware.gpd.duo.powerManagement;
|
||||
in
|
||||
{
|
||||
options.hardware.gpd.duo.powerManagement = {
|
||||
enable = mkEnableOption "Enable power-profiles-daemon and disable TLP for the GPD Duo" // {
|
||||
# Default increase PPT to the BIOS default when power adapter plugin to increase performance.
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.power-profiles-daemon.enable = mkDefault true;
|
||||
services.tlp.enable = mkForce false;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
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}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user