From c9f84afd83ef3a270673e915e825492eabebbbac Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 6 Feb 2024 22:00:01 +0100 Subject: [PATCH] disable intel gup --- NixOS.md | 5 +++++ hosts/yodaGaming/configuration.nix | 7 +++++++ modules/steam.nix | 2 ++ 3 files changed, 14 insertions(+) diff --git a/NixOS.md b/NixOS.md index 1b51e85..565fb9d 100644 --- a/NixOS.md +++ b/NixOS.md @@ -692,9 +692,14 @@ Video acceleration: - Video Decode and Presentation API for Unix (VDPAU). - Verifying: `vdpauinfo`. https://wiki.archlinux.org/title/Hardware_video_acceleration#Verifying_VDPAU +Verify video driver in use: +- `lspci -k | grep -EA3 'VGA|3D|Display'`. Example: `Kernel driver in use: amdgpu` + Verification in general: - Encode a video or play a game and watch AMD GPU usage with `radeontop`. +Configuration example to disable integrated GUP: See [./hosts/yodaGaming/configuration.nix](./hosts/yodaGaming/configuration.nix) + Configuration example for an AMD GPU (https://github.com/tolgaerok/nixos-kde/blob/main/core/gpu/amd/default.nix): See [./modules/gpu-amd.nix](./modules/gpu-amd.nix) ## Additional resources diff --git a/hosts/yodaGaming/configuration.nix b/hosts/yodaGaming/configuration.nix index 94c6801..47e9d48 100644 --- a/hosts/yodaGaming/configuration.nix +++ b/hosts/yodaGaming/configuration.nix @@ -48,6 +48,13 @@ # BIOS boot.loader.grub.devices = ["/dev/disk/by-id/ata-Samsung_SSD_840_EVO_250GB_S1DBNSAF715594P"]; + # Disable onboard Intel GPU + # https://github.com/NixOS/nixos-hardware/blob/master/common/gpu/intel/disable.nix + # https://discourse.nixos.org/t/fully-disabling-the-nvidia-dgpu-on-an-optimus-laptop/29686/6?u=langfingaz + boot.blacklistedKernelModules = [ "i915" ]; + boot.kernelParams = [ "i915.modeset=0" ]; + + # List all available kernel versions: # `nix repl` -> `:l ` -> `pkgs.linuxPackages` and press `TAB` # Default. diff --git a/modules/steam.nix b/modules/steam.nix index c6787c6..b392154 100644 --- a/modules/steam.nix +++ b/modules/steam.nix @@ -1,5 +1,7 @@ { config, pkgs, ... }: { + # https://wiki.archlinux.org/title/steam#See_also + # flatpak install com.valvesoftware.Steam # Launching Steam with Flatpak might warn you about installing the steam-devices package to add support for some gamepads.