Desktop freezes when I have too many tabs open

Great, it looks about normal for about 10 or so TAB's opened.
That may have fixed the issue.
You could adjust your swap, but as you see, your using over 50% of your RAM & yet it's only needed to swap 255MiB (very little), It's wont hurt to set your swappiness to zero or 10,
If so run the following.
To edit swappiness open this file

sudo nano /etc/sysctl.conf

Then add this line to the bottom of the file,


set to your choice.0,10,15,20,etc

Then hold ctrl & click x
Then y to confirm the change, then click Enter



After reboot if you wish to check the setting of Swappiness , use the following.

cat /proc/sys/vm/swappiness


Gnome may be wasting your RAM. This topic may be helpful to you.

Thank you for such a detailed reply.

I often have a lot more than 10 tabs open I usually have about 25 - I can change the way I work if I need to but it will slow me down.
I'm going to try running that free -h command again when I have them all open again tomorrow.


Thank you but that's a bit above my understanding level! Maybe in a few years? :laughing:

I was wondering if I should go to Zorin Light.

1 Like

i'm using ms edge browser in zorin lite, it has built in function it's name is efficiency mode that help improving power usage by saving computer recourses and sleep tabs to save recources

On SSD, it gets complicated.
Swap performs faster on SSD and Swap also creates more read/write cycles on an SSD (which is harder on the SSD). You will get lots of different opinions on this question and answer.
Recent improvements in SSD design have resulted in better read/write cycles - but I could argue that does not mean throwing caution to the wind.
The short of it is - Swap should be reserved for Emergency Only.

I use a conky to monitor my RAM usage and I run this method when I need to:

Even used AutoKey to make it quick:

1 Like

I wanted to jump in here as I've had a plethora of issues but your system specs look very close to mine, the detailed instructions I do believe have solved your immediate problems regarding the open tabs within chrome. The only other additional thing I would note is that chrome, and chromium are different, if the problem persists beyond it may be helpful to try and install chromium and test with that.

For reference regarding system specs, here are mine, and I intend on making my brick work for another few years at least :stuck_out_tongue:
Screenshot from 2023-05-05 10-29-48

of note however, I am running cinnamon and not gnome due to visual glitches. Other than an overt amount of memory I can attest my machine chugs just fine.

Best of luck :slight_smile: don't forget to mark and show love for @Ocka


I must be getting old.
Four cores at 3.4 GHz with 24gigs of RAM doesn't look like a brick to me.:wink:


u can use task manger or system monitor app , or conky,
in xfce i can use conky and i can get message notify or sound notify by using that script( in xfce my ram is 5.5):


THRESHOLD=4000  # set the threshold to 4000 MB

while true
    MEM=$(free -m | awk '/Mem/ {print $3}')
    if [ "$MEM" -gt "$THRESHOLD" ]; then
        paplay /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga
        notify-send "Memory usage warning" "Memory usage is at $MEM megabytes."
    sleep 60  # check the memory usage every 60 seconds

i think that u need to install paplay for sound, and will work in gnome, but i think the line of notify is diffrent in gnome

*** edit:
i found that psensor app has that function too, no need to the script.

Another thing you can try:
Enable Memory Saver.

That'll dump any tabs from memory that sit idle for a long enough time, and reload the web page on that tab once you bring that tab to the forefront. That way, you can have as many tabs open as you like, and you won't exhaust your free memory.

