Xorg use high cpu loading after Ubuntu suspend/wake up many times

Hi nvidia,

I’m using Xavier NX , JetPack 4.6 and runing tress test.
The system was lag after the system suspend/wake up many times (more than 2000 times).
I check the Xorg used high CPU loading (more than 50%).
Please help us to check this issue.

I found this reply of topic has same question. Is this a know issue of gnome?

Hi,

By default the gnome is not in use so this shouldn’t be related to gnome.

Since this issue cannot consistently reproduce so it is difficult to do further investigation. What is the repro rate here? If you have steps to reproduce it more consistently, please share to us.

SetupSuspend.sh (258 Bytes)
suspendTest.sh (313 Bytes)

Hi Wayne,

You can run this command and check Xorg in top command after 1 day.
sudo ./SetupSuspend.sh

The CPU loading of Xorg will up from 0.7% to 1.0…1.3…1.6…

Hi Wilson,

Have you checked the tegrastats before and after running the suspend/resume? What is the cpu frequency you are using here? Is the frequency always a steady one before and after suspend/resume?

Hi Wayne,

I’m using Xavier NX development kit and reflash new one sd card image by JetPack 4.6.
The CPU frequency is the default setting.
The CPU loading of Xorg in top command is up to 25% after 1 day.
I think the issue is easy to reproduce.

Following info is after suspend/resume 1000 times.

nv@nv-nx:~$ tegrastats
RAM 3128/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [10%@1420,4%@1420,6%@1420,10%@1420,off,off] EMC_FREQ 0% GR3D_FREQ 35% AO@55.5C GPU@54.5C PMIC@50C AUX@56C CPU@56.5C thermal@55.7C
RAM 3128/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [12%@1190,8%@1190,6%@1190,10%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@55.5C GPU@55C PMIC@50C AUX@56C CPU@56.5C thermal@55.7C
RAM 3127/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [6%@1190,7%@1190,5%@1190,8%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 47% AO@55.5C GPU@55C PMIC@50C AUX@56C CPU@56.5C thermal@55.85C
RAM 3127/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [3%@1190,13%@1190,1%@1190,4%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@55.5C GPU@55C PMIC@50C AUX@56C CPU@56.5C thermal@56C
RAM 3127/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [7%@1190,11%@1190,4%@1190,8%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@56C GPU@55C PMIC@50C AUX@56.5C CPU@56.5C thermal@56.2C
RAM 3125/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [8%@1190,21%@1190,6%@1190,6%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@56C GPU@55C PMIC@50C AUX@56.5C CPU@57C thermal@56.2C
RAM 3125/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [8%@1190,9%@1190,0%@1190,0%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 45% AO@56C GPU@55.5C PMIC@50C AUX@57C CPU@57C thermal@56.2C
RAM 3125/7765MB (lfb 617x4MB) SWAP 0/3883MB (cached 0MB) CPU [1%@1190,0%@1190,4%@1190,10%@1190,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@56C GPU@55.5C PMIC@50C AUX@56.5C CPU@57C thermal@56.2C

nv@nv-nx:~$ cat /proc/cpuinfo
processor	: 0
model name	: ARMv8 Processor rev 0 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer	: 0x4e
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x004
CPU revision	: 0
MTS version	: 53250041

processor	: 1
model name	: ARMv8 Processor rev 0 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer	: 0x4e
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x004
CPU revision	: 0
MTS version	: 53250041

processor	: 2
model name	: ARMv8 Processor rev 0 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer	: 0x4e
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x004
CPU revision	: 0
MTS version	: 53250041

processor	: 3
model name	: ARMv8 Processor rev 0 (v8l)
BogoMIPS	: 62.50
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
CPU implementer	: 0x4e
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x004
CPU revision	: 0
MTS version	: 53250041

nv@nv-nx:~$ lscpu
Architecture:         aarch64
Byte Order:           Little Endian
CPU(s):               6
On-line CPU(s) list:  0-3
Off-line CPU(s) list: 4,5
Thread(s) per core:   1
Core(s) per socket:   2
Socket(s):            2
Vendor ID:            Nvidia
Model:                0
Model name:           ARMv8 Processor rev 0 (v8l)
Stepping:             0x0
CPU max MHz:          1907.2000
CPU min MHz:          115.2000
BogoMIPS:             62.50
L1d cache:            64K
L1i cache:            128K
L2 cache:             2048K
L3 cache:             4096K
Flags:                fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp

Hi,

Could you run jetson_clocks and run your test check the cpu loading again?

Hi

nv@nv-nx:~$ sudo jetson_clocks --show
SOC family:tegra194  Machine:NVIDIA Jetson Xavier NX Developer Kit
Online CPUs: 0-3
cpu0: Online=1 Governor=schedutil MinFreq=1907200 MaxFreq=1907200 CurrentFreq=1907200 IdleStates: C1=0 c6=0
cpu1: Online=1 Governor=schedutil MinFreq=1907200 MaxFreq=1907200 CurrentFreq=1907200 IdleStates: C1=0 c6=0
cpu2: Online=1 Governor=schedutil MinFreq=1907200 MaxFreq=1907200 CurrentFreq=1907200 IdleStates: C1=0 c6=0
cpu3: Online=1 Governor=schedutil MinFreq=1907200 MaxFreq=1907200 CurrentFreq=1907200 IdleStates: C1=0 c6=0
cpu4: Online=0 Governor=schedutil MinFreq=1907200 MaxFreq=1907200 CurrentFreq=1907200 IdleStates: C1=0 c6=0
cpu5: Online=0 Governor=schedutil MinFreq=1907200 MaxFreq=1907200 CurrentFreq=1907200 IdleStates: C1=0 c6=0
GPU MinFreq=510000000 MaxFreq=510000000 CurrentFreq=510000000
EMC MinFreq=204000000 MaxFreq=1600000000 CurrentFreq=1600000000 FreqOverride=1
Fan: PWM=160
NV Power Mode: MODE_10W_DESKTOP

Yes, then please run your test under such situation.

Hi Wayne,

Yes, I’ve been run my test under the setting 22hrs and have the same issue.
Cloud you reproduce this issue? Thanks.

Hi,

I am not quite sure what you are saying here. How is it possible you already run the test with jetson clocks enabled for 22 hours?

You just enabled it 1 hour ago.

Hi Wayne,

Sorry, I thought that means just run the suspend/resume test again.
I will set the jetson_clocks and run the test. thanks.

Hi Wayne,
I set the jetson_clocks and run the suspend test last weekend.
The Xorg is still up to 90% CPU loading.

Hi,

  1. Could you share the final tegrastats result in the end of this test?

  2. Do you have a estimate about how long it took to make the CPU loading up to 50%? This will help us know how long to run this.

Hi Wayne,

I run my test on the Jetson Xavier NX Developer Kit about 2day to 50%.
You can change less the suspend/wake up time in my script. I thought it will be faster to 50%.

nv@nv-nx:~$ tegrastats
RAM 6747/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [3%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@41.5C PMIC@50C AUX@42C CPU@43C thermal@42.15C
RAM 6747/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [1%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@41.5C PMIC@50C AUX@42C CPU@43C thermal@42.15C
RAM 6747/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [4%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@41.5C PMIC@50C AUX@42C CPU@43C thermal@42.3C
RAM 6746/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [4%@1907,100%@1907,6%@1907,8%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@41.5C PMIC@50C AUX@42C CPU@43C thermal@42.15C
RAM 6746/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [2%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@42C PMIC@50C AUX@42C CPU@43C thermal@42.15C
RAM 6746/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [2%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@41.5C PMIC@50C AUX@42.5C CPU@43C thermal@42.35C
RAM 6746/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [1%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@42C PMIC@50C AUX@42.5C CPU@43C thermal@42.5C
RAM 6746/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [1%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42.5C GPU@42C PMIC@50C AUX@42.5C CPU@43C thermal@42.5C
RAM 6746/7765MB (lfb 80x4MB) SWAP 2590/3883MB (cached 3MB) CPU [2%@1907,100%@1907,0%@1907,0%@1907,off,off] EMC_FREQ 0% GR3D_FREQ 0% AO@42C GPU@42C PMIC@50C AUX@42.5C CPU@43C thermal@42.5C

Hi,

Thanks for sharing this. We will check.

Hi @Wilson_Lin ,

I am curious about your result here. If you stop the suspend and resume test after you see 100% loading over cpu, will it starts to decrease?

We run the test for 2 days but the cpu loading is not as that much as your case.

Hi Wayne,
Thanks for your reply.
I will check it again.

Hi Wayne,
I try to run the test again last weekend.
I stop the suspend when the Xorg loading up to 25% on last Friday.
The Xorg loading still keep 25% today.

My test step:

  1. Flash JetPack4.6 to micro sd card.
  2. Put micro sd card to Xavier NX development kit and power on.
  3. Run the first boot and setup username/password
  4. Login to Ubuntu Desktop.
  5. Copy my test script to ubuntu.
  6. Open Terminal and run my test script on Ubuntu Desktop mode. (Not usb debug port or ssh mode)
    (I have tried to just run my script in the ssh terminal and doesn’t login to desktop after power on. The Xorg loading isn’t up.)
  7. Open top command and check Xorg loading.

Hi,

So we are talking about the memory usage or the CPU loading?

Hi Wayne,

The CPU loading of Xorg.