Egnaro
Posts: 5
Joined: Thu Sep 05, 2019 2:59 am

High CPU Usage

Thu Sep 05, 2019 3:00 am

Is this normal...

I opened Task Manager then,

I get 25% CPU usage max by just moving my mouse cursor around on the desktop with no applications running. I went on Reddit on Pi and it just reached 89% CPU Usage. This is why it was lagging, I thought it was my mouse scrolling delay :/.



I have a Raspberry Pi 4 with 4GB variant hooked to 4k monitor (will probably switch to 720p or 1080p monitor soon) with default resolution. Changed GPU memory split to 256 for testing but it doesn't have to do anything with very high CPU usage.

What can I do to reduce CPU usage?

Andyroo

Re: High CPU Usage

Thu Sep 05, 2019 12:43 pm

Welcome to the forum,

I would start with opening a terminal session and running the top or htop commands

Watch for a moment or two with no activity and see if anything shows up with high CPU use.

Have you done a

Code: Select all

sudo apt update
sudo apt upgrade
or

Code: Select all

sudo apt update
sudo apt dist-upgrade
recently - Buster is still a bit 'bleeding' edge in places :lol:

Have you loaded any Raspberry Pi produced trial software or changed the config.txt file at all?
Have you loaded any other applications?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26716
Joined: Sat Jul 30, 2011 7:41 pm

Re: High CPU Usage

Thu Sep 05, 2019 1:02 pm

Just tried a fairly basic run on Pi4 at 4kp30, and task manager up, get at most 17% CPU when wiggling mouse rapidly over the manage window. Front page of reddit sits about 1% if no videos running, 30% max when wiggling mouse. Wiggling plus a video running, about 45%

So, something weird with your setup.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Egnaro
Posts: 5
Joined: Thu Sep 05, 2019 2:59 am

Re: High CPU Usage

Thu Sep 05, 2019 5:22 pm

All I did is updating everything up to date and I only changed a config text file to add mouse poll set to 0. I am running on recommended OS NOOBS. So I don't know what's up. I have no new applications or any trials downloaded. All I have is a chromium application plus the default application. I just bought it.

Edit: Sorry, I meant cmdline.txt file but I removed the usbhid.mousepoll=0 since I don't need it anymore (it reduced the CPU usage on mouse wiggling with no applications running to 5% max). Still, have issues with high CPU usage. I reached 89% by just wiggling my mouse around on Reddit :/.

I noticed CPU usage increased from 5% to 18% max when I opened a simple application called Desktop Preferences...

As for the config.txt file, I did make some changes. I changed the GPU memory split so right now I have gpu_mem=256 and Enabled 4k, I have hdmi_enable_4kp60=1.

gpu_mem=256
hdmi_enable_4kp60=1.

gkreidl
Posts: 6335
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: High CPU Usage

Thu Sep 05, 2019 6:14 pm

Switch to the legacy video driver and the high load when rapidly moving the mouse will vanish.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Egnaro
Posts: 5
Joined: Thu Sep 05, 2019 2:59 am

Re: High CPU Usage

Thu Sep 05, 2019 6:19 pm

Sorry, I'm new to this stuff. Where can I get/download the Legacy Video driver?

Right now I have a new driver called VCD3.

gkreidl
Posts: 6335
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: High CPU Usage

Thu Sep 05, 2019 6:38 pm

Nothing to download.
sudo raspi-config
Go to advanced.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Egnaro
Posts: 5
Joined: Thu Sep 05, 2019 2:59 am

Re: High CPU Usage

Thu Sep 05, 2019 6:53 pm

Oh ok, I opened the terminal then entered the command. I went to advanced to select GL driver but for some reason, I was not able to enable the G1 Legacy. I tried to enter the driver but it's saying its disabled, I have Fake KMS driver enabled right now.

I"m researching a bit to see what I can do right now.

Edit: Still have issues with high cpu usage

Egnaro
Posts: 5
Joined: Thu Sep 05, 2019 2:59 am

Re: High CPU Usage

Thu Sep 05, 2019 8:06 pm

I'm shocked... It was the 4kp60 after all. I finally disabled hdmi_enable_4kp60=1. The CPU usage is reduced to normal percentages now. Sometimes, it's a high percentage right after opening the application than normal. No big deal). NO lagging and no mouse scroll delaying.
The upgrade from Pi zero to 4 is insane. I'm surprised by the performance on Pi 4. I am able to play 1080p video youtube, no lagging, and the CPU usage is normal.

Jeez, thanks for the help guys. :lol:

TDLR: Enabling 4kp60 might increase CPU usage dramatically.

Return to “General discussion”