As to swap size, give us the output of the command:
swapon --show
... as you're using your browser normally. If you've got a high number under "Used", you likely need to increase the size of the swap (which is most easily done by plugging in another USB memory stick, formatting it as swap, then setting it up to auto-mount in your fstab file... all of which we can help you with if you're exhausting your memory and swap space).

And you can try nohang:
sudo apt search nohang

nohang/focal,focal,now 0.2.0-1~oibaf~f all [installed]
  sophisticated low memory handler for Linux
sudo add-apt-repository ppa:oibaf/test
sudo apt update
sudo apt install nohang
sudo systemctl enable --now nohang-desktop.service
1 Like

My first computer was an Apple 2E. I stopped using commands as soon as I could though and now need to relearn and learn more after years of GUI only.

1 Like

Wow, thank you all for your generosity! This has been so helpful!

Thank you very much @Ocka. That seemed to have fixed the issue and it was so quick and couldn't have been easier! :heart: :heart: :heart: :smile:

Thanks @eid - Quickbooks doesn't work well with a lot of browsers so I'm going to try and fix it other ways before I try a new browser. I looked at both conky and psensor and found an easy tutorial for installing and configuring psensor so I went that way. It was easy!

Thanks @geekdad - I think 24 gb of ram would be lovely! I suppose even bricks move fast if you drop them? Good luck keeping it going.

Thanks @Aravisian for your great info, as always! Now that I have got psensor going, I'm going to try your freeing up RAM and Autokey tutorials when I have some time later.

And thanks @Mr_Magoo - I love easy suggestions (enable memory saver in chrome), but sadly it was already enabled while it was freezing.

Nohang sounds useful but I'm a bit scared off by this under warnings on Github:
"the daemon runs with super-user privileges and has full access to all private memory of all processes and sensitive user data". I'm a bookkeeper so have access to a lot of sensitive data and security is a primary concern for me.



Ocka's fix to disable hardware acceleration is still working for me. I switch it on for video meetings and then off when I have to run a lot of Quickbooks reports. Now that I have Psensor, I can see that I still hit 98% CPU usage fairly frequently. It doesn't make my computer crash though - just pretty slow.

I'm wondering if that's normal or if something might be wrong?

I mostly work in chrome but I usually have Authy, Slack, and Linphone open (desktop programs). I often have one or two pdfs or images open in the normal zorin viewers. I sometimes use Skedpal and Pixie (installed chrome apps), GIMP and Libre Office but I try to only open one of these at a time and I don't use them heavily.

Thank you for any thoughts,


One thing you could try is zswap... it uses a portion of your memory as compressed swap space.

"But that'd reduce the amount of memory my applications have to use!", you may say.

Well, not so fast... zswap is compressed. So when you're low on memory, it'll swap (to memory) and compress it (generally at ~2x to ~3.6x), so you'll have more free memory and you can still access the applications at the speed of memory.

If zswap fills up, it then swaps to the hard drive just as conventional swap does (this is especially good for reducing wear on SSDs due to swapping).

So your machine with 8 GB of RAM, let's assume you use half of that for zswap. It compresses that 4 GB, and let's say it compresses at 2x... so you've now got the equivalent of 12 GB of RAM (4 GB * 2 + 4 GB). If it compresses at 3x, you've got the equivalent of 16 GB of RAM (4 GB * 3 + 4 GB).

Of course, if you're running the ZFS filesystem, you don't need zswap... the ARC is already compressed and in-memory.

Gday @Grace ,
Having the Psensor in sight can make you worry more :open_mouth: (out of sight=out of mind :slight_smile: )
This is normal when app's are started/stopped, You will see more CPU usage.
It may help to set your Swappiness to Zero.
I would also run the following to maybe clear/clean bad files/etc.

sudo apt update

then post the out put on here please.

I believe you may need to also run this but wait until we look at the output of the above command

sudo apt autoremove --purge

sunlight@sunlight-HP-EliteDesk:~$ sudo apt update
[sudo] password for sunlight:            
Hit:1 stable InRelease
Hit:2 focal InRelease                      
Hit:3 focal-updates InRelease              
Hit:4 focal-backports InRelease            
Hit:5 focal InRelease                      
Hit:6 focal-security InRelease               
Hit:7 focal InRelease             
Hit:8 focal InRelease                      
Hit:10 focal InRelease                    
Hit:11 focal InRelease                       
Hit:12 focal InRelease
Hit:13 focal InRelease                    
Hit:9 jessie InRelease  
Hit:14 focal InRelease         
Hit:15 focal InRelease
Reading package lists... Done                        
Building dependency tree       
Reading state information... Done
All packages are up to date.
1 Like

Hi Ocka and Mr Magoo,

Thanks very much for your help. I posted that question late at night (for me anyway) and I completely forgot that I had posted it. I jumped on this morning to ask the question and there you were already answering me! :laughing:

The blue text above changed after I posted it. Here is a screenshot.

Having the Psensor in sight can make you worry more :open_mouth: (out of sight=out of mind :slight_smile: )
This is normal when app's are started/stopped, You will see more CPU usage.

That makes sense! It's exactly what I'm doing!

1 Like

Discourse is fun that way. I adjusted the above post to no-parse the bits that got truncated.
You can use the </> button on the post toolbar to achieve this in future.

1 Like

Thank you :smile:

Gday @Grace ,9.40 am here ( yes im up late :open_mouth: )

All looks good. can you know run
this again; as i just received updates.

sudo apt update && sudo apt upgrade

Paste as is, it will update & then upgrade.


sudo apt clean

sudo apt autoremove --purge


Then could you load up some of the app/browser TAB's/etc. then run the below command please.

ps -e | wc -l

This will show how many processes your running.
Just lets us know how many please.

If you wish to see/monitor thing's. Use the already installed " System Monitor"

1 Like