`cinnamon --replace` no longer returns

Questions about applications and software
Forum rules
Before you post please read how to get help
TomRoche
Level 4
Level 4
Posts: 243
Joined: Thu Jan 13, 2011 2:52 pm

`cinnamon --replace` no longer returns

Postby TomRoche » Fri Feb 05, 2016 10:41 pm

I have a box running LMDE2 which I regularly use despite its having only 4GB RAM. Worse yet, I run Cinnamon on it; worse still, I tend to run Firefox with lots of tabs. Hence I would periodically run a script like the following to recover memory, once free memory got below ~5% (and after first stopping Firefox):

Code: Select all

echo -e 'DO NOT use keyboard or mouse while Cinnamon is restarting!'
cinnamon --replace
echo -e 'Cinnamon restarted: resume normal IO'
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'


This worked as recently as `cinnamon --version` == 2.6.13+betsy: the script would sit for a bit while Cinnamon restarted, then `cinnamon --replace` would return, I would get the sudo prompt, and all would be well. Particularly, the OS would recover lots memory: usedup and cached memory would go way down, free memory would go way up. (I still don't know of a way to force it to unswap: ping me if you know how to do that programmatically.) Note that if I only drop cache (i.e., run `sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'` without running `cinnamon --replace`) substantially less memory frees than if I run both (and particularly if I run them in the order given in the scriptlet).

I recently updated the box to `cinnamon --version` == 2.8.6+betsy (new version) from 2.6.13+betsy (old version). (Thank you, Update Manager>View>History of updates.) In the new version, when I run `cinnamon --replace`, it does not return. Worse yet, if I either

* hit C-c in the terminal in which `cinnamon --replace` is running
* close the terminal in which `cinnamon --replace` is running

Cinnamon dies violently:

* desktop background goes black (though all previous desktop windows, icons, and panel continue to display)
* desktop windows lose their frames
* mouse moves, but won't interact with anything
* keyboard fails: no keychords have any effect other than C-A-F1 etc.

At which point my only option appears to be to goto tty1, shutdown those applications which can be shutdown cleanly from a terminal (e.g., Emacs), and reboot. So I'd like to know

* is this a bug? If so, where should I file it?
* is there a new way to restart Cinnamon programmatically and recover its usedup memory?
Last edited by TomRoche on Thu Apr 28, 2016 10:12 pm, edited 1 time in total.

TomRoche
Level 4
Level 4
Posts: 243
Joined: Thu Jan 13, 2011 2:52 pm

ditto for cinnamon-3.0.1

Postby TomRoche » Thu Apr 28, 2016 10:12 pm

Could I get a bump? I installed the recent Betsy updates, and now have

Code: Select all

$ date ; cinnamon --version
Thu Apr 28 18:09:21 MST 2016
Cinnamon 3.0.1


But I still have the same problem with `cinnamon --replace` that I had with cinnamon-2.8.6, and which I did not have with cinnamon-2.6.13 or before:

TomRoche wrote:In the new version, when I run `cinnamon --replace`, it does not return. Worse yet, if I either

* hit C-c in the terminal in which `cinnamon --replace` is running
* close the terminal in which `cinnamon --replace` is running

Cinnamon dies violently:

* desktop background goes black (though all previous desktop windows, icons, and panel continue to display)
* desktop windows lose their frames
* mouse moves, but won't interact with anything
* keyboard fails: no keychords have any effect other than C-A-F1 etc.

At which point my only option appears to be to goto tty1, shutdown those applications which can be shutdown cleanly from a terminal (e.g., Emacs), and reboot.


Note that I currently get the following spew when I run `cinnamon --replace` in a terminal:

Code: Select all

$ date ; cinnamon --replace
> Thu Apr 28 18:11:19 MST 2016
> Cjs-Message: JS LOG: About to start Cinnamon
> St-Message: cogl npot texture sizes SUPPORTED
> Cjs-Message: JS LOG: Cinnamon started at Thu Apr 28 2016 18:11:20 GMT-0700 (MST)
> Cjs-Message: JS WARNING: [/home/me/.local/share/cinnamon/applets/multicore-sys-monitor@ccadeptic23/DataProviders.js 390]: assignment to undeclared variable mountedDirList
> Cjs-Message: JS LOG: network applet: Cannot find connection for active (or connection cannot be read)
> Cjs-Message: JS LOG: network applet: Cannot find connection for active (or connection cannot be read)
> Window manager warning: Log level 16: Symbolic icon /usr/share/cinnamon/applets/windows-quick-list@cinnamon.org/icons/windows-quick-list-symbolic.svg is not in an icon theme directory
> openGL version 3.3 detected (GL Cogl Driver)
> Window manager warning: Log level 16: STACK_OP_REMOVE: window 0x288 not in stack
> Cjs-Message: JS LOG: Invalid network device type, is 13
> Cjs-Message: JS LOG: Invalid network device type, is 14
> Cjs-Message: JS LOG: network applet: Found connection for active
> Cjs-Message: JS LOG: network applet: Found connection for active
> Window manager warning: Log level 16: Symbolic icon /usr/share/cinnamon/applets/windows-quick-list@cinnamon.org/icons/windows-quick-list-symbolic.svg is not in an icon theme directory


after which nothing (no further messages, no return to prompt).

Note my motivation for wanting a working `cinnamon --replace` remains the same, though I have not yet used cinnamon-3.0.1 long enough to know its memory-usage behavior: Cinnamon (or some component--perhaps an applet?) seems to increase its memory consumption over time, as if it has a memory leak. Specifically:

1. When I reboot and start my Cinnamon-running laptop "fresh" I get (and have for many months) approximately the following memory usage per applet=`multicore-sys-monitor@ccadeptic23`: 11% usedup, 11% cached, 1% buffer, 77% free, 0% swap. Note that "fresh" means no running applications other than Cinnamon (i.e., the desktop), Update Manager, the HPLIP print manager (aka `HP Device Manager`), and a few applets: the above plus `user@cinnamon.org`, `network@cinnamon.org`, `sound@cinnamon.org`, `power@cinnamon.org`, `calendar@cinnamon.org`, `windows-quick-list@cinnamon.org`.

2. I periodically run my recover_memory scripts to ... recover memory. The driver formerly ran `cinnamon --replace` but can no longer due to the problem documented in this thread.

3. In the past (through cinnamon-2.6.13), I could approximate the "fresh" situation by

3.1. shutdown all other applications
3.2. run my recover_memory driver (which called `cinnamon --replace`)

after which, usedup memory would never get all-the-way down to 11%, but it would reliably (and more importantly, repeatably) get down to ~15%.

4. For at least cinnamon-2.8.6 (I just started using cinnamon-3.0.1, so dunno yet if it will reproduce the previous behavior), when I

4.1. shutdown all other applications
4.2. run my recover_memory driver (which cannot call `cinnamon --replace`)

usedup memory increases monotonically by ~5-10% per week. (I usually reboot after it hits ~40% post-recover_memory.) The only exception is ...

5. If I am "fortunate" enough to get a Cinnamon crash (which is, to the credit of the Cinnamon team, very infrequent) (and which I have yet to experience with cinnamon-3.0.1), I can subsequently

5.1. shutdown all other applications
5.2. run my recover_memory driver (which cannot call `cinnamon --replace`)

after which, "fresh" usedup memory will again get down to ~15%! So there does still seem to be (at least with cinnamon-2.8.6) some memory-usage advantage to restarting Cinnamon ... but I don't know how to script that anymore.

Hence I'd still like to know

TomRoche wrote:1. is [the failure of `cinnamon --replace`] a bug? If so, where should I file it?
2. is there a new way to restart Cinnamon programmatically and recover its usedup memory?

mikespi
Level 1
Level 1
Posts: 1
Joined: Sun Oct 08, 2017 7:05 pm

Re: `cinnamon --replace` no longer returns

Postby mikespi » Sun Oct 08, 2017 7:13 pm

I don't know if you still have the issue but, it also happens for me (on Mint 17.2 - not sure what the cinnamon version is).
I get round it by the following
nohup cinnamon --replace --display=:0 &
where the training & puts the command in background, and the leading nohup allows the command to continue running if the session disconnects.

I found that if I killed it by mistake (before the nohup etc.) it would still restart properly if I re-ran the command.

I hope this helps.

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

Re: `cinnamon --replace` no longer returns

Postby MintBean » Sun Oct 08, 2017 7:34 pm

As I understood it, dropping caches is totally pointless. It gives you a nice feeling seeing more memory available, but in reality Linux makes this memory available to applications if they request memory anyway. In other words- it achieves nothing except giving you the appearance of more memory in performance manager and prematurely stealing a bunch of cache which may be doing good stuff to speed your machine up.

http://www.linuxatemyram.com/

Dr. Octagon
Level 2
Level 2
Posts: 50
Joined: Mon Sep 16, 2013 4:43 pm
Location: Osnabrooklyn

Re: `cinnamon --replace` no longer returns

Postby Dr. Octagon » Mon Oct 09, 2017 6:27 am

Just for the record:

Despite all my contemporaneous running programs, cinnamon with effects and all the many open tabs in FF (>30 - some with heavy load) for >20 days in a row I have never reached the end of my 4 GB RAM nor noticed some lack of memory or "stuttering". I don't have a SWAP-Partition in use.

I just tested LMDE Cinnamon with a 30 fully loaded tabs Firefox (one tab runs a 4 k videostream) and I didn't get over 1,6 GB RAM consumption at all...

I wonder how and when you noticed something leads you to manage 4 GB RAM by yourself? Do you mean you run "minimum specs" 4 GB games while the use of all the other programms and FF tabs at the same time?

Conclusion:
I use this box for the simple reason that there is LMDE Cinnamon and 4 GB RAM included. ;)

By the way:
As I pointed out in another posting on this forum the only noticeable "bug" in the newer cinnamon versions which occures after some time has elapsed is that just the screensaver/lock screen isn't available anymore... but never due to the fact, that there was a lack of RAM.

Cu
Dr. Octagon
A good stumbler doesn't fall...


Return to “Software & Applications”