Installation Of Software In Ubuntu and Other Linux Operating Systems: Troubleshooting 1
“Do not trouble trouble, unless trouble troubles you, because if you trouble trouble, trouble will surely trouble you” — Proverb, Tongue Twister
Hardware Acceleration in Linux: When to Turn It Off for Better Performance:
The issue with applications or software crashing on your Linux system may stem from incompatibility or inefficiency when using hardware acceleration. Applications and software, often use GPU (graphics processing unit) acceleration to enhance performance, especially for tasks like rendering complex documents with images or videos. Over time, the software might overuse GPU resources beyond what your system can handle, leading to crashes due to either compatibility issues between graphics drivers and application/software’s hardware acceleration implementation or excessive resource usage and overheating. Turning Off ‘hardware acceleration’ feature in the application/software settings switches the process of rendering images or videos, back to CPU-based operations, which is more stable but less efficient for complex tasks.


Solutions (Quick Fix):
- If you’re experiencing crashes with LibreOffice after extended use on your Linux system, consider exploring whether disabling ‘hardware acceleration’ resolves the issue. Hardware acceleration may enhance performance but could also introduce instability if not properly supported by your graphics drivers or windowing systems. How to disable ‘hardware acceleration’? Open Libre Office > click ‘Tool’ > click ‘Options’ > click ‘View’ > uncheck the ‘Use hardware acceleration’ under ‘Graphics Output’ > Click ‘Apply’ and ‘OK’ to save the settings > close and reopen Libre Office, now it will run WITHOUT ‘hardware acceleration’.
To re-enable ‘hardware acceleration, Open Libre Office > click ‘Tool’ > click ‘Options’ > click ‘View’ > check the ‘Use hardware acceleration’ under ‘Graphics Output’ > Click ‘Apply’ and ‘OK’ to save the settings > close and reopen Libre Office, now it will run WITH ‘hardware acceleration’. - Linux offers two primary windowing systems: X11 and Wayland. While Wayland aims to provide a more modern and efficient experience, it might not fully support all applications, especially those like SimpleScreenRecorder that are heavy on graphics processing. Switching from a Wayland session to an X11 session could offer greater compatibility and stability for such demanding tasks. How to switch from ‘Wayland’ default to ‘X11’ in Ubuntu Linux OS? Logout > Now click on the wheel icon at the bottom right of the screen > click to select ‘X11 org’ > Login, now Ubuntu will run in X11 session.
To swith back to Wayland, Logout > Now click on the wheel icon at the bottom right of the screen > click to select ‘Wayland’ > Login, now Ubuntu will run in Wayland session. In general, it is better to use Wayland as it is more efficient, however incase of software/application incompatibility, one can try ‘X11 org’ session during login. - To address browser crashes related to hardware acceleration on your Linux system, consider disabling hardware acceleration individually in each browser. This can prevent crashes caused by GPU-based rendering. This approach ensures stability across all browsers until more efficient system-wide solutions are found or tested. How to disable ‘hardware acceleration’ on browser? In general, open browser > click on top right corner or top left corner to find ‘settings’ > click on ‘settings’ and search ‘hardware’ > click to ‘disable’ or un-check the ‘hardware acceleration’ > save and exit > reopen browser, now it will run WITHOUT ‘hardware acceleration’.
To re-enable ‘hardware acceleration’, open browser > click on top right corner or top left corner to find ‘settings’ > click on ‘settings’ and search ‘hardware’ > click to ‘enable’ or check the ‘hardware acceleration’ > save and exit > reopen browser, now it will run WITH ‘hardware acceleration’.
Solution (Maintenance):
- Update applications e.g. ‘sudo apt update’ and ‘sudo apt upgrade’.
- Update drivers and instead of using bigTech NVIDIA’s driver firmware, consider using open source and other alternative providers.
- Prevent overheating of computer (example in hot and humid climate consider using ice-pack below computer without blocking its fans and vents’
- Increase computer RAM (memory) and swap (memory). Increasing RAM is a hardware solution that involves physically changing the RAM of the computer, so may not be feasible for everyone. Increasing swap is a software or coding solution so is feasible for everyone. Here is the code you can run on ‘ext4’ hard-disk formatted Linux OS such as Ubuntu, LinuxMint, Kubuntu, Manjaro, OpenMandriva, NixOS, Q4OS, Debian, PureOS and others. Typing a sequence of commands in Linux OS Terminal will create 25G swap (transient memory area), change the value to create more swap such as 50G or less such as 10G. I have found that usually, 25G swap is enough for running AI models from Huggingface locally on computer, using GPT4All, JanAI, LMStudio and AnythingLLM, without using or enabling bigTech NVIDIA’s driver — using local AI models using laptop resources is less energy demanding (better for environment) and more secure/private, than using AI models online. If you get error after ‘sudo swapon –show’ and ‘sudo swapoff /swapfile’, it means there is no ‘swapfile’ in your system, so ignore it and continue with next steps. The ‘free -h’ command displays total available memory, namely ‘RAM’ (hardware) and ‘swap’ software.
Here’s the code to type on Linux OS Terminal (Konsole), for ‘ext4’ drive:
free -h
sudo swapon --show
sudo swapoff /swapfile
sudo fallocate -l 25G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
Here’s the code to type on Linux OS Terminal (Konsole), for ‘btrfs’ drive:
free -h
sudo swapon --show
sudo swapoff /swapfile
sudo btrfs filesystem mkswapfile --size 25G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
References:
Updated to latest version of Libre office and it crashes on opening | Linux Office https://ask.libreoffice.org/t/updated-to-latest-version-of-libre-office-and-it-crashes-on-opening/88047
References: Enable/Disable Hardware Acceleration in Settings | Vivaldi Browser https://forum.vivaldi.net/topic/27011/enable-disable-hardware-acceleration-in-settings