Laggy mouse when use nvidia driver

I’m having trouble setting up nvidia on my nixss 23.11 with geforce mx150 graphics card and an integrated intel gpu
everything works properly except the mouse cursor which isn’t smooth and is very laggy
i use gnome and one thing I’ve noticed is that when i record screen with “show pointer” enabled, there is no lag (while recording)
note that without nvidia driver (using nouveau) there is no problem at all

this is the code i have in configuration.nix for nvidia part (the rest is default generated config + packages)

################ NVIDIA #######################
  hardware.opengl = {
    enable = true;
    driSupport = true;
    driSupport32Bit = true;
  };

  services.xserver.videoDrivers = ["nvidia"];

  hardware.nvidia = {
    modesetting.enable = true;

    powerManagement.enable = false;
    powerManagement.finegrained = false;

    open = false;


    nvidiaSettings = true;

    package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
    forceFullCompositionPipeline = true;
    prime = {
      intelBusId = "PCI:0:2:0";
      nvidiaBusId = "PCI:1:0:0";
      sync.enable = true;
    };
  };
  nixpkgs.config.nvidia.acceptLicense = true;
  nixpkgs.config.cudaSupport = true;
################ NVIDIA #######################
1 Like

solved by using latest version of driver instead of legacy 390 driver

1 Like

Confirming I was experiencing the same issue with a GeForce GT 640M LE and the legacy_470 driver. As far as I can tell, I need to use the Nvidia driver to fix an issue where my screen wouldn’t turn back on after hibernating. Updating to the stable, instead of legacy, driver fixed the cursor issue. Thanks for sharing your solution!

1 Like

But the latest driver for 640M is only legacy_470, isn’t it?
Using stable you switched back to nouveau maybe

No it uses the nvidia driver (as i’m using it in blender)

Interesting. And which driver version “inxi -Gxz” show?
I’m on 920M and faced with the same issues on GDM+Gnome on wayland. But Hyprland works perfect on legacy_470. Blender only 3.X.X use nvidia cuda, 4.X.X - only software and eevee rendering.