Autologout and screen locker

Suggestions and feedback for Linux Mint and the forums
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Post Reply
User avatar
dyfet
Level 1
Level 1
Posts: 9
Joined: Thu Sep 08, 2011 6:14 am
Location: Cape May
Contact:

Autologout and screen locker

Post by dyfet »

Let's face it, cinnamon is still a bit leaky. It is not the worst offender I have encountered in respect to memory leaks, but it can sometimes grow a hundred megs or so of resident ram per day with heavy use... The situation may even still vary with specific hardware, video drivers, etc...

I once experienced KDE that was even worse with specific drivers, where KDE power management grew 500 megs per day... With Gnome Shell I have had generally bad leaky experiences that are still worse than cinnamon, too...Oddly enough, I even encountered a time where in a few hours the normally humble gnome-keyring-deamon grew from it's normal 16M resident space to over 170 megs, which of course has nothing directly to do with cinnamon at all.

For laptops for me that is normally not that big an issue, I don't normally leave them on, they tend to get rebooted. But for desktops? I kept mine live 24/7, I might have multi-month uptimes without a reboot...but not so much for the desktop...

My initial solution was to create an autologout script by running cinnamon-session-quit to force a logout that also sets the DISPLAY, so I could use it from a crontab. This is not a bad solution, and each day I get a clean environment, and it is no more inconvenient really to login than to unlock from the lock screen. But finding a time of day to run it when I can be certain the machine will be idle otherwise had been tricky... autologout is to me also much preferred to a auto-reboot.

To me the more ideal solution would be to tie such functionality to the lock screen, which has a sense of when the desktop user is likely truly idle, rather than a specific time of day. If it has been locked & idle for a setable "X" hours, then have an option force a logout too. It would need to run a hook script still before forcing the logout though. I have some additional linux test vm's, so I want to make sure they are cleanly stopped before I logout, just in case a vm instance was left running. Cleanly killing firefox could also be nice to add to such a script. Being able to optionally script clean shutdown for such specific desktop applications I think would be necessary.
"Information in the computer age is the last genuine free market left on earth except those free markets where indigenous people are still surviving"
User avatar
xenopeek
Level 25
Level 25
Posts: 29506
Joined: Wed Jul 06, 2011 3:58 am

Re: Autologout and screen locker

Post by xenopeek »

For what I've seen memory leaks on Cinnamon are actually caused by applets/desklets/extensions. Not all of them are written equally well. At lot of work on Cinnamon was done over the years to remove the memory leak issues from the early days. It's hard to shed such association, just like some folks keep blaming PulseAudio for their audio problems because ten years ago PulseAudio used to be unstable.

Would restarting Cinnamon not also take care of any memory leaks in applets/desklets/extensions that you use? You can restart Cinnamon with Ctrl+Alt+Esc or by selecting that option by right-clicking on the panel, clicking on troubleshooting, and then on restart cinnamon. Restarting Cinnamon only restarts Cinnamon itself; all your open applications keep running.
Image
User avatar
dyfet
Level 1
Level 1
Posts: 9
Joined: Thu Sep 08, 2011 6:14 am
Location: Cape May
Contact:

Re: Autologout and screen locker

Post by dyfet »

In some cases, like gnome-keyring-deaemon, it is not just cinnamon that may leak. Also, I did not find a clean way to restart just cinnamon from the command line. There is some option to give it a sighup, which is supposed to behave the same as ALT-F2 "r", but is always also throws a modal dialog saying it crashed when you do it that way.

I do not want to reboot the whole machine, and I do not wish to spend what could become many hours trying to track down which extension(s) might most leak. I do not use many extensions, and actually I want to write some to fill some gaps. For example, I do not like that the places extension cannot invoke nemo with a "dav" share shortcut made in nemo though it can add the nemo shortcut to it's menu (a dav share from owncloud in this particular case) or the particular ordering it has for things. But I need to have a stable daily desktop, too...and Cinnamon actually does come really close to being that. When there are leaks I do agree it indeed can be hard determining which interaction or service might be real root cause, and maybe cinnamon does get blamed for bad extensions too...
"Information in the computer age is the last genuine free market left on earth except those free markets where indigenous people are still surviving"
User avatar
xenopeek
Level 25
Level 25
Posts: 29506
Joined: Wed Jul 06, 2011 3:58 am

Re: Autologout and screen locker

Post by xenopeek »

dyfet wrote:Also, I did not find a clean way to restart just cinnamon from the command line.
Install xdotool and then you can use this command to insert the key press to restart Cinnamon:

Code: Select all

xdotool key ctrl+alt+Escape
Image
User avatar
dyfet
Level 1
Level 1
Posts: 9
Joined: Thu Sep 08, 2011 6:14 am
Location: Cape May
Contact:

Re: Autologout and screen locker

Post by dyfet »

Hmm...yes...that does work! And of course much less potentially "destructive" than a full logout...
xenopeek wrote:
dyfet wrote:Also, I did not find a clean way to restart just cinnamon from the command line.
Install xdotool and then you can use this command to insert the key press to restart Cinnamon:

Code: Select all

xdotool key ctrl+alt+Escape
"Information in the computer age is the last genuine free market left on earth except those free markets where indigenous people are still surviving"
Post Reply

Return to “Suggestions & Feedback”