Error setting nvpmodel

when i try to change nvpmodel i face following error:

nvidia@tegra-ubuntu:~/setup_jetsontx2$ nvpmodel -m 0
NVPM ERROR: Error opening /sys/devices/system/cpu/cpu1/online: 13
NVPM ERROR: failed to write PARAM CPU_ONLINE: ARG CORE_1: PATH: /sys/devices/system/cpu/cpu1/online VAL: 1
NVPM ERROR: Error opening /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq: 13
NVPM ERROR: failed to write PARAM CPU_A57: ARG MIN_FREQ: PATH: /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq VAL: 0
NVPM ERROR: Error opening /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq: 13
NVPM ERROR: failed to write PARAM CPU_DENVER: ARG MIN_FREQ: PATH: /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq VAL: 0
NVPM ERROR: Error opening /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/min_freq: 13
NVPM ERROR: failed to write PARAM GPU: ARG MIN_FREQ: PATH: /sys/devices/17000000.gp10b/devfreq/17000000.gp10b/min_freq VAL: 0
NVPM ERROR: Error opening /sys/kernel/nvpmodel_emc_cap/emc_iso_cap: 13
NVPM ERROR: failed to write PARAM EMC: ARG MAX_FREQ: PATH: /sys/kernel/nvpmodel_emc_cap/emc_iso_cap VAL: 0
NVPM ERROR: failed to set power mode!
NVPM ERROR: Failed to exec option requests!

You need to run it with sudo:

sudo nvpmodel -m 0

Hi, I’m facing this issue even when I run it as sudo:

sudo nvpmodel -m0
NVPM ERROR: Error writing to /sys/devices/system/cpu/cpu1/online: 22
NVPM ERROR: failed to write PARAM CPU_ONLINE: ARG CORE_1: PATH: /sys/devices/system/cpu/cpu1/online VAL: 1
NVPM ERROR: Error reading /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies: 19
NVPM ERROR: failed to read PARAM CPU_DENVER: ARG FREQ_TABLE: PATH /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies
NVPM ERROR: failed to set power mode!
NVPM ERROR: Failed to exec option requests!

When I cat /proc/cmdline I get (MaxCPUs = 6):

cat /proc/cmdline 
root=/dev/mmcblk0p1 rw rootwait console=ttyS0,115200n8 console=tty0 OS=l4t fbcon=map:0 net.ifnames=0 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 nvdumper_reserved=0x2772e0000 gpt tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2.1 androidboot.serialno=0421118035857 bl_prof_dataptr=0x10000@0x277040000 sdhci_tegra.en_boot_part_access=1 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4

Running tegrastats gives me:

sudo ~/tegrastats 
RAM 908/7854MB (lfb 1582x4MB) CPU [0%@345,off,off,0%@345,0%@345,0%@345] EMC_FREQ 0%@1866 GR3D_FREQ 4%@140 APE 150 BCPU@40.5C MCPU@40.5C GPU@38C PLL@40.5C Tboard@37C Tdiode@36.25C PMIC@100C thermal@39.2C VDD_IN 3646/3646 VDD_CPU 307/307 VDD_GPU 153/153 VDD_SOC 843/843 VDD_WIFI 0/0 VDD_DDR 1265/1265

I also tried changing the value in /sys/devices/system/cpu/cpu1/online from 0 to 1, but I couldn’t.

Any ideas?

Was the kernel modified? Which release is this (see “head -n 1 /etc/nv_tegra_release”)?

Thanks for your response.

Here’s the release information:

head -n 1 /etc/nv_tegra_release
# R28 (release), REVISION: 2.0, GCID: 10567845, BOARD: t186ref, EABI: aarch64, DATE: Fri Mar  2 04:57:01 UTC 2018

Just FYI, I had just flashed the Jetson with Jetpack 3.2 before we started seeing this issue. I also flashed 4 other Jetsons with exactly the same Jetpack but none of them gave me this error.

It is interesting that the “/sys” files would fail on a standard install. One possibility is if the nvpmodel is called too early in boot (e.g., perhaps power rails are not ready). How long after boot is it before nvpmodel is called? Also, have you tried to re-flash this one board?

Be sure to run nvpmodel beforerunning jetson_clocks.

If it not that, as it seems working with other boards and same image…
Were all these boards previously flashed with the same version ? Was it a full flash or just copy a cloned rootfs ? This may matter if you cloned image from a different version and restore into a different one.

Do they all boot with same hardware attached (especially monitor) ?

What gives

dmesg | grep armv8_pmu

I don’t think nvpmodel is running automatically at boot. I get the error when I run it manually. And I haven’t tried reflashing after I started facing this issue.

nvpmodel is being run before jetson_clocks. Yes, all the boards were previously flashed with the same version and it worked fine. It was a full flash. Yes, they all have exactly the same hardware attached, which is only a camera. dmesg | grep armv8_pmu gives no output.

I have to suspect something about flash went wrong. For example, a truncated file system if the host’s disk was too close to full. What you are describing should work and the “/sys” content should not reject this. Before spending too much time I’ll suggest getting the re-flash tested. Prior to starting make sure you have about 35GB of free space on the host (use “df -H -T /where/ever/it/is/Linux_for_Tegra”). The files “Linux_for_Tegra/bootloader/system.img*” get overwritten during a normal flash, and those are the majority of disk space, and so if close to full you could just delete those before starting to make sure.

Sounds weird… Does this gives some output on other boards ?
Was this board flashed separately from the other ones or later ?
As mentioned by @linuxdev a reflash would probably be the first thing to try.

All the boards don’t have any output for that command. I tested on over 5 different boards.

All 5 boards were flashed one after the other within a span of 4 hours. Is it possible to flash multiple boards at the same time via the Jetpack GUI? If yes, could you guys please point me in that direction? That’ll be a great help!

I will try to reflash but it might take some time. I’ll update the thread once I’ve done that.

Thanks for all the suggestions guys!

Not sure, as I’m running an unusual setup on my TX2…I’m seeing some messages in my case:

dmesg | grep armv8_pmu
[    0.428970] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    2.626807] armv8_pmu: imp: 0x41, idcode: 0x1
[    2.626811] armv8_pmu: [0] arch: AA64 PmuV3 ARM CORTEX-A57, type: 5, ver: 0
[    2.626814] armv8_pmu: imp: 0x4e, idcode: 0x1
[    2.626817] armv8_pmu: [1] arch: AA64 PmuV3 NVIDIA (Denver), type: 6, ver: <b>2</b>
[    2.626821] armv8_pmu: imp: 0x4e, idcode: 0x1
[    2.626823] armv8_pmu: [2] arch: AA64 PmuV3 NVIDIA (Denver), type: 6, ver: <b>2</b>
[    2.626827] armv8_pmu: imp: 0x41, idcode: 0x1
[    2.626830] armv8_pmu: [3] arch: AA64 PmuV3 ARM CORTEX-A57, type: 5, ver: 0
[    2.626832] armv8_pmu: imp: 0x41, idcode: 0x1
[    2.626835] armv8_pmu: [4] arch: AA64 PmuV3 ARM CORTEX-A57, type: 5, ver: 0
[    2.626838] armv8_pmu: imp: 0x41, idcode: 0x1
[    2.626841] armv8_pmu: [5] arch: AA64 PmuV3 ARM CORTEX-A57, type: 5, ver: 0

[EDIT: I did run a custom kernel, not sure if you would see this on standard install…Someone else with a standard R28.2.0 setup may tell. Sorry if this was confusing.]