Hi! I absolutely love Lubuntu but I’ve noticed that after a bit “polkitd –no-debug” can increase quite a bit in memory. Is there a way to safely restart it and free up that memory?
Of course I can restart my computer but it is an old laptop so I prefer not to if I can avoid it.
Thank you so much for your time and I hope you have a great every day!
- Mike
PS hopefully I’m doing this correctly. It is my first time on here and it looks like the old Lubuntu forums were deleted? I can’t seem to access the pages from before when I posted a year or two ago.
I’ve just replied to the non-support question about Lubuntu’s Discourse; see link provided on your original post. I didn’t post here, as it doesn’t relate to this Support and Help area.
First thing to try would be restarting the service (no logout or reboot required):
sudo systemctl restart polkit
You mention an older laptop; what are the specifications? I am particularly interested in how much physical RAM is installed and also whether you have a swap file/partition.
Lubuntu defaults vary on what ISO & release you actually used to install your system (ie. initial install, far more significant than whatever release you’ve release-upgraded to and are using now, unless you changed defaults).
Lubuntu has provided media that defaulted to
swap partition (many years ago)
no swap (no swapfile or swap partition)
swapfile (still no swap partition)
but of course these defaults were all controlled by what options the user selected, esp. if Manual Partitioning was used at install time (ie. swap partition could be setup; you can even use swapfile + swap partition should you want that).
You’ve not said what release you’re using, nor importantly for swap defaults, what release you installed first.
A quick exploration of my system here and I can see
guiverc@d7050-next:~$ grep swap /etc/fstab
/lts/swapfile none swap sw 0 0
guiverc@d7050-next:~$ free -h
total used free shared buff/cache available
Mem: 14Gi 6.8Gi 1.6Gi 1.4Gi 8.4Gi 8.2Gi
Swap: 11Gi 0B 11Gi
The first command shows my file-system table with lines that have the word swap on it; it shows me my swapfile is located at mount point /lts/swapfile which is where I put it (another partition on this machine’s SSD as I have more space on my LTS system’s partition so both my releases store swap there).
The second command shows some RAM usage & free space; first line shows my actual RAM & second shows usage of SWAP; ie. I’m using none of my swap currently.
One thing I tend to do, on new Lubuntu installs, especially on machines that lack resources, is modify the swapsize. I wrote long ago (on Lubuntu’s discourse) about a time I needed some RAM for some hardware testing on a box so stole half the RAM from a box I used for awhile expecting I’d not notice any difference (8GB became 4GB) but boy was I wrong.. the default swapfile size was just too small for my usage. I quickly increased that swapfile’s size & then performance returned to normal, and I no longer noticed the loss of 4GB of RAM for the week+ I needed it for testing elsewhere.
On a 4GB RAM box; I normally increase default swapfile size, and if I installed my system without swap I’d be sure adding it.
Please show us the output for lsb_release -a and free -h
If possible, you should consider adding more physical RAM to that older laptop.
Fantastic that you are trying to squeeze as much life out of it as possible.
I have a HP Pavilion G6 which also came with 4GB of RAM installed. I was able to upgrade to 8GB and while that definitely made a difference, the real game-changer for me was adding and enabling zram.
For example, before zram if I had Firefox, a terminal, and one VirtualBox virtual machine open it was a strain for the poor old thing.
After adding zram, I can now have Firefox, a terminal and 4 running VMs open with barely a sign of strain on the system.
I also switched to an Arch-based distro, which may have made a difference too since a base install is fairly minimal to begin with. Not that Lubuntu is heavy, far from it.
If you are interested, I will do some research on how to do this on Lubuntu.
It does have a slot for an SD Card, maybe that’d be a good space to put a swap partition and/or zram?
As far as more physical ram, I don’t want to open it up if possible.
I’d say the biggest problem is as the load goes up the heating goes up and even when it was a “newer” computer, heating was always a problem from what I read about the model.
The first Lubuntu I installed on here I believe was 20.04 (if that sounds right). I did recently upgrade it twice to 24.04.
Here are the outputs asked for:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.4 LTS
Release: 24.04
Codename: noble
total used free shared buff/cache available
Mem: 3.6Gi 2.1Gi 653Mi 217Mi 1.5Gi 1.5Gi
Swap: 0B 0B 0B
You don’t have swap; which can cause the system to respond slowly… LIKE what I describe happened when I stole half a systems RAM to test in another family members device.. I quickly fixed that by increasing swap (or in your case you need to create some). I mentioned swap defaults varied on install media in prior post.
We’d documented how on our older discourse; and hoped to move those docs here, but it’s still not happened.. so I’ll provide a link that looked okay to me
( First step there is to turn swap off; if it was me I’d still do that step even though it’ll almost certainly make no difference on your system! You may also note the line added to the file-system table entry matches mine in my prior post (excluding my putting it on another partition for space reasons on this box; ie. /lts/ added to mine))
As for zram; @rubi1200’s already covered that; our docs for that were also found on Lubuntu’s discourse written by @arraybolt3, so I can’t provide a link.
If/When I have time, I may see if I can grab some of our old/useful docs & place them again here (increasing/swap & zram for example)
I will add that on some of my (older & resource lacking systems) I got much more improvement by having sufficient swap size than adding zram options; but results did vary I think on a number of factors (RAM size plus CPU (some older CPUs didn’t compress fast enough I gather to benefit from it such that I could detect))
Thank you both for the suggestions! Would it make sense to have both zram and swap? Hopefully with either I wouldn’t wreck any data on the partition. There is a lot of free space, about 200gb, how big should I make the swap?
The reason I like this laptop so much is that other monitors seem to bother my eyes but this one does not. Not sure why.
Thank you so much and I hope you both have a great every day!
Thank you so much, it definitely seems worth trying out! Especially if it helps with the heat problems. The computer really struggles with stuff like YouTube especially.
Also I was wondering, is there any issue with using that command you gave me for polkid for other things that might need a refresh such as “lxqt-panel” or “pcmanfm”. I’m probably pinching pennies here and what I’ve been doing is logging out before bed which seems to help.
Thank you again and I hope you have a great every day!
Does this look right? I pasted it in the top and noticed the [zram0] part at the bottom. Not sure if I just delete the one at the bottom or just move the text down to there and delete the stuff at the top or if it matters. I feel like such a noob but seems like it is worth making sure.