NVIDIA Unified Memory kernel module to load at boot

Hello!

I’m trying to add the same paramaters to /etc/modprobe.d/nvidia.conf as nvidia-modbrope --unified-memory --create-nvidia-device-file=0to load at boot. Not sure what exactly to add as parameters and options to /etc/modprobe.d/nvidia.conf. Running CentOS8 with 4.18.0-240.15.1.el8_3.x86_64 kernel and TU104 [GeForce RTX 2070 SUPER] card. Perhaps I’m overthinking or going in the wrong direction. Any pointers are appreciated!

For autoloading modules, check /etc/modules-load.d/
Regarding device file permissions/UID/GID, please see https://download.nvidia.com/XFree86/Linux-x86_64/430.50/README/faq.html

Thanks for quick reply!

Do I understand correctly, the NVIDIA module autoloads the unified memory?

Realised the options regarding the device file creation. Thank you, @generix, for taking the time!
/etc/modprobe.d/nvidia.conf/
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=0 NVreg_DeviceFileMode=0660

No, the uvm module doesn’t get autoloaded unless you set your OS to do so, using the modprobe config directory.

I’m sorry to pester, but what is the option parameter to add to the modprobe.d/nvidia.conf?
modinfo nvidia provides me with following parameters but I’m confused which one is responsible for uvm?

nvidia option parameters (click to expand)
parm:           NvSwitchBlacklist:NvSwitchBlacklist=uuid[,uuid...] (charp)
parm:           nv_cap_enable_devfs:Enable (1) or disable (0) nv-caps devfs support. Default: 1 (int)
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_InitializeSystemMemoryAllocations:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_RegisterForACPIEvents:int
parm:           NVreg_EnablePCIeGen3:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_TCEBypassMode:int
parm:           NVreg_EnableStreamMemOPs:int
parm:           NVreg_EnableBacklightHandler:int
parm:           NVreg_RestrictProfilingToAdminUsers:int
parm:           NVreg_PreserveVideoMemoryAllocations:int
parm:           NVreg_EnableS0ixPowerManagement:int
parm:           NVreg_S0ixPowerManagementVideoMemoryThreshold:int
parm:           NVreg_DynamicPowerManagement:int
parm:           NVreg_DynamicPowerManagementVideoMemoryThreshold:int
parm:           NVreg_EnableUserNUMAManagement:int
parm:           NVreg_MemoryPoolSize:int
parm:           NVreg_KMallocHeapMaxSize:int
parm:           NVreg_VMallocHeapMaxSize:int
parm:           NVreg_IgnoreMMIOCheck:int
parm:           NVreg_NvLinkDisable:int
parm:           NVreg_EnablePCIERelaxedOrderingMode:int
parm:           NVreg_RegisterPCIDriver:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_RegistryDwordsPerDevice:charp
parm:           NVreg_RmMsg:charp
parm:           NVreg_GpuBlacklist:charp
parm:           NVreg_TemporaryFilePath:charp

Edit: formatting

There are no nvidia-uvm specific settings, its device files are created with the same permissions you set for the nvidia module.

Thanks for clarifying! In the end, went with the simplest solution and added a cron job to load the unfied memory kernel module:
@reboot /usr/bin/nvidia-modprobe --unified-memory --create-nvidia-device-file=0 >> /var/log/nvidia-boot.log 2>&1
Thanks again and all the best!