Hi, I finally got NVIDIA drivers to work on my Optimus laptop (they didn’t work on 22.11
, I’m now on unstable
), but I’m getting lag spikes every 30 seconds or so when running any game using the dGPU.
Using MangoHUD and Lutris, I can see that the, when a lag spike occurs, the GPU usage plummets (it would drop from 100% to <15%) and CPU usage spikes on all cores.
Here’s the relevant part of my configuration.nix
:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
services.switcherooControl.enable = true;
boot.blacklistedKernelModules = [ "nouveau" ];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
nvidiaSettings = true;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:0:0:2:0";
nvidiaBusId = "PCI:0:1:0:0";
};
};
}
I use GNOME + Wayland and switching to X11 isn’t really an option, as I have a HiDPI screen on my laptop and a “normal” 1080p external monitor. I also make use of Waydroid for development.
(And also GNOME on Xorg refuses to launch).
Could this be an overheating or throttling issue? (I usually use one of those laptop stands with fans)