mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 13:03:30 +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>
61 lines
1.9 KiB
Nix
61 lines
1.9 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.hardware.gpd.duo;
|
|
in
|
|
with lib;
|
|
{
|
|
imports = [
|
|
./duo-specific
|
|
../../common/pc/laptop
|
|
../../common/pc/ssd
|
|
../../common/hidpi.nix
|
|
];
|
|
|
|
options = {
|
|
hardware.gpd.duo.preventWakeOnAC = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Stop the system waking from suspend when the AC is plugged
|
|
in. The catch: it also disables waking from the keyboard.
|
|
|
|
See:
|
|
https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = {
|
|
# Workaround applied upstream in Linux >=6.7 (on BIOS 03.03)
|
|
# https://github.com/torvalds/linux/commit/a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193
|
|
services.udev.extraRules =
|
|
mkIf (versionOlder config.boot.kernelPackages.kernel.version "6.7" && cfg.preventWakeOnAC)
|
|
''
|
|
# Prevent wake when plugging in AC during suspend. Trade-off: keyboard wake disabled. See:
|
|
# https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45
|
|
ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
|
|
'';
|
|
|
|
# Replace 'left' with 'right' or 'inverted' as needed
|
|
# Fixes DUO stupid inverted display at boot
|
|
# Enable kernel module for your graphics (adjust if needed)
|
|
boot.kernelModules = [ "amdgpu" ];
|
|
|
|
# Set the eDP-1 panel video parameters for display rotation
|
|
boot.kernelParams = mkBefore [
|
|
"video=eDP-1:2880x1800,panel_orientation=upside_down"
|
|
"video=DP-3:2880x1800,panel_orientation=normal"
|
|
"i2c_touchscreen_props=GXTP7380:touchscreen-inverted-x:touchscreen-inverted-y"
|
|
];
|
|
|
|
hardware.gpd.duo.audioEnhancement.rawDeviceName =
|
|
mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo";
|
|
};
|
|
}
|