Cinnamon hanging, high cpu usage

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mintybits

Cinnamon hanging, high cpu usage

Post by mintybits »

Just yesterday my Mint 17 Cinnamon desktop ground to a halt. I rebooted but it limped along a while and then ground to a halt again. It has never done this before. I had to install XFCE to be able to use the PC.
Then, last night, my brothers Mint 17 computer started showing very high CPU usage on my VNC remote xfce display. I checked top and found 91% for Xorg! I shut the vncserver down and ran top again from a remote terminal and no change.
Two PCs having a simialr desktop problem at the same time suggests a faulty software update.

Is anyone else seeing this?


Code: Select all

top - 02:35:41 up  6:54,  1 user,  load average: 1.27, 1.22, 1.22
Tasks: 161 total,   4 running, 157 sleeping,   0 stopped,   0 zombie
%Cpu(s): 62.9 us,  1.5 sy,  0.0 ni, 35.3 id,  0.2 wa,  0.2 hi,  0.0 si,  0.0 st
KiB Mem:   3981844 total,  2385120 used,  1596724 free,    76864 buffers
KiB Swap:  4125692 total,        0 used,  4125692 free.  1820152 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND    
1325 root      20   0  208828  70924  43912 R  91.2  1.8 376:27.01 Xorg       
 1539 mdm       20   0 2639260 168836  67240 R  35.6  4.2 148:20.71 mdmwebkit
   37 root      20   0       0      0      0 S   0.3  0.0   0:49.60 kworker/1+ 
  254 root      20   0       0      0      0 S   0.3  0.0   0:00.96 jbd2/sdb3+ 
 1809 peter     20   0  663440   9408   5888 S   0.3  0.2   0:47.90 conky      
11053 peter     20   0   24944   1604   1112 R   0.3  0.0   0:00.07 top        
    1 root      20   0   33884   3128   1436 S   0.0  0.1   0:01.41 init       
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd   
    3 root      20   0       0      0      0 S   0.0  0.0   0:00.51 ksoftirqd+ 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mintybits

Re: Cinnamon hanging, high cpu usage

Post by mintybits »

I managed to solve the cpu usage problem on my brothers PC by removing mdm. I'm not sure what the implications are of this at his end but the 91% cpu usage has completely relented. BTW I am logged in via vncserver and he is not logged in at all, if that makes any difference.

Code: Select all

sudo apt-get remove mdm
I have rebooted my PC into Cinnamon to see whether it hangs up again. I also installed the latest kernel update offered to me at the foreboding level 5 status. :shock:
mintybits

Re: Cinnamon hanging, high cpu usage

Post by mintybits »

The high CPU usage is fixed when my brother logs in at the PC. There is something broken when the machine is sitting idle at the login screen. After logging in, no more >90% cpu usage.

This looks related: https://github.com/linuxmint/mdm/issues/97
mintybits

Re: Cinnamon hanging, high cpu usage

Post by mintybits »

I have narrowed the problems down a lot.

1) High CPU usage is caused by mdm at the physical login screen only. Once logged-in, the usgae drops to normal. There seems to be a real problem here with the default login screen. It has some animation, although you'd have to be a sloth to notice it, and there could be an issue with how this is achieved. In any case, running 90%+ cpu has some very bad implications, especially for laptops running on batteries but also for cpu fan life. I'm just going to avoid the problem by changing the login theme to GTK.

2) My Cinnamon desktop hanging is now 100% reporducible when I attach a USB disk and try to open one of its folders that contains photos. The desktop freezes completely. Ctrl-Alt-F1 allowed me to run "top" where I found a process called gvfsd-trash consumed ALL my cpu bandwitdh, even peaking at 133% at times (however that is possible?). I had a lot of trouble trying to kill this process and was never able to recover the desktop without a reboot.

If anyone has any idea about the cause of 2) I would be most grateful to know.
retrotronic

Re: Cinnamon hanging, high cpu usage

Post by retrotronic »

I had a similar problem; the login screen would appear but I couldn't type my login password in on boot up until all disk activity had ceased. It was as if something was using all the CPU... I solved it by updating my kernel - to do that bring up 'Update Manager' click 'View' then click 'Linux Kernels'. Choose the latest kernel from the list and reboot and see if that helps solve your problem. Good luck !
mintybits

Re: Cinnamon hanging, high cpu usage

Post by mintybits »

Thanks @ retrotonic. I am happily using the GTK login ... I actually prefer it. I have upgraded to Rebecca. I'll try the html login at some point.

Regarding issue 2)
I have fixed the USB hang problem by deleting the contents of .Trash-1000 on the USB. This seems to have stopped my whole desktop freezing up. Why the trash should cause this to happen is beyond me.

The symptoms are that if I mounted the USB disk from Nemo the desktop would freeeze. Nothing on my Cinnamon desktop would respond to the mouse. The whole desktop was frozen. I could drop out to a terminal using Ctrl-Alt-F1 and use that, albeit very sluggish. I found using "top" that gvfs-trash was using a lot of CPU time...which is what made me try emptying the trash. I could not get back into the desktop using Alt-F8. Also, during this freeze my hard disk activity light was full on and the disk was making disk noises.

I was able to delete the .Trash-1000 contents by manually mounting the USB in a terminal to /mnt. I then used rm -r to delete the contents.

It seems to me there is a serious defect in the Nemo trash handling software for USB disks.
Locked

Return to “Cinnamon”