Issues with my nvidia drivers

Hello I have a Dell laptop (Nvidia Quadro T2000 dGPU) and (Intel I7 iGPU) I tried to sudo nixos-rebuild switch --flake . but it throws this error: [silviom@nixos:~/.dotfiles]$ sudo nixos-rebuild switch --flake .
[sudo] contraseña para silviom:
building the system configuration…
evaluation warning: The boot.loader.grub.version option does not have any effect anymore, please remove it from your configuration.
error: builder for ‘/nix/store/dwv0hixwsy898fx1fzxka51dqsbjqrpq-nvidia-x11-570.153.02-6.17.drv’ failed with exit code 2;
last 25 log lines:
> nvidia-drm/nvidia-drm-fb.c: In function ‘nv_drm_internal_framebuffer_create’:
> nvidia-drm/nvidia-drm-fb.c:276:9: error: passing argument 3 of ‘drm_helper_mode_fill_fb_struct’ from incompatible pointer type [-Wincompatible-pointer-types]
> 276 | cmd);
> | ^~~
> | |
> | struct drm_mode_fb_cmd2 *
> In file included from /nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source/include/drm/drm_atomic_helper.h:33,
> from nvidia-drm/nvidia-drm-helper.h:191,
> from nvidia-drm/nvidia-drm-fb.c:32:
> /nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source/include/drm/drm_modeset_helper.h:37:67: note: expected ‘const struct drm_format_info *’ but argument is of type ‘struct drm_mode_fb_cmd2 *’
> 37 | const struct drm_format_info *info,
> | ^~
> nvidia-drm/nvidia-drm-fb.c:271:5: error: too few arguments to function ‘drm_helper_mode_fill_fb_struct’
> 271 | drm_helper_mode_fill_fb_struct(
> | ^
~
> /nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source/include/drm/drm_modeset_helper.h:35:6: note: declared here
> 35 | void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> make[4]: *** [/nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source/scripts/Makefile.build:287: nvidia-drm/nvidia-drm-fb.o] Error 1
> make[3]: *** [/nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source/Makefile:2011: .] Error 2
> make[2]: *** [/nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source/Makefile:248: __sub-make] Error 2
> make[2]: Leaving directory ‘/build/NVIDIA-Linux-x86_64-570.153.02/kernel’
> make[1]: *** [Makefile:248: __sub-make] Error 2
> make[1]: Leaving directory ‘/nix/store/zk1zwqbn97zn0mshy5v05q99h8b0pizk-linux-6.17-dev/lib/modules/6.17.0/source’
> make: *** [Makefile:115: modules] Error 2
For full logs, run:
nix log /nix/store/dwv0hixwsy898fx1fzxka51dqsbjqrpq-nvidia-x11-570.153.02-6.17.drv
error: 1 dependencies of derivation ‘/nix/store/ywz5am30r9ad1a840rrgg3q3ym449rqr-etc.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/vaz1g4piimni7bkvlpirqva2hbjzkr7a-firmware.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/65dwfr5hidkgchg9hrb0adjq09fka5f1-linux-6.17-modules.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/k6aibzffipabd8wvcak1gvj5ga5qrr6f-system-path.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/4dh3nijv3zf81xhcxmrw0rj71zdnnb3v-nixos-system-nixos-25.05.20251002.879bd46.drv’ failed to build.

What i understand is that my drivers are not compatible with the kernel. So I must change drivers i guess, what do you guys recommend me?

Please use triple-backticks around log messages.

Also, share your nvidia and kernel config.

I already fixed it, thank you very much, what I did was setting my kernel to the 6.16.10 version, and now it works perfectly fine. :slight_smile:

I ran into the same issue recently, and downgrading the kernel version worked for me as well.

For reference, here’s what I used:

boot.kernelPackages = pkgs.linuxPackages_6_16;

That said, this is probably not an ideal long-term fix. It might be worth investigating the root cause. Have you already opened an issue about this? If not, it could be a good idea to create one on GitHub so it can be tracked properly.

The long-term fix is nvidia updating their module so it compiles against a newer kernel.

Nvidia develop against the LTS kernel, so you can rely on that. To use the LTS kernel just don’t specify boot.kernelPackages, it’s the default. That, or don’t set a specific kernel version and just use pkgs.linuxPackages (the xanmod/zen/hardened suffix is also unlikely to break since those are mostly config changes + a few patches to non-nvidia modules that largely don’t affect their module).

Generally, you probably shouldn’t muck with the kernel version if you don’t know what you’re doing. This happens roughly every six months; some incompatible kernel change and loads of people who don’t understand the kernel build or the concept of third party modules come asking about this completely predictable error they’ve inflicted on themselves.

There are three posts from just this week that I’ve replied to with this exact answer :stuck_out_tongue:

1 Like