PWM flickering on Jetson during CPU

Hi, I’m using the PWM pins to dim LED panels on the Jetson Nano.

This works fine when the system is not under any load. But normally I run a realtime inference on some camera feeds which puts loads on the GPU and CPU. When this happens the LEDS flickers, which is visible to the human eye. Even if the period (dutycycle) is 100 % the flickering still appears. I have tried with different frequencys and dutycycles but can’t solve it.

Anybody have experienced the same issue?

Below is example python code to set the dutycycle etc. This is only set once, the inference stuff is run from a different script so they are separated

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM )

LED_STRIP = GPIO.PWM(12, 1000) # Set frequency
LED_STRIP.start(100) # Start with dutycycle

time.sleep(60)
GPIO.cleanup()

hello stefankmfr0,

is this issue related to CPU loading?
could you please enable tegrastats Utility to monitor the memory usage and processor usage

had you configure Jetson platform to perform mode for confirmation?
please refer to Supported Modes and Power Efficiency, you may enable nvpmodel to change the power-mode.
thanks

Output below_
$sudo /usr/sbin/nvpmodel -q
NVPM WARN: fan mode is not set!
NV Power Mode: MAXN
0

Below is from tegrastats.
First lines before application is run. After line 14 application is started.
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25.5C PMIC@100C GPU@24.5C AO@31C thermal@25C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25.5C PMIC@100C GPU@24C AO@31C thermal@25C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [1%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25.5C PMIC@100C GPU@24C AO@31C thermal@25C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25C PMIC@100C GPU@24C AO@31C thermal@24.75C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@24C AO@31C thermal@24.5C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,1%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25C PMIC@100C GPU@24C AO@31C thermal@24.75C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25C PMIC@100C GPU@24C AO@31C thermal@24.75C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,1%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25C PMIC@100C GPU@24C AO@30.5C thermal@24.25C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.5C
RAM 868/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.75C
RAM 868/3964MB (lfb 317x4MB) SWAP 0/1982MB (cached 0MB) CPU [4%@1479,3%@1479,1%@1479,2%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.75C
RAM 868/3964MB (lfb 317x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,0%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@21.5C CPU@25C PMIC@100C GPU@24C AO@30.5C thermal@24.5C
RAM 873/3964MB (lfb 317x4MB) SWAP 0/1982MB (cached 0MB) CPU [0%@1479,0%@1479,0%@1479,11%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@25.5C PMIC@100C GPU@23.5C AO@30.5C thermal@24.75C
RAM 906/3964MB (lfb 317x4MB) SWAP 0/1982MB (cached 0MB) CPU [16%@1479,13%@1479,14%@1479,94%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@23C CPU@25.5C PMIC@100C GPU@24C AO@31C thermal@24.75C
RAM 1067/3964MB (lfb 317x4MB) SWAP 0/1982MB (cached 0MB) CPU [50%@1479,7%@1479,50%@1479,7%@1479] EMC_FREQ 0% GR3D_FREQ 1% PLL@22.5C CPU@25.5C PMIC@100C GPU@24C AO@31C thermal@25.25C
RAM 1204/3964MB (lfb 317x4MB) SWAP 0/1982MB (cached 0MB) CPU [7%@1479,79%@1479,20%@1479,7%@1479] EMC_FREQ 0% GR3D_FREQ 3% PLL@22.5C CPU@26C PMIC@100C GPU@24C AO@31C thermal@25C
RAM 1358/3964MB (lfb 316x4MB) SWAP 0/1982MB (cached 0MB) CPU [7%@1479,98%@1479,8%@1479,5%@1479] EMC_FREQ 0% GR3D_FREQ 4% PLL@22.5C CPU@26.5C PMIC@100C GPU@24C AO@31C thermal@25.25C
RAM 1490/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [11%@1479,95%@1479,9%@1479,7%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@23C CPU@26.5C PMIC@100C GPU@23.5C AO@31C thermal@25.25C
RAM 1501/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [9%@1479,40%@1479,6%@1479,6%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25.5C PMIC@100C GPU@24C AO@30.5C thermal@24.5C
RAM 1502/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [4%@1479,3%@1479,2%@1479,1%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.25C
RAM 1503/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [3%@1479,3%@1479,3%@1479,3%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@24C AO@30.5C thermal@24.25C
RAM 1502/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [11%@1479,20%@1479,7%@1479,9%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.75C
RAM 1503/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [1%@1479,4%@1479,0%@1479,2%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.25C
RAM 1501/3964MB (lfb 312x4MB) SWAP 0/1982MB (cached 0MB) CPU [1%@1479,6%@1479,1%@1479,3%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22C CPU@25C PMIC@100C GPU@23.5C AO@30.5C thermal@24.25C
RAM 1546/3964MB (lfb 311x4MB) SWAP 0/1982MB (cached 0MB) CPU [18%@1479,13%@1479,22%@1479,11%@1479] EMC_FREQ 0% GR3D_FREQ 50% PLL@22.5C CPU@27C PMIC@100C GPU@24.5C AO@33.5C thermal@24.5C
RAM 1549/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [18%@1479,29%@1479,16%@1479,17%@1479] EMC_FREQ 0% GR3D_FREQ 0% PLL@22.5C CPU@26.5C PMIC@100C GPU@24.5C AO@31C thermal@25C
RAM 1554/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [58%@1479,45%@1479,38%@1479,27%@1479] EMC_FREQ 0% GR3D_FREQ 91% PLL@22.5C CPU@28C PMIC@100C GPU@25C AO@33.5C thermal@25.25C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [43%@1479,42%@1479,38%@1479,38%@1479] EMC_FREQ 0% GR3D_FREQ 64% PLL@23C CPU@27.5C PMIC@100C GPU@25.5C AO@33C thermal@26.5C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [27%@1479,32%@1479,29%@1479,34%@1479] EMC_FREQ 0% GR3D_FREQ 49% PLL@23C CPU@28C PMIC@100C GPU@25.5C AO@33C thermal@26.75C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [18%@1479,21%@1479,17%@1479,40%@1479] EMC_FREQ 0% GR3D_FREQ 87% PLL@23C CPU@28C PMIC@100C GPU@25C AO@33.5C thermal@26.75C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [13%@1479,30%@1479,14%@1479,22%@1479] EMC_FREQ 0% GR3D_FREQ 75% PLL@23C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@26.5C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [11%@1479,29%@1479,16%@1479,20%@1479] EMC_FREQ 0% GR3D_FREQ 99% PLL@23C CPU@28C PMIC@100C GPU@25.5C AO@34C thermal@26.5C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [16%@1479,14%@1479,13%@1479,28%@1479] EMC_FREQ 0% GR3D_FREQ 92% PLL@23C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@26.25C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [16%@1479,23%@1479,24%@1479,14%@1479] EMC_FREQ 0% GR3D_FREQ 99% PLL@23.5C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@26.5C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [16%@1479,22%@1479,19%@1479,17%@1479] EMC_FREQ 0% GR3D_FREQ 88% PLL@23.5C CPU@28C PMIC@100C GPU@25.5C AO@34C thermal@26.5C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [13%@1479,22%@1479,10%@1479,27%@1479] EMC_FREQ 0% GR3D_FREQ 99% PLL@23C CPU@27.5C PMIC@100C GPU@25.5C AO@34C thermal@26.75C
RAM 1552/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [11%@1479,26%@1479,9%@1479,30%@1479] EMC_FREQ 0% GR3D_FREQ 87% PLL@23.5C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@26.75C
RAM 1551/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [16%@1479,16%@1479,18%@1479,18%@1479] EMC_FREQ 0% GR3D_FREQ 97% PLL@23C CPU@27.5C PMIC@100C GPU@25.5C AO@34C thermal@26.75C
RAM 1551/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [14%@1479,21%@1479,15%@1479,29%@1479] EMC_FREQ 0% GR3D_FREQ 56% PLL@23C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@26.75C
RAM 1551/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [12%@1479,20%@1479,22%@1479,18%@1479] EMC_FREQ 0% GR3D_FREQ 64% PLL@23.5C CPU@28C PMIC@100C GPU@25.5C AO@33.5C thermal@26.5C
RAM 1551/3964MB (lfb 310x4MB) SWAP 0/1982MB (cached 0MB) CPU [10%@1479,16%@1479,13%@1479,21%@1479] EMC_FREQ 0% GR3D_FREQ 34% PLL@23.5C CPU@28.5C PMIC@100C GPU@25.5C AO@33C thermal@26.25C
RAM 1551/3964MB (lfb 308x4MB) SWAP 0/1982MB (cached 0MB) CPU [22%@1479,23%@1479,22%@1479,23%@1479] EMC_FREQ 0% GR3D_FREQ 47% PLL@23C CPU@28C PMIC@100C GPU@26C AO@33.5C thermal@26.75C
RAM 1551/3964MB (lfb 308x4MB) SWAP 0/1982MB (cached 0MB) CPU [15%@1479,13%@1479,19%@1479,21%@1479] EMC_FREQ 0% GR3D_FREQ 54% PLL@23.5C CPU@28.5C PMIC@100C GPU@25.5C AO@33C thermal@26.5C
RAM 1551/3964MB (lfb 308x4MB) SWAP 0/1982MB (cached 0MB) CPU [14%@1479,24%@1479,12%@1479,29%@1479] EMC_FREQ 0% GR3D_FREQ 35% PLL@23.5C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@27C
RAM 1551/3964MB (lfb 308x4MB) SWAP 0/1982MB (cached 0MB) CPU [16%@1479,20%@1479,13%@1479,26%@1479] EMC_FREQ 0% GR3D_FREQ 51% PLL@23.5C CPU@28.5C PMIC@100C GPU@25.5C AO@33.5C thermal@27C
RAM 1551/3964MB (lfb 308x4MB) SWAP 0/1982MB (cached 0MB) CPU [17%@1479,15%@1479,18%@1479,23%@1479] EMC_FREQ 0% GR3D_FREQ 35% PLL@23.5C CPU@27.5C PMIC@100C GPU@25.5C AO@33.5C thermal@27C

hello stefankmfr0,

looks like processor did not fully occupied, is the issue persist by MaxN ?

It’s always set to 10W mode.

Maybe it’s due to the load of the GPU which is utilized as well?

Is it possible to make a stress test of only the GPU on the jetson for troubleshooting and isolating. I can stress test the CPU, but don’t know how to do this with the CPU

hello stefankmfr0,

you may perform some CUDA samples to stress GPU.
for example, particles or oceanFFT.
please also check the reference guide for the CUDA Samples.
thanks