Describe the bug
Currently, the nvidia-uvm module is lazily loaded (EDIT: introduced in #267335) after the nvidia module:
boot.extraModprobeConfig = ''
softdep nvidia post: nvidia-uvm
'';
This works fine with the closed-source module, but not with the open-source one. I'm currently using the stable 555.58.02, but I remember encountering this issue with the beta 560 drivers as well.
Aside from manually loading the module with modprobe, running nvidia-settings or nvidia-bug-report.sh (possibly other commands as well) makes the module load as reported in NVIDIA/open-gpu-kernel-modules#689
EDIT(SomeoneSerge): There are more reports reproducing the issue in #286028
Steps To Reproduce
- Enable the open nvidia kernel module with
hardware.nvidia.open = true;
- Reboot your machine
- Try to use an application that uses CUDA (fails)
- See that
nvidia-uvm is not loaded:
$ lsmod | grep nvidia_uvm
$ lsmod | grep nvidia
nvidia_drm 122880 1
nvidia_modeset 1916928 1 nvidia_drm
nvidia_wmi_ec_backlight 12288 0
nvidia 10297344 1 nvidia_modeset
video 77824 4 nvidia_wmi_ec_backlight,amdgpu,ideapad_laptop,nvidia_modeset
backlight 28672 5 video,nvidia_wmi_ec_backlight,amdgpu,ideapad_laptop,nvidia_modeset
wmi 32768 5 video,nvidia_wmi_ec_backlight,wmi_bmof,legion_laptop,ideapad_laptop
ecc 40960 2 ecdh_generic,nvidia
- Run an
nvidia- command with sudo:
$ sudo nvidia-settings
ERROR: libEGL setup error : libEGL.so.1: cannot open shared object file: No such file or directory
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
(nvidia-settings:4006): GLib-GObject-CRITICAL **: 10:12:56.602: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
- See that
nvidia-uvm is loaded:
$ lsmod | grep nvidia_uvm
nvidia_uvm 6815744 0
nvidia 10297344 2 nvidia_uvm,nvidia_modeset
$ lsmod | grep nvidia
nvidia_uvm 6815744 0
nvidia_drm 122880 1
nvidia_modeset 1916928 1 nvidia_drm
nvidia_wmi_ec_backlight 12288 0
nvidia 10297344 2 nvidia_uvm,nvidia_modeset
video 77824 4 nvidia_wmi_ec_backlight,amdgpu,ideapad_laptop,nvidia_modeset
backlight 28672 5 video,nvidia_wmi_ec_backlight,amdgpu,ideapad_laptop,nvidia_modeset
wmi 32768 5 video,nvidia_wmi_ec_backlight,wmi_bmof,legion_laptop,ideapad_laptop
ecc 40960 2 ecdh_generic,nvidia
- Try to use an application that uses CUDA (succeeds)
Expected behavior
The nvidia-uvm module loads automatically after the nvidia module.
Additional context
It's worth noting that nvidia-uvm is the only module not in boot.kernelModules. Adding it there, the module is automatically loaded on startup, as intended.
Notify maintainers
Pinging those who I think would be most interested in this. Apologies if I'm wrong.
@Kiskae @NickCao @NixOS/cuda-maintainers
Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.10.3-xanmod1, NixOS, 24.11 (Vicuna), 24.11.20240809.5e0ca22`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Lix, like Nix) 2.90.0`
- nixpkgs: `/nix/store/0jr2kk95c34c0b6yxi75q4fqgb43kqkm-source`
Add a 👍 reaction to issues you find important.
Describe the bug
Currently, the
nvidia-uvmmodule is lazily loaded (EDIT: introduced in #267335) after thenvidiamodule:This works fine with the closed-source module, but not with the open-source one. I'm currently using the stable 555.58.02, but I remember encountering this issue with the beta 560 drivers as well.
Aside from manually loading the module with
modprobe, runningnvidia-settingsornvidia-bug-report.sh(possibly other commands as well) makes the module load as reported in NVIDIA/open-gpu-kernel-modules#689EDIT(SomeoneSerge): There are more reports reproducing the issue in #286028
Steps To Reproduce
hardware.nvidia.open = true;nvidia-uvmis not loaded:nvidia-command withsudo:nvidia-uvmis loaded:Expected behavior
The
nvidia-uvmmodule loads automatically after thenvidiamodule.Additional context
It's worth noting that
nvidia-uvmis the only module not in boot.kernelModules. Adding it there, the module is automatically loaded on startup, as intended.Notify maintainers
Pinging those who I think would be most interested in this. Apologies if I'm wrong.
@Kiskae @NickCao @NixOS/cuda-maintainers
Metadata
Add a 👍 reaction to issues you find important.