Nvidia Sync / nvidia-smi

Greetings,

Fresh convert over to nixOS,

Just as a forward - while I would hardly call myself a linux master, I do use it for work everyday (more debian based), and have been running it as my daily home driver for the past 16-18 months.

Took the plunge over to Nix and am really excited however I just am not sure if I setup my nvidia card correctly. Something just feels off.

First the code:

# lshw -c display
  *-display UNCLAIMED       
      [...]
       bus info: pci@0000:01:00.0
     [...]
       configuration: latency=0
       resources: memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:5000(size=128) memory:a4000000-a407ffff
  *-display
       [...]
       bus info: pci@0000:00:02.0
       [...]
       configuration: driver=i915 latency=0
       resources: irq:143 memory:a2000000-a2ffffff memory:80000000-8fffffff ioport:6000(size=64) memory:c0000-dffff

So from the “driver=i915” I am making the assumption that this is my Intel integrated and thus PCI:01:00 is the Nvidia

Thus my config nix has

  # Graphics Drivers ###########################
    # Enable OpenGL
  hardware.opengl = {
    enable = true;
    driSupport = true;
    driSupport32Bit = true;
  };

  # Load nvidia driver for Xorg and Wayland
  services.xserver.videoDrivers = ["nvidia"];

  hardware.nvidia = {

    # Modesetting is required.
    modesetting.enable = true;

    # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
    powerManagement.enable = false;
    # Fine-grained power management. Turns off GPU when not in use.
    # Experimental and only works on modern Nvidia GPUs (Turing or newer).
    powerManagement.finegrained = false;

    # Use the NVidia open source kernel module (not to be confused with the
    # independent third-party "nouveau" open source driver).
    # Support is limited to the Turing and later architectures. Full list of 
    # supported GPUs is at: 
    # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus 
    # Only available from driver 515.43.04+
    # Do not disable this unless your GPU is unsupported or if you have a good reason to.
    open = true;

    # Enable the Nvidia settings menu,
	# accessible via `nvidia-settings`.
    nvidiaSettings = true;

    # Optionally, you may need to select the appropriate driver version for your specific GPU.
    package = config.boot.kernelPackages.nvidiaPackages.stable;
  };

  hardware.nvidia.prime = {
    sync.enable = true;
    
  # Make sure to use the correct Bus ID values for your system!
    nvidiaBusId = "PCI:1:0:0";
    intelBusId = "PCI:0:2:0";
  };
  ## Graphics END #############################################

Yes I copied / pasted / edited and left the comments hah.

Unfree repos are enabled in the config also fwiw

Post rebuilt-switch:
everything loads great, and runs smooth but

nvidia-smi – doesnt give any output just errors
“NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”

lspci gives me hope that its right

00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
01:00.0 3D controller: NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev a1)

So I guess I just am curious if

  1. I can ignore the nvidia-smi error, false positive, just nvidia things
  2. Any performance issues in getting a game to run would be something I want to look at a per application base? such as steam run commands etc?

FWIW - I did try offload and had the same issue with nvidia-smi… also Sync sounds better to me, I dont game really ever, mostly just working in VMs but its nice every once and a while I suppose. I just want as much performance out of this laptop as i can get.

Hope thats enough info - apologies for the 50000th Nvidia question, i did try and search things up but wasnt making headway after a couple hours.

Thx!

Solved!

Me and chat jippity sorted it out

My card isnt listed for the open kernel

List here:

Not sure if its worth linking in the wiki as a reference for us dumb folk :slight_smile: