diff options
Diffstat (limited to 'roles/nvidia_gt750m')
| -rw-r--r-- | roles/nvidia_gt750m/meta/argument_specs.yml | 4 | ||||
| -rw-r--r-- | roles/nvidia_gt750m/meta/main.yml | 14 | ||||
| -rw-r--r-- | roles/nvidia_gt750m/tasks/main.yml | 22 | ||||
| -rw-r--r-- | roles/nvidia_gt750m/templates/99-nouveau-pstate-gt750m.rules.j2 | 14 |
4 files changed, 54 insertions, 0 deletions
diff --git a/roles/nvidia_gt750m/meta/argument_specs.yml b/roles/nvidia_gt750m/meta/argument_specs.yml new file mode 100644 index 00000000..5af49897 --- /dev/null +++ b/roles/nvidia_gt750m/meta/argument_specs.yml @@ -0,0 +1,4 @@ +--- +argument_specs: + main: + options: {} diff --git a/roles/nvidia_gt750m/meta/main.yml b/roles/nvidia_gt750m/meta/main.yml new file mode 100644 index 00000000..91cb28e7 --- /dev/null +++ b/roles/nvidia_gt750m/meta/main.yml @@ -0,0 +1,14 @@ +--- +dependencies: [] +galaxy_info: + author: "a14m" + description: "Configure NVIDIA GT 750M Mac Edition for optimal performance under nouveau" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" + - name: "Debian" + versions: + - "all" diff --git a/roles/nvidia_gt750m/tasks/main.yml b/roles/nvidia_gt750m/tasks/main.yml new file mode 100644 index 00000000..1a78f985 --- /dev/null +++ b/roles/nvidia_gt750m/tasks/main.yml @@ -0,0 +1,22 @@ +--- +# The GT 750M (GK107M, Kepler) runs under the nouveau open-source driver on Linux. +# Nouveau does not perform automatic GPU reclocking on Kepler — it boots at the +# lowest power state (AC: ~405 MHz core / ~680 MHz memory) and stays there. +# This causes severe lag under Wayland compositors (Hyprland) even on simple +# tasks like switching windows, because the GPU is starved of bandwidth. +# +# The fix is to force the highest performance state (0f: 925 MHz core / 5016 MHz +# memory) via the nouveau DRM pstate sysfs interface. We do this with a udev rule +# that fires the moment nouveau initializes the GPU's DRM device. +# +# We intentionally do NOT install the proprietary nvidia-470xx-dkms driver because: +# - nvidia-470xx + Wayland/Hyprland on Kepler has documented upstream instability +# - External monitors are wired to NVIDIA outputs; without a working Wayland stack +# the setup is unusable +# - nouveau with forced pstate provides acceptable performance for desktop use +- name: "Force nouveau pstate to maximum on GT 750M" + become: true + ansible.builtin.template: + src: "99-nouveau-pstate-gt750m.rules.j2" + dest: "/etc/udev/rules.d/99-nouveau-pstate-gt750m.rules" + mode: "0644" diff --git a/roles/nvidia_gt750m/templates/99-nouveau-pstate-gt750m.rules.j2 b/roles/nvidia_gt750m/templates/99-nouveau-pstate-gt750m.rules.j2 new file mode 100644 index 00000000..14241a70 --- /dev/null +++ b/roles/nvidia_gt750m/templates/99-nouveau-pstate-gt750m.rules.j2 @@ -0,0 +1,14 @@ +# Force nouveau GPU performance state to maximum on GT 750M Mac Edition. +# +# Nouveau does not reclock Kepler GPUs automatically — the card boots at minimum +# frequency (~405 MHz core / 680 MHz memory) and stays there, causing severe lag +# under Wayland compositors. This rule forces pstate 0f (925 MHz core / 5016 MHz +# memory) the moment nouveau initializes the DRM device. +# +# Match is on PCI vendor/device ID (10de:0fe9 = GT 750M Mac Edition) rather than +# card number, which is not stable across reboots. +# +# %k expands to the kernel DRM name (e.g. card0) at rule execution time. +# The write is deferred via sleep because the sysfs debug interface is not +# immediately available at the ADD udev event. +ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card*", ATTR{device/vendor}=="0x10de", ATTR{device/device}=="0x0fe9", RUN+="/bin/sh -c 'sleep 2 && echo 0f > /sys/kernel/debug/dri/%k/pstate'" |
