Nvidia Settings on XPS 15 9520 (RTX 3050)

Hello guys, A few months ago (3 months exactly) I bought new XPS 15 9520 with 12th Gen Intel i7-12700H (20) @ 4.600GHz and NVIDIA GeForce RTX 3050 Mobile.
Searching the forum and internet I managed to find some tips on how to install NixOS on this laptop.

My question is, the Nvidia-Settings does not show any GPU info at all? I would like to see if the sensors and FAN are working normally (like PopOS show).

I made the same configuration as the Nvidia wiki. nvidia-smi shows some information and nvidia-offload works too, for example if I run nvidia-offload blender I will be able to see the process in nvidia-smi and blender will open normally.

Can you help me? I’m already out of ideas :frowning_face:
Below is some information about the OS.

  • uname -a

Linux Niflheim 6.1.2 #1-NixOS SMP PREEMPT_DYNAMIC Sat Dec 31 12:33:12 UTC 2022 x86_64 GNU/Linux

  • lspci -k | grep -E “(VGA|3D)”

00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
01:00.0 3D controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] (rev a1)

23.05pre439706.9813adc7f7c (Stoat)

Can you double check that Gnome is running on Xorg? I believe nvidia-settings looks like this for me when I am on Wayland.

Hey. Yes. It’s running on Xorg. I disabled waylang in configuration.nix

image

This is just a shot in the dark: what happens if you run nvidia-offload nvidia-settings?

No problem, I tried this and the app runs with these errors on terminal

I wonder if enabling the systemd-controlled powerManagement features disable the usual power management related tabs in nvidia-settings.

Those gobject errors are harmless, I believe they are thrown when certain GNOME services are missing, which is most likely because you’re not using GNOME but some wm. If you are using GNOME and the screenshot cropping is just hiding all of it, obviously it’s not the lack of GNOME, but I’ve personally yet to see an application using gtk not throw a few errors like those.

I tried this, disabling these lines in configuration.nix

hardware.nvidia
      powerManagement = {
        enable = false;
        finegrained = false;
      };

would it be this?

That’s my guess, it’s the only difference between your configuration and practically all NixOS nvidia configuration I’ve seen.

If it’s still not that, try stable? You’re the second post I’ve seen where this happened recently, maybe nvidia changed their UI? Also perhaps confirm if an X server is actually running?

Sorry for the delay, but yes, X is running. I believe it is more UI configuration of nvidia-settings than something wrong, because in nvidia-smi the GPU config appears and I can run programs with nvidia-offload. I’ll install the stable version and see.

I tried several configurations of nixos-hardware and others and arrived at this final setup.

  • nixos version

22.11

  • nixos-hardware
    <nixos-hardware/dell/xps/15-9500>

  • boot params

   boot.kernelParams = [
     "loglevel=3" "quiet" "nouveau.modeset=0" "ibt=off" "vt.global_cursor_default=0"
  ];
  • linux kernel version and nvidia settings with prime enabled
boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;

And yet nvidia-settings still doesn’t show the nvidia configuration, but I’m managing to run the programs using nvidia-offload and they appear running in nvidia-smi, I believe I’m having a problem in the nvidia-settings UI and not in nvidia itself. I’ll try a few more things.