Policykit

PolicyKit high memory usage in Linux Mint 17.x – don’t blame it just yet!

Is it RAM and swap usage getting out of control in your Linux Mint box? The buggy-man may actually be policykit NOT, draining your system resources up until no more is available, leaving it unstable or even crashing it all together. Yup, another suspected Ubuntu 14.04 LTS bug that happened not to be Ubuntu’s fault after all…

If you’re a Linux user you expect to move around your system fairly quick when getting work done. Clicking and sitting there just waiting for a window to popup is not precisely what one is used to even in ancient hardware; c’mon it is Linux! – and your ego rises up :)

Anyways, this morning my system wasn’t responding the way it uses to, so I fired System Monitor and noticed an uncommonly high memory and swap usage for an ‘idle’ system. Open up Terminal, run ‘htop’ and bingo!… policykit process was using up a lot of RAM and swap, over 3GB to be precise!

The catch; if you shutdown or reboot your system daily you may not get to see policykit getting out of control after all, but if you run your system for as long as there is power available in the wire or just for a couple days you’ll most likely experience this issue… or so I thought.

It turns out that one of the applet I use (thanks to Are42 for sharing his find) seems to be the real source of the problem; Multi-Core System Monitor that is.

multi-core-system-monitor

The solution is to simply deactivate  Multi-Core System Monitor applet if you don’t need the fancy resources monitoring in your panel.

But hey, what if you still want that applet enabled as I do? Well, since this applet has not been updated for a while and it doesn’t seem it will get some love any time soon,  a work around may be necessary to keep RAM and swap usage under control. In my case, I created a daily cron to kill policiykit so it restarts daily, forcing RAM usage to stay under control… not the nicest thing but it gets the work done. In Terminal:

sudo sh -c 'echo "#!/bin/bash \n /usr/bin/killall /usr/lib/policykit-1/polkitd" > /etc/cron.daily/kill-polkitd'
 
sudo chmod +x /etc/cron.daily/kill-polkitd
sudo /etc/cron.daily/kill-polkitd
This work around was also mentioned by bmaupin in launchpad.

Indeed, it was never a policykit issue after all. Cheers!

Related Post

Bypass pkexec password prompt for admin accounts So, you want to bypass polkit password prompt in Linux Lite globally. There is a million and some reasons in terms of security why you should think tw...
More ♥ for Software Sources and Update Manager in ... Software Sources and Update Manager in Linux Mint 17.3 Rosa get some extra love! I mentioned before that users didn't use other Linux Mint mirrors mai...
Samba Share for Beginners – Video I noticed I have never posted a video in my blog. So, here is one that may help you setup Samba if you're new to Samba Shares. How to create Samba ...

Leave a Reply