Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cinnamon --replace locking up system and using all resources of powr #9730

Open
willqak opened this issue Nov 28, 2020 · 7 comments
Open

cinnamon --replace locking up system and using all resources of powr #9730

willqak opened this issue Nov 28, 2020 · 7 comments

Comments

@willqak
Copy link

willqak commented Nov 28, 2020

I have 4 main production linux boxes that use Cinnamon as the primary Desktop Environment. The process cinnamon --replace process periodically use 100% CPU and load averages off the scale. I am forced to use MATE or XFCE when this happens. After a few days, I go back to cinnamon and all is fine.

Okay, what is this process cinnamon --replace (no Internet search adequately answers this question, so any comers with a reply of "RTFM or the equally stupid reply of "google"", YOU are banished).

Let's hear from Cinnamon developers.

What is cinnamon --replace????

System:
Kernel: 5.4.0-54-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Cinnamon 4.6.7 Distro: Linux Mint 20 Ulyana
base: Ubuntu 20.04 focal
Machine:
Type: Laptop System: Acer product: Predator PT515-51 v: V1.13
serial:
Mobo: CFL model: Ghibli_CFS v: V1.13 serial: UEFI: Insyde v: 1.13
date: 03/04/2020
Battery:
ID-1: BAT0 charge: 68.0 Wh condition: 67.9/82.1 Wh (83%)
model: Getac KT00408001 AP18JHQ status: Not charging
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M510
charge: 55% (should be ignored) status: Discharging
CPU:
Topology: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP
arch: Kaby Lake rev: A L2 cache: 12.0 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 62399
Speed: 900 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 956 2: 924
3: 987 4: 1025 5: 963 6: 918 7: 1000 8: 1091 9: 1007 10: 1405 11: 1003
12: 997
Graphics:
Device-1: Intel UHD Graphics 630 vendor: Acer Incorporated ALI
driver: i915 v: kernel bus ID: 00:02.0
Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile]
vendor: Acer Incorporated ALI driver: nvidia v: 450.80.02 bus ID: 01:00.0
Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia
unloaded: fbdev,nouveau,vesa resolution: 1920x1080~144Hz
OpenGL: renderer: GeForce RTX 2060/PCIe/SSE2 v: 4.6.0 NVIDIA 450.80.02
direct render: Yes
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: Acer Incorporated ALI
driver: snd_hda_intel v: kernel bus ID: 00:1f.3
Device-2: NVIDIA TU106 High Definition Audio vendor: Acer Incorporated ALI
driver: snd_hda_intel v: kernel bus ID: 01:00.1
Sound Server: ALSA v: k5.4.0-54-generic
Network:
Device-1: Intel Wireless-AC 9560 [Jefferson Peak] vendor: Bigfoot Networks
driver: iwlwifi v: kernel port: 5000 bus ID: 00:14.3
IF: wlp0s20f3 state: up mac:
Device-2: Realtek vendor: Acer Incorporated ALI driver: r8169 v: kernel
port: 3000 bus ID: 40:00.0
IF: enp64s0 state: down mac:
Drives:
Local Storage: total: 74.58 TiB used: 6.67 TiB (8.9%)
ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB1T0HALR-00000
size: 953.87 GiB
ID-2: /dev/nvme1n1 vendor: Western Digital model: WDBRPG0020BNC-WRSN
size: 1.82 TiB
ID-3: /dev/sda type: USB model: External USB3.0 size: 14.55 TiB
ID-4: /dev/sdb type: USB model: External USB3.0 size: 14.55 TiB
ID-5: /dev/sdc type: USB model: External USB3.0 size: 14.55 TiB
ID-6: /dev/sdd type: USB model: External USB3.0 size: 14.55 TiB
ID-7: /dev/sde type: USB model: External USB3.0 size: 14.55 TiB
RAID:
Device-1: ztank type: zfs status: ONLINE size: 29.10 TiB free: 26.10 TiB
array-1: mirror status: ONLINE size: 14.50 TiB free: 13.10 TiB Components:
online: N/A
array-2: mirror status: ONLINE size: 14.50 TiB free: 13.10 TiB Components:
online: N/A
Partition:
ID-1: / size: 1.79 TiB used: 361.48 GiB (19.7%) fs: ext4
dev: /dev/nvme1n1p2
Sensors:
System Temperatures: cpu: 50.0 C mobo: 42.0 C gpu: nvidia temp: 44 C
Fan Speeds (RPM): N/A
Info:
Processes: 464 Uptime: 4h 08m Memory: 31.22 GiB used: 4.17 GiB (13.4%)
Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: zsh v: 5.8
inxi: 3.0.38
will %  ~   ✔  681  23:38:11

