ZorinOS freezing when using VS Code and Firefox

Hi and welcome. I don't code, but used a search criteria of Ubuntu 22.04 as Zorin 17 is a fork of it, using Brave A.I. search engine via mojeek search engine:

" Ubuntu 22.04 Freezing

Users have reported freezing issues with Ubuntu 22.04 when using VS Code and Firefox. Here are some potential causes and solutions:

  • Memory and Swap Issues : Some users have found that increasing the swap size can help mitigate freezing. For example, adding a 4GB swap file has been effective in reducing freezes, although it might slightly impact system speed initially. You can check your current memory usage with the free -h command to see if you are running low on RAM or swap space. If you are, increasing the swap size might help.
  • Systemd-oomd Service : The systemd-oomd service is designed to kill processes when the system runs low on memory. This service might be causing applications like VS Code and Firefox to crash. You can disable this service to see if it resolves the issue. To disable it, you can follow the instructions in this link: How to disable the systemd-oom process killer in Ubuntu 22.04.
  • GPU and Driver Issues : Issues with GPU drivers, especially NVIDIA, can cause freezing. Some users have reported that disabling "Allow Flipping" in the NVIDIA settings under OpenGL settings can help. Additionally, using a different desktop environment (DE) like Xfce or KDE might alleviate the problem if it is related to GNOME or Mutter.
  • Hardware Acceleration : Disabling hardware acceleration in Firefox has been suggested as a potential fix, although it did not work for all users. You can try this by going to about:preferences#general in Firefox and unchecking "Use hardware acceleration when available."
  • CPU Frequency Governor : Some users have reported that changing the CPU frequency governor from "powersave" to "performance" or "ondemand" can improve system stability. You can change this setting by editing the GRUB configuration file (/etc/default/grub ) and adding or modifying the GRUB_CMDLINE_LINUX_DEFAULT line to include intel_pstate=disable and then running sudo update-grub and rebooting.
  • Update and Upgrade : Ensure that your system is up to date by running sudo apt update and sudo apt upgrade . Sometimes, bugs are fixed in newer versions of the software.
  • Try a Live Session : If the issue persists, you can try booting from a live USB to see if the problem is with your current installation or if it is a hardware issue. If the problem does not occur in the live session, it suggests that the issue is with your installation.

If none of these solutions work, it might be helpful to check the system logs for any error messages that could provide more insight into the cause of the freezes. You can view the logs using journalctl -b or by checking the /var/log directory."

Just to add make sure your Software Updater Software sources are coming from Main Server and not your country's server as there can be delays in latest updates coming through.