diff --git a/hardware-specific/amd-laptop.nix b/hardware-specific/amd-laptop.nix index f29d8a5..53c24fb 100644 --- a/hardware-specific/amd-laptop.nix +++ b/hardware-specific/amd-laptop.nix @@ -1,7 +1,5 @@ { config, pkgs, ... }: { - imports = [ ./laptop.nix ]; - environment.systemPackages = with pkgs; [ zenmonitor ]; hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ]; @@ -9,6 +7,36 @@ boot.initrd.kernelModules = [ "amdgpu" ]; services = { - xserver = pkgs.lib.mkIf config.services.xserver.enable { videoDrivers = [ "amdgpu" ]; }; + xserver = pkgs.lib.mkIf config.services.xserver.enable { + videoDrivers = [ + "amdgpu" + "modesetting" + ]; + deviceSection = '' + Option "DRI" "2" + Option "TearFree" "true" + ''; + }; + + tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 40; + + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging + + }; + }; }; } diff --git a/machine-confs/helium.nix b/machine-confs/helium.nix index 316e7f9..9966dab 100644 --- a/machine-confs/helium.nix +++ b/machine-confs/helium.nix @@ -80,7 +80,7 @@ ]; services.xserver.displayManager.setupCommands = '' - ${pkgs.xorg.xrandr}/bin/xrandr --output DP-1 --auto --pos 0x0 --primary --output eDP-1 --auto --pos 3840x360 + ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 --auto --pos 0x0 --primary --output eDP --auto --pos 3840x360 ''; system.autoUpgrade.allowReboot = pkgs.lib.mkForce false; diff --git a/program-config-files/i3.nix b/program-config-files/i3.nix index 55f6a54..6b38aff 100644 --- a/program-config-files/i3.nix +++ b/program-config-files/i3.nix @@ -173,14 +173,14 @@ pkgs.writeText "i3-conf" '' workspace 8 output primary workspace 9 output primary workspace 10 output primary - workspace 11 output eDP-1 primary - workspace 12 output eDP-1 primary - workspace 13 output eDP-1 primary - workspace 14 output eDP-1 primary - workspace 15 output eDP-1 primary - workspace 16 output eDP-1 primary - workspace 17 output eDP-1 primary - workspace 18 output eDP-1 primary + workspace 11 output eDP primary + workspace 12 output eDP primary + workspace 13 output eDP primary + workspace 14 output eDP primary + workspace 15 output eDP primary + workspace 16 output eDP primary + workspace 17 output eDP primary + workspace 18 output eDP primary # switch to workspace bindsym $mod+1 workspace 1