high cpu usage with no activity

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

high cpu usage with no activity

Post by bash64 » Wed Jul 04, 2018 7:15 pm

I am experiencing high cpu usage in the 60-80% range on all 8 threads with no activity.
cinnamon --replace is doing this.
I have seen this issue before and I have tried everything that worked before, but nothing works.
I removed all applets. I had some bad applets before.
I tried a desktop reset with alt+ctrl+esc.

Anyone else seeing this?

I upgraded from mint 19 beta to mint 19 full and this started happening.

User avatar
MintBean
Level 9
Level 9
Posts: 2969
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

Re: high cpu usage with no activity

Post by MintBean » Wed Jul 04, 2018 9:07 pm

Hi bash64,

Yes I've seen the same. I also installed from beta.

The issue seemed to appear after I ran the commands the blog directs to 'upgrade' from beta to full release. I reverted using timeshift and the issue seems to be gone.

I also noticed cinnamon --replace using a massive chunk of CPU when it occurred, although this alone didn't seem to account for all the CPU usage - in fact I remembered thinking that all the processes listed wouldn't add up to the total CPU the performance monitor was showing as being used.

I still notice that Mint 19 is using more CPU than 18 was at idle, to the point where sometimes my fan fires up when it didn't used to- in fact one core just spiked to 100% for about 5 seconds as I type on this static web page - nothing else open. Never had those kind of occurrences before.

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Wed Jul 04, 2018 9:33 pm

UPDATE:
When I switch to the system monitor the cpu usage spikes from 0% to 40%+.
Very weird, but very consistent.

Its genuine and not system monitor giving off a false reading.
htop shows cinnamon --replace going 40% on all 8 threads when I switch to the resources tab on system monitor.

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Wed Jul 04, 2018 10:09 pm

it regular now.
at least 25% on all threads.
admittedly i am running on the fbdev driver for personal reasons.
i really don't think that has anything to do with it.
in mint 19 beta this didnt happen.

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Wed Jul 04, 2018 10:57 pm

further testing:
does not happen when using genuine nvidia driver instead of fbdev.

conclusion:
its related to software rendering mode.
only occurs in the full mint 19, not the beta.

User avatar
catweazel
Level 17
Level 17
Posts: 7520
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: high cpu usage with no activity

Post by catweazel » Wed Jul 04, 2018 11:00 pm

bash64 wrote:
Wed Jul 04, 2018 10:57 pm
further testing:
Please post the output of this terminal command:

Code: Select all

inxi -Fxz
Enclose the results in-between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Thu Jul 05, 2018 2:22 am

Here is the output:

Code: Select all

$ inxi -Fxz
System:    Host: msi-GT70-2PE Kernel: 4.15.0-22-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.6 (Gtk 3.22.30-1ubuntu1) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: Micro-Star product: GT70 2PE v: REV:0.C serial: N/A
           Mobo: Micro-Star model: MS-1763 v: REV:0.C serial: N/A
           UEFI: American Megatrends v: E1763IMS.51B date: 01/29/2015
Battery    BAT1: charge: 49.5 Wh 98.2% condition: 50.4/86.6 Wh (58%) model: MSI BTY-M6D status: N/A
CPU:       Quad core Intel Core i7-4940MX (-MT-MCP-) arch: Haswell rev.3 cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 26340
           clock speeds: max: 3301 MHz 1: 3119 MHz 2: 3243 MHz 3: 3887 MHz 4: 3833 MHz 5: 3126 MHz 6: 3163 MHz
           7: 3364 MHz 8: 3205 MHz
Graphics:  Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller bus-ID: 00:02.0
           Card-2: NVIDIA GK104M [GeForce GTX 880M] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: fbdev (unloaded: modesetting,vesa)
           Resolution: 1920x1080@77.00hz
           OpenGL: renderer: llvmpipe (LLVM 6.0, 256 bits) version: 3.3 Mesa 18.0.0-rc5 Direct Render: Yes
Audio:     Card-1 Intel 8 Series/C220 Series High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Card-2 NVIDIA GK104 HDMI Audio Controller driver: vfio-pci bus-ID: 01:00.1
           Sound: Advanced Linux Sound Architecture v: k4.15.0-22-generic
Network:   Card-1: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller
           driver: alx port: d000 bus-ID: 03:00.0
           IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Card-2: Qualcomm Atheros AR9462 Wireless Network Adapter driver: ath9k bus-ID: 04:00.0
           IF: wlp4s0 state: down mac: <filter>
Drives:    HDD Total Size: 9001.8GB (37.3% used)
           ID-1: USB /dev/sda model: BUP_Slim size: 1000.2GB temp: 0C
           ID-2: /dev/mmcblk0 model: N/A size: 64.0GB
           ID-3: /dev/sdb model: ST4000LM024 size: 4000.8GB temp: 36C
           ID-4: /dev/sdc model: ST4000LM024 size: 4000.8GB temp: 36C
Partition: ID-1: / size: 49G used: 12G (25%) fs: ext4 dev: /dev/dm-1
           ID-2: /home size: 3.1T used: 2.2T (77%) fs: ext4 dev: /dev/dm-3
           ID-3: /boot size: 1006M used: 218M (23%) fs: ext2 dev: /dev/md0p1
           ID-4: swap-1 size: 25.77GB used: 0.00GB (0%) fs: swap dev: /dev/dm-2
RAID:      Device-1: /dev/md1 - active components: online: sdc7[0] sdb7[2]
           Info: raid: 1 report: 2/2 blocks: 3368682304 chunk size: N/A bitmap: true
           Device-2: /dev/md0 - active components: online: sdc6[0] sdb6[1]
           Info: raid: 1 report: 2/2 blocks: 1048512 chunk size: N/A bitmap: true
Sensors:   System Temperatures: cpu: 55.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 280 Uptime: 2:57 Memory: 2876.1/32151.8MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 

User avatar
smurphos
Level 7
Level 7
Posts: 1615
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: high cpu usage with no activity

Post by smurphos » Thu Jul 05, 2018 2:30 am

bash64 wrote:
Thu Jul 05, 2018 2:22 am
Here is the output:

Code: Select all

$ inxi -Fxz
           OpenGL: renderer: llvmpipe (LLVM 6.0, 256 bits) version: 3.3 Mesa 18.0.0-rc5 Direct Render: Yes
Looks like you are running a software rendering session. 1st thing to try is log out, and before logging back in click on the Cinnamon Icon on the login-screen and check which session is default.

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Thu Jul 05, 2018 7:44 am

ok, logged out.
offered cinnamon defaul and cinnamon software renderng mode.
i tried both. same results either way.
excessive cpu usage by cinnamon.

btw: i am using nomodeset on the boot line, blacklisting nouveau, and there are no nvidia drivers.
i have nvidia optimus (nvidia/intel) combo hardware on a laptop.
sometimes i run with no video drivers loaded (fbdev only).
never been a problem before. even mint 19 beta had no issue.
i do notice if any kind of drawing occurs (system monitor graph) it goes bonkers.
200-400% total cpu usage for cinnamon --replace.
all 8 threads.

User avatar
smurphos
Level 7
Level 7
Posts: 1615
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: high cpu usage with no activity

Post by smurphos » Thu Jul 05, 2018 7:57 am

Do you get any warning pop-up that you are running in Software Rendering mode logging into the Default Session?

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Thu Jul 05, 2018 11:33 am

smurphos wrote:
Thu Jul 05, 2018 7:57 am
Do you get any warning pop-up that you are running in Software Rendering mode logging into the Default Session?
There is no message about software rendering mode either way, strangely enough.
I thought that fbdev supported acceleration.
Correct me if I am wrong.

User avatar
smurphos
Level 7
Level 7
Posts: 1615
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: high cpu usage with no activity

Post by smurphos » Fri Jul 06, 2018 1:47 am

Not sure to be honest. Hopefully someone more knowledgeable about graphics drivers will pop-up

In the meantime, I think a review of the obvious logs is in order. Reboot - log-in to the default session and then copy and paste the output of

cat ~/.xsession-errors

dmesg | grep fbdev, dmesg | grep error, dmesg | grep warning might also throw up something useful.

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Fri Jul 06, 2018 10:37 am

$ cat ~/.xsession-errors
https://pastebin.com/kWvcXPLQ

Thanks for the tip on this file. Apparently 'shutter' was having issues running on startup. Firejail doesn't like it.
Firejail can cause quite a few strange problems when it wants to. I have switched to running shutter without firejail for now.


$ dmesg | grep fbdev

$ dmesg | grep error
[ 2.641573] usb 3-11: string descriptor 0 read error: -22
[ 32.241216] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
[12278.460318] nodejs[6463]: segfault at 200 ip 00007f3f3c836d2b sp 00007f3f2f7fddc0 error 4 in libusb-1.0.so.0.1.0[7f3f3c82d000+17000]

$ dmesg | grep warning

nodejs segfaulted. it is used to run custom java code on login. it lights up my msi steelseries rgb keyboard.

i will look into these issues today.

User avatar
smurphos
Level 7
Level 7
Posts: 1615
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: high cpu usage with no activity

Post by smurphos » Fri Jul 06, 2018 11:21 am

Not particularly enlightening except that that right from the start it's launching the software rendering session (references to cinnamon2d) so it's not trying and failing to launch the regular session. I'm out of ideas to troubleshoot :(

Code: Select all

dbus-update-activation-environment: setting MANDATORY_PATH=/usr/share/gconf/cinnamon2d.mandatory.path
dbus-update-activation-environment: setting S_COLORS=auto
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/dad
dbus-update-activation-environment: setting USER=dad
dbus-update-activation-environment: setting DESKTOP_SESSION=cinnamon2d
dbus-update-activation-environment: setting DEFAULTS_PATH=/usr/share/gconf/cinnamon2d.default.path

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Fri Jul 06, 2018 11:54 am

thanks for trying.
for now to get things done i will boot off of devuan linux using a usb hard drive.
i could go back to beta but then no way to keep providing debug info.

BlueHAZE
Level 1
Level 1
Posts: 1
Joined: Fri Jul 06, 2018 7:29 pm

Re: high cpu usage with no activity

Post by BlueHAZE » Fri Jul 06, 2018 7:43 pm

Had the same problem with LM19 xfce fresh install
Found a few post on bluetooth being the problem
Removing bluetooth from the system fix the problem for me.

https://github.com/linuxmint/Cinnamon/issues/7258

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Fri Jul 06, 2018 9:01 pm

I will give that a try.
Did you just remove the system tray applet or did you do a full uninstall?

UPDATE: no dice.

bash64
Level 2
Level 2
Posts: 96
Joined: Mon Mar 23, 2015 12:19 am

Re: high cpu usage with no activity

Post by bash64 » Sat Jul 07, 2018 1:37 am

closing this incident.
I was able to reproduce this in mint 18.1 also.
somehow i never noticed the high cpu usage before.
at this point i must build a new system to overcome my issues.
thanks.

fosssurfer
Level 1
Level 1
Posts: 5
Joined: Sun Jul 08, 2018 4:15 pm

Re: high cpu usage with no activity

Post by fosssurfer » Thu Jul 12, 2018 8:49 pm

I had High CPU usage Mint 19 Cinnamon and this worked for me as listed below.

It appears that when you use W+L and Restart Cinnamon the 1 core at 92%+ constant high cpu usage disappears.

I fixed this or it got fixed like this...

1. W+L

2. click the littel box (Actions) on the bottom right

3. click Restart-Cinnamon

Note: at this point my system hung with no Cinnamon stayed like that for over 5 minutes so I hit the power button to shut down Off.

CPU usage now in the 10% or less range for 1-2 cores some at 0-1% the way it should be.

I switch back on problem solved! Go figure.

Redbatman1989
Level 1
Level 1
Posts: 3
Joined: Tue Sep 04, 2018 11:17 pm

Re: high cpu usage with no activity

Post by Redbatman1989 » Tue Sep 04, 2018 11:49 pm

what does W+L do and how do you do it?

Post Reply

Return to “Cinnamon”