Nvpmodel.service getting failed on TX2 4GB SK32.4.3

I have a custom board having Tx2 4GB(R32.4.3) module is there and nvpmodel.service is getting failed when i am enabling it.

I am getting below error:

root@tegra-ubuntu:/home/ubuntu# systemctl status nvpmodel
��● nvpmodel.service - nvpmodel service
Loaded: loaded (/etc/systemd/system/nvpmodel.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-03-09 13:21:51 UTC; 1min 6s ago
Process: 5291 ExecStart=/usr/sbin/nvpmodel -f /etc/nvpmodel.conf (code=exited, status=255)
Main PID: 5291 (code=exited, status=255)

Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: failed to write PARAM GPU_POWER_CONTROL_ENABLE: ARG GPU_PWR_CNTL_EN: PATH: /sys/device
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: Error opening /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/available_frequencies
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: failed to read PARAM GPU: ARG FREQ_TABLE: PATH /sys/devices/17000000.gp10b/devfreq/170
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: Error opening /sys/devices/gpu.0/power/control: 2
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: failed to write PARAM GPU_POWER_CONTROL_DISABLE: ARG GPU_PWR_CNTL_DIS: PATH: /sys/devi
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: failed to set power mode!
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: optMask is 2, no request for power mode
Mar 09 13:21:51 tegra-ubuntu systemd[1]: nvpmodel.service: Main process exited, code=exited, status=255/n/a
Mar 09 13:21:51 tegra-ubuntu systemd[1]: nvpmodel.service: Failed with result ‘exit-code’.
Mar 09 13:21:51 tegra-ubuntu systemd[1]: Failed to start nvpmodel service.

can you please tell what could be the issue?

Also this service is enabled by default in TX2 EVK but it is coming dosable in custom board.

Any help will be appreciated

please update on this

hello anupam.kumar,

it seems there’re errors to access system nodes. are you actually have read/write permissions?

yes we have read write permission there…what could be the issue?
how we can verify that

it is failing only at startup and these file /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/ is not present at that time.

hello anupam.kumar,

could you please also attach kernel init messages for reference, (i.e. $ dmesg > klog.txt)
thanks

issue is caused in nvpmodel.service file.
in my custom board nvgpu.ko file is not loaded at the time of nvpmodel.service

thats why below error is coming

root@tegra-ubuntu:/home/ubuntu# systemctl status nvpmodel
��● nvpmodel.service - nvpmodel service
Loaded: loaded (/etc/systemd/system/nvpmodel.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-03-09 13:21:51 UTC; 1min 6s ago
Process: 5291 ExecStart=/usr/sbin/nvpmodel -f /etc/nvpmodel.conf (code=exited, status=255)
Main PID: 5291 (code=exited, status=255)

Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: failed to write PARAM GPU_POWER_CONTROL_ENABLE: ARG GPU_PWR_CNTL_EN: PATH: /sys/device
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: Error opening /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/available_frequencies
Mar 09 13:21:51 tegra-ubuntu nvpmodel[5291]: NVPM ERROR: failed to read PARAM GPU: ARG FREQ_TABLE: PATH /sys/devices/17000000.gp10b/devfreq/170

it is simply timing issue…if we add delay in nvargus-daemon service,it is working fine.

adding this line is working
ExecStartPre=/bin/sleep 5
ExecStart=/usr/sbin/nvargus-daemon

file:
/etc/systemd/system/nvargus-daemon.service

can you please suggest other solution.

hello anupam.kumar,

may I know what’s the actual use-case,
are you having camera use-case as soon as system boot-up?

no use case at bootup but we are not able to capture video using gstlaunch command after bootup first time…we found that after bootup this nvpmodule.service file require nvpgpu.ko file but at that time it is not loaded in our custom board but same is working in EVK.

how we can prioritized this nvgpu.ko lodable module so that it will be avilable at the time of nvp module service.

hello anupam.kumar,

please have a try to modify the dependency of nvpmodel service,
for example, /etc/systemd/system/nvpmodel.service

what changes i can do here,can you please suggest

hello anupam.kumar,

please ensure you’re taking the correct dtb file to flash the target,
thanks