and why does it f-up my boxes periodically?

@devreal
Copy link

devreal commented Dec 7, 2020

I think I'm seeing a similar issue, cinnamon --replace hovering at about 20-30% CPU usage in htop and at times using a full core for a while, making the whole feel kinda sluggish. This just happened after 37 days uptime and plenty of windows open on my Lenovo T460s (HD Graphics 520) with Linux Mint 20.

Attaching to the process with Linux perf, it seems to be an issue with the garbage collections?

  24.37%  cinnamon   libmozjs-52.so.0.0.0           [.] js::GCMarker::processMarkStackTop
   6.00%  cinnamon   libcjs.so.0.0.0                [.] 0x0000000000041a1b
   5.93%  cinnamon   libmozjs-52.so.0.0.0           [.] js::GCMarker::mark<JSObject>
   4.49%  cinnamon   libc-2.31.so                   [.] __vfprintf_internal
   3.93%  cinnamon   libglib-2.0.so.0.6400.3        [.] g_logv
   3.52%  cinnamon   libc-2.31.so                   [.] _IO_default_xsputn
   3.01%  cinnamon   libc-2.31.so                   [.] __strcmp_avx2
   2.31%  cinnamon   libmozjs-52.so.0.0.0           [.] js::GCMarker::markAndPush<js::ObjectGroup>
   1.92%  JS Helper  libmozjs-52.so.0.0.0           [.] FinalizeTypedArenas<JSObject>
   1.81%  cinnamon   libc-2.31.so                   [.] getenv
   1.53%  cinnamon   libmozjs-52.so.0.0.0           [.] MustSkipMarking<JSObject*>
   1.49%  cinnamon   libmozjs-52.so.0.0.0           [.] DoMarking<JSObject>
   1.41%  cinnamon   libc-2.31.so                   [.] realloc
   1.41%  cinnamon   libmozjs-52.so.0.0.0           [.] js::GCMarker::markAndScan<JSString>
   1.38%  cinnamon   libc-2.31.so                   [.] __strchrnul_avx2
   1.33%  cinnamon   libmozjs-52.so.0.0.0           [.] js::GCMarker::markAndScan<js::Shape>
   1.25%  cinnamon   libglib-2.0.so.0.6400.3        [.] g_mutex_lock
   1.23%  cinnamon   libglib-2.0.so.0.6400.3        [.] g_mutex_unlock
   1.20%  cinnamon   libmozjs-52.so.0.0.0           [.] js::GCMarker::mark<js::Shape>
   1.16%  cinnamon   libc-2.31.so                   [.] _itoa_word
   1.04%  cinnamon   libcjs.so.0.0.0                [.] 0x0000000000048b51
   1.01%  cinnamon   libmozjs-52.so.0.0.0           [.] js::gc::GCRuntime::beginMarkPhase
   0.98%  cinnamon   libc-2.31.so                   [.] __strlen_avx2

Some system details (please let me know if I can provide more):

$ cinnamon --version
Cinnamon 4.6.7
$ cat /etc/lsb-release 
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=20
DISTRIB_CODENAME=ulyana
DISTRIB_DESCRIPTION="Linux Mint 20 Ulyana"

@drhansen
Copy link

I'm seeing a similar thing on a new install of LinuxMint 20.1.
Sometimes 8 or more processes of cinnamon --replace.
Sometimes a cinnamon --replace process will take 98% of CPU (htop).
When that happens the system essentially freezes, sometimes forever.
Sometimes restarting cinnamon is possible (alt-F2, r)

10:36:50 david@DRH-i5-LM: ~ $ inxi -Fxz
System: Kernel: 5.4.0-64-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.8.6
Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal
Machine: Type: Desktop Mobo: ASUSTeK model: P8Z77-V LE v: Rev X.0x serial: BIOS: American Megatrends
v: 0608 date: 08/23/2012
CPU: Topology: Quad Core model: Intel Core i5-3570K bits: 64 type: MCP arch: Ivy Bridge rev: 9
L2 cache: 6144 KiB
flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 27281
Speed: 1605 MHz min/max: 1600/3800 MHz Core speeds (MHz): 1: 1605 2: 1605 3: 1605 4: 1605
Graphics: Device-1: NVIDIA GK104 [GeForce GTX 660 Ti] vendor: eVga.com. driver: nvidia v: 460.32.03 bus ID: 01:00.0
Display: x11 server: X.Org 1.20.9 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa
resolution: 1920x120060Hz, 1920x120060Hz, 1920x1200~60Hz
OpenGL: renderer: GeForce GTX 660 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 460.32.03 direct render: Yes
Audio: Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: ASUSTeK driver: snd_hda_intel
v: kernel bus ID: 00:1b.0
Device-2: NVIDIA GK104 HDMI Audio vendor: eVga.com. driver: snd_hda_intel v: kernel bus ID: 01:00.1
Device-3: Logitech Webcam C310 type: USB driver: snd-usb-audio,uvcvideo bus ID: 6-3:2
Sound Server: ALSA v: k5.4.0-64-generic
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK P8 series driver: r8169
v: kernel port: d000 bus ID: 03:00.0
IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac:
Drives: Local Storage: total: 232.89 GiB used: 16.24 GiB (7.0%)
ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 250GB size: 232.89 GiB
Partition: ID-1: / size: 227.74 GiB used: 16.24 GiB (7.1%) fs: ext4 dev: /dev/sda5
Sensors: System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: nvidia temp: 50 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 33%
Info: Processes: 271 Uptime: 30m Memory: 15.59 GiB used: 2.01 GiB (12.9%) Init: systemd runlevel: 5 Compilers:
gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38

PS: on an upgraded (19.3 --> 20.0 --> 20.1 machine I see high CUP% as well, but nothing like that seen on the clean install above.

@mtwebster
Copy link
Member

Hi I need some further information regarding these issues:

  • Attach ~/.xsession-errors from when the issue manifests
  • Attach the file 'settings.txt' from the result of dconf dump /org/cinnamon/ > settings.txt

Please link these rather than pasting them into your reply, or, if you must paste them, do so with code formatting.

If you have any cinnamon applets or desklets that monitor CPU or disk activity (or anything similar) please disable them, restart cinnamon and see if the issue continues to manifest. These are generally discouraged, as they can potentially cause serious issues on the desktop if not written correctly.

@willqak cinnamon --replace is the command that restarts the desktop UI (panels, applets, etc...). Cinnamon is the program name, --replace means replace any previous instance of this process.

It's the equivalent of alt-f2->'r'->enter or hitting ctrl-alt-escape during your session (which btw tends to be a quick way to alleviate these symptoms when you encounter them)

This is historically how to restart 'desktop' things like the window manager and panels in linux. It used to be 'gnome-panel --replace' or in mate, it's mate-panel --replace.

PLEASE DO NOT IGNORE THE NEW ISSUE TEMPLATE IN THE FUTURE

@drhansen
Copy link

I'll send the requested files when next I encounter the situation.

Sorry for not starting a "new issue", I thought this was the same thing.

@gamedebug
Copy link

@mtwebster I met the same issue on 20.2 (Uma). Attached the further information you needed.
settings.txt
xsession-errors.txt

@zaemiel
Copy link

zaemiel commented Nov 27, 2022

Any solution? I met with the same issue since 18 version.

@xavierholt
Copy link

xavierholt commented Jul 4, 2024

I just fixed this problem (or a very similar problem) on a fresh Mint 21.3 (Virginia) install on a new computer. In my case, the problem was a lack of GPU drivers.

Symptoms:

  • One cinnamon --replace process using a very large amount of CPU.
  • Several other cinnamon --replace processes (or possibly threads; sometimes up to ~20) using a few percent of CPU each.
  • I believe the parent processes would also show high CPU usage.

I'd see this when running Firefox and/or the Steam client, and it was clearly related to the number of screen redraws. When Steam was showing anything animated, CPU use would skyrocket; scrolling until the animated bits were off-screen would fix it. Scrolling in Firefox would produce a similar (temporary) spike while the page contents were moving. I suspect any program that does heavy redrawing would have the same behaviour, but those were the only two I tested.

My Fix:

In my case, the problem was that Linux wasn't using hardware acceleration because it didn't recognize my GPU. I have a fairly new AMD/Radeon GPU, and the drivers for those are found in the AMDgpu kernel module. The 5.15 kernel that came with Mint wasn't modern enough to talk to my GPU. Upgrading to kernel version 6.5 (I used Update Manager => View => Linux Kernels and picked the latest one) and restarting fixed everything. There's now ever only one cinnamon --replace process, and my CPU use stays below 10%.

After the kernel update, I could see that the GPU was correctly recognized:

[12:56:02 holt@Marcille ~]$ inxi -G
Graphics:
  Device-1: AMD driver: amdgpu v: kernel
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: amdgpu,ati
    unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu
    resolution: 1920x1080~60Hz
  OpenGL: renderer: GFX1101 (gfx1101 LLVM 15.0.7 DRM 3.54 6.5.0-41-generic)
    v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2

I don't have the exact output of that command from before the fix, but the most obvious symptom was that the OpenGL renderer was listed as LLVMpipe, which is a software renderer.

I suspect people with unrecognized NVIDIA cards will see similar problems, but the process for updating those drivers will be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants