Back to the home page
Speeding up your Linux Mint is fun! That way, you'll get more performance out of your computer for free.
There are several tweaks to make Linux Mint 22 run faster. Some are quite safe, some are risky. Here you'll find only safe ones.
I don't like risky tweaks, because I think that stability and reliability are much more important than a (often minor) performance boost. That's why I've collected a couple of speed tips, that you can apply safely and that'll probably make your Mint run considerably faster. Without diminishing the stability and reliability of your system.
Note (1): Even though in general you can apply those tips safely, nothing in life is really for free.... You always pay some "price". You disable a particular system service, a couple of nice visual effects or some feature.
Each tweak therefore has its own "price tag". So you should consider before you apply a tip, whether you're willing to pay the "price" for it.
Note (2): These tips are useful for all editions of Linux Mint: Cinnamon, MATE and Xfce. But they're especially effective in combination with the Xfce edition, because that particular lightweight edition is recommended for slow older computers that are in dire need of a speed boost.
OK, now that that's out of the way, let's get started:
Contents of this page:
- 1. Improve usage of the system memory (RAM)
- 2. Make your Solid State Drive (SSD) run faster
- 3. Disable Java in Libre Office
- 4. Turn off some startup applications
- 5. Cinnamon, MATE and Xfce: turn off all visual effects and/or compositing
- 6. Add-ons and extensions: don't turn your web browser into a Christmas tree
- 7. Make Firefox write less to the hard disk
- 8. Firefox: optimize the Places database from time to time
- 9. Lots of RAM (at least 16 GB): put /tmp on tmpfs
- 10. Speed up your wireless internet by disabling the WiFi power management
- 11. Improve writing to external media
- 12. Speed up your Intel wireless chipset
- 13. Remove the search database
- 14. Turn off the firewall log
- 15. Tame the thumbnail feature
- 16. Blacklisting the drivers for Bluetooth, the built-in webcam and the ethernet chipset
- 17. Temporary relief: force Firefox to minimize its memory usage
- 18. An option with a price: set your CPU to Performance mode
- 19. Clean up your Mint
- 20. Want more tips?
Improve usage of the system memory (RAM)
1. You can improve the usage of the system memory with the following tweaks:The absolute number one: turn on zswap
1.1. You'll often achieve a considerable speed gain by turning on zswap. This is especially so on older machines, but on modern machines there will also be a speed gain, even though it'll be smaller. It's therefore advisable to turn it on in all cases. Below, I'll explain how to do that.A. First some background information:
Swapping is one of the biggest threats to performance. This hasn't changed over the years and will stay that way, as long as RAM will continue to be faster than permanent storage devices. That's why zswap exists: to mitigate this undesirable effect of swapping, by a reduction of I/O activity.
The kernel feature called zswap provides a compressed RAM cache for swap pages. Pages which would otherwise be swapped out to disk, are instead compressed and stored into a memory pool in RAM.
Once the pool is full or the RAM is exhausted, the least recently used page is decompressed and written to the swap file or partition on the hard disk, as if it had not been intercepted at all. After that page has been dumped into the swap file or partition, the compressed version in the pool will be freed.
By default, zswap is switched off. When switched on, it uses up to 20 percent of the RAM memory by default (don't increase that above 40, because higher percentages might not leave enough RAM for general use).
The price you pay for turning on zswap, is twofold:
- Your processor (CPU) is being taxed more heavily, because it'll have to compress and decompress more. With a single-core CPU of low speed there might be a noticeable performance hit, as compressing/decompressing data requires a faster CPU, preferably a multi-core one.
- When the system has filled the RAM swap, it'll start swapping on the hard drive as well. With a burden on the available RAM: the chunk of memory that has been sacrificed for the RAM swap.
That's why I advise to turn on zswap only in combination with a swappiness that has been reduced to 30 (see item 1.2 on this page).
B. Now the how-to:
You can switch on zswap as follows (with superior fast threefold compression, by means of lz4 and z3fold):
a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste the following command line into the terminal:
xed admin:///etc/default/grub
Press Enter. Type your password when prompted.
(the three consecutive slashes are intended and no typo!)
c. In the text file that has now been opened, find the following line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Now you're going to add some parameters to that line. This is the easiest way: simply replace the entire line by the following blue line (this is one long line, don't chop it up and use copy/paste to transfer it):
Machines with only 4 GB RAM or less (40 % zswap):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.max_pool_percent=40 zswap.zpool=z3fold zswap.compressor=lz4"
(if you want to type this line yourself: note that the "l" in "lz4" is a lowercase letter L)
Save the modified file and close it.
Machines with more than 4 GB RAM (default 20 % zswap):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=lz4"
(if you want to type this line yourself: note that the "l" in "lz4" is a lowercase letter L)
Save the modified file and close it.
d. Copy/paste the following command line into the terminal, in order to execute the modification:
sudo update-grub
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
(if you type the command: note the dash between update and grub)
e. The module for the z3fold feature isn't included in the initramfs at boot time, so it won't be loaded automatically. As z3fold (threefold compression) is simply better than the default zbud (twofold compression), change that like this:
Copy/paste the following command line into the terminal:
xed admin:///etc/initramfs-tools/modules
Press Enter.
f. At the bottom of the existing text in the file that has been opened, create a new line with z3fold in it, so that it becomes:
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
z3fold
Save the changes and close the text editor.
g. Then in the terminal (use copy/paste to transfer the command to the terminal!):
sudo update-initramfs -u
Press Enter.
h. Reboot.
i. Now you can check whether the change has been implemented with this command (use copy/paste):
dmesg | grep zswap
It should report in its final line: zswap: loaded using pool lz4/z3fold.
j. The percentage of your RAM that zswap uses, can be checked with the following command:
cat /sys/module/zswap/parameters/max_pool_percent
It should report 20, which is the default, or 40. As said already: don't increase that above 40, because higher percentages might have negative consequences.
Warning: there's also RAM swap feature called zRam. Don't install that, because it's counterproductive in combination with zswap!
Both zswap and zRam provide a compressed cache and would, when used simultaneously, wind up using more system memory than each individually. Simultaneous use makes therefore no sense.
When zswap is enabled: decrease swap use
1.2. On the hard disk there's a separate file or partition for virtual memory, called the swap. When Mint uses the swap too much, the computer slows down. At least when zswap has been turned on (see item 1.1 on this page).Note: Don't fully disable the disk swap, no matter how much RAM your computer has! Not only because zswap needs it, but also because disabling the disk swap is a bad idea in general: it's counterproductive to do so and might degrade the performance of your system.
Mint's inclination to use the swap, is determined by a value called "swappiness". The lower the value, the longer it takes before Mint starts using the swap.
On a scale of 0-200, the default value is 60. Which is too high for normal desktop use; the optimal compromise is probably something like 30. Decreasing the default value somewhat on a desktop computer, has no negative side effects.
Now the how-to for setting the swappiness to a more reasonable level, namely 30:
a. First check your current swappiness value. Type in the terminal (use copy/paste):
cat /proc/sys/vm/swappiness
Press Enter.
The result will probably be 60.
b. To change the swappiness into a more sensible setting, type in the terminal (use copy/paste to avoid typos):
xed admin:///etc/sysctl.conf
Press Enter. Type your password when prompted.
Now a text file opens. Scroll to the bottom of that text file and add your swappiness parameter to override the default. For that, copy/paste the following two blue lines into the text file:
# Decrease swap usage to a more reasonable level
vm.swappiness=30
c. Save and close the text file. Then reboot your computer.
d. After the reboot, check the new swappiness setting:
- Launch a terminal window.
(You can launch a terminal window like this: *Click*)
- Type (use copy/paste):
cat /proc/sys/vm/swappiness
Press Enter.
Now it should be 30.
Note: If your hard disk is an SSD, there's an extra reason to decrease swappiness. That's because too many write actions, like frequent swapping, reduce the lifespan of an SSD. Also check these tips for optimizing an SSD for your Linux.
Make your Solid State Drive (SSD) run faster
2. Do you have an SSD for hard drive? Then optimize it to make it faster.Disable Java in Libre Office
3. The performance of Libre Office might be enhanced greatly, when you disable Java in it. This will disable a few features, but usually you won't even miss those.Toolbar Libre Office Writer - Tools - Options...
LibreOffice - Advanced - Java Options:
remove the tick for: Use a Java runtime environment
Turn off some startup applications
4. You can speed up Mint somewhat, by disabling a couple of system services that may be superfluous for you. These are called startup applications, because they're being launched at startup. This tweak can be compared to tweaking msconfig in Windows. Proceed with care!Cinnamon and MATE: Menu button - Preferences - Startup Applications
Xfce: type session in the search box of the menu and select:
Session and Startup
Disable a few services that you're absolutely sure you don't need and reboot your computer (or log out and then log in again).
Warning: when in the slightest doubt about a particular application: don't do anything, just leave it the way it is!
Note: Only disable them, do not remove the application from the list! Keep the tweak easily reversible (you never know). I repeat: when in any doubt about a particular application: don't do anything, just leave it enabled.
I advise to disable these two services in any case:
- System Reports (it taxes the system heavily from time to time, and it's normally not very useful after the first system check after installation)
- mintwelcome (if needed, you can always launch it from the menu)
Two system services that many people don't need:
- Support for NVIDIA Prime (if you don't have an NVIDIA video card)
- Warpinator (if you have no local network)
Note: Disabling startup applications is a user preference, so repeat this in each user account.
Cinnamon, MATE and Xfce: turn off all visual effects and/or compositing
5. Visual effects are nice, but they can slow down your system and even cause stability problems. That's why Cinnamon, MATE and Xfce have only a few visual effects enabled by default.You can gain some speed and stability when you turn off all of them. Even more speed gain can be achieved by selecting a lighter compositor or by disabling compositing entirely.
Proceed as follows:
Cinnamon: take some load off your graphics card
5.1. Disabling the "heavy" visual effects and/or compositing in Cinnamon, consists out of three steps:a. First of all, do this:
Menu button - Preferences - Effects
Turn off everything there.
b. Now this:
Menu button - Preferences - Window Tiling
Enable Window Tiling and Snapping: switch it off.
c. Finally, you might disable compositing. Disabling compositing often causes screen tearing when scrolling through a web page or when watching videos. So there's a pretty stiff price attached to this.... Therefore I don't generally recommend to disable compositing!
But if you want to disable compositing anyway, this is how to do it:
Menu button - Preferences - System Settings
Section Preferences: General
Disable compositing for full-screen windows: switch it on.
Technical sidenote for advanced users: whereas MATE and Xfce offer the option to switch the window manager, Cinnamon doesn't: it's tied to its default window manager Muffin.
MATE: take some load off your graphics card
5.2. Disabling the "heavy" visual effects and/or compositing in MATE is easy:a. Menu button - Preferences - Desktop Settings
Click Windows - section Window Manager: change Marco + Compositing into one of the following two options:
- Marco + Compton (recommended). This will cause some speed gain because of the simpler and more lightweight compositor Compton.
- Marco (discouraged). This causes maximal speed gain by disabling all compositing, but it also often causes screen tearing when scrolling through a web page or when watching videos. So there's a pretty stiff price attached to disabling compositing.... Therefore I don't generally recommend that.
Note: Marco + Compton provides the most simple and therefore lightweight compositor; window manager Metacity and its variations are just a low-performance stopgap for maximum hardware compatibility.
b. Menu button - Preferences - Windows
In that tool, do the following two things:
I. Tab Placement: deselect: Enable window tiling
II. Only if you've changed your window manager into plain Marco without any compositor (which I discourage!), do this as well:
Tab General: deselect: Enable software compositing window manager
c. Remove the unstable and unreliable Compiz, that you never need in any case:
- Launch a terminal window.
(You can launch a terminal window like this: *Click*)
- Type (use copy/paste to prevent errors):
sudo apt-get remove compiz-core
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Xfce: take some load off your graphics card
5.3. Even lightweight champion Xfce has relatively "heavy" compositing by default. Reduce its weight like this:a. Menu button - Settings - Desktop Settings
Window Manager: change Xfwm4 + Compositing into one of the following two options:
- Xfwm4 + Compton (recommended). This will cause some speed gain because of the simpler and more lightweight compositor Compton.
- Xfwm4 (discouraged). This causes maximal speed gain by disabling all compositing, but it also often causes screen tearing, when scrolling through a web page or when watching videos. So there's a pretty stiff price attached to disabling compositing.... Therefore I don't generally recommend it.
Note: Marco + Compton provides the most simple and therefore lightweight compositor; window manager Metacity and its variations are just a low-performance stopgap for maximum hardware compatibility.
b. Remove the unstable and unreliable Compiz, that you never need in any case:
- Launch a terminal window.
(You can launch a terminal window like this: *Click*)
- Type (use copy/paste to prevent errors):
sudo apt-get remove compiz-core
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Add-ons and extensions: don't turn your web browser into a Christmas tree
6. You can install a lot of add-ons (extensions) in the web browsers Firefox and Google Chrome. Those add-ons can be very useful, but they have a couple of important disadvantages, because they are "applications within an application":- they slow your browser down, especially if there are a lot of them;
- they can cause malfunctions, both in each other and in the browser itself;
- it has occurred: add-ons with malicious content. Don't trust them blindly.
So don't turn your browser into a Christmas tree: don't adorn it with lots of add-ons. Limit yourself to only a few add-ons, that are really important for you.
Note: Watch out for add-ons that claim that they make your browser faster! Often they do more harm than good. Do not install them: even if one or two of them can really make your browser run noticeably faster, they may damage the stability of your browser.
Limiting the disk write actions of Firefox
7. By default, Firefox writes a lot to the hard disk. This reduces its speed. You can limit the disk write actions of Firefox, by disabling sessionstore and by putting the Firefox network cache into the RAM. Like this:Disabling sessionstore
7.1. Firefox has a session restore feature, which remembers what pages were opened if Firefox experiences an unexpected shutdown (read: crashes). This feature is neat, but causes too many disk writes. Disable it like this:a. Type in the URL bar of Firefox:
about:config
Press Enter.
b. Now you're being presented with a warning. Ignore it and click on the button "Accept the Risk and Continue".
c. Copy/paste the following term into the filter bar (search bar):
browser.sessionstore.interval
d. Double-click on that item. The default interval is 15000, which means 15 seconds. Add four zeros to the existing value, so that it becomes: 150000000 and click the Save button.
Note: Don't try to add too many zeros: that won't work. Adding four zeros is more than enough anyway.
e. Close Firefox and launch it again. Now you've practically disabled the session restore feature.
Note (1): Leave other cache and sessionstore settings as they are: usually, the less invasive a hack is, the better. Because this reduces the risk of unexpected unwanted side effects.
Note (2): This is a user preference. Repeat this hack in each user account.
Putting the Firefox network cache into the RAM
7.2. By moving the Firefox network cache from your hard disk to the RAM, you diminish the amount of disk writes. This'll probably make your Firefox noticeably faster. The price you pay is small: it'll only "cost" you 512 MB of your RAM.Note: Don't do this when your computer has only 4 GB of RAM or less! Because with little RAM, even 512 MB can't be missed.
Proceed like this:
a. Type in the URL bar of Firefox:
about:config
Press Enter.
b. Now you're being presented with a warning. Ignore it and click on the button "Accept the Risk and Continue".
c. Copy/paste the following into the filter bar (search bar):
browser.cache.disk.enable
Toggle its value to false by double-clicking it: this will disable "cache to disk" entirely.
d. Then you're going to determine how much memory can be used as RAM cache. Copy/paste this into the filter bar (search bar):
browser.cache.memory.capacity
That entry should exist already (if not, create it now).
The current integer value will probably be -1, which automates the maximum size of the RAM cache dependent on the available amount of RAM. So far so good, but this automation usually creates a cache that's far too small....
So set it to 524288 (KB, which equals a maximum of 512 MB) and click the Save button. That's usually enough for all amounts of RAM. But if you have RAM to spare, I recommend 1048576, which equals a maximum of 1 GB.
e. Close Firefox and launch it again. You're done! Check it like this:
Type in the URL bar:
about:cache
Press Enter.
By the way: you might then also see a mention of an "appcache" which might still be present on the disk, but there's no need to move that (much less frequently used) cache to the RAM as well.
Note: This is a user preference. Repeat this hack in each user account.
Firefox: optimize the Places database from time to time
8. In your Firefox profile there's an sqlite database called Places, which after a while starts resembling a swollen Swiss cheese with holes. That might slow your Firefox down.You can speed your Firefox up a bit, by optimizing (vacuuming) that database: you can namely deflate that swollen Swiss cheese into a compact smaller cheese. As follows:
Type the following in the URL bar of Firefox:
about:support
Press Enter.
Almost at the bottom of the page you get to see then, there's a header called Places Database. Click there on the button called Verify Integrity.
You're done! Repeat this on a monthly basis, so that your Firefox won't lose speed again because of a swollen database.
Lots of RAM (at least 16 GB): put /tmp on tmpfs
9. Does your system have lots of RAM memory? If it has at least 16 GB, then you can probably speed up your system a bit by placing /tmp on a tmpfs partition. Which means, translated into ordinary language: you bring about that temporary files will not be placed on the hard disk anymore, but on a virtual RAM disk instead.In certain cases this will not only increase overall performance, but also reduce boot time.
Note: In general, do not apply this on systems with less RAM than 16 GB! Because then this tweak might not make them faster, but (much) slower.
This is how to create a tmpfs partition:
a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste this blue line into the terminal (it's one line!):
sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
c. Then copy/paste this command into the terminal:
sudo systemctl enable tmp.mount
Press Enter.
d. Reboot your computer.
e. After the reboot: check whether it works, with this terminal command:
systemctl status tmp.mount
By default, a tmpfs partition has its maximum size set to half your total RAM. The actual memory consumption depends on how much you fill it up, as a tmpfs partition doesn't consume any memory until it is actually needed.
It may be useful to set a lower hard cap on its size, for example 2 GB, in order to make sure that you'll always have enough RAM for general use. For doing that, see the next item (9.1).
Changing the default maximum size of tmpfs
9.1. As said: by default, a tmpfs partition has its maximum size set to half your total RAM. The actual memory consumption depends on how much you fill it up, as a tmpfs partition doesn't consume any memory until it is actually needed.If you wish to set another maximum size for tmpfs than the default, you can do that by changing the size option defined in /etc/systemd/system/tmp.mount. For example, if you wish to set the maximum size to 2 Gigabyte, copy/paste this line into the terminal:
sudo sed -i 's/size=50%%/size=2G/' /etc/systemd/system/tmp.mount
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Afterwards, reboot your computer.
After the reboot you can check whether the modification has succeeded, by executing this command:
df -h /tmp
How to undo tmpfs
9.2. Do you wish to undo tmpfs? Then copy/paste this line into the terminal:sudo rm -v /etc/systemd/system/tmp.mount
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Afterwards, reboot your computer.
Speed up your wireless internet by disabling the WiFi power management
10. For some wireless chipsets, a simple tweak is sufficient for increasing the speed and the connection quality of your wireless internet. Namely disabling the power management for the wireless chipset (and only for that chipset; don't worry).The price you pay is obviously an increase in power consumption, although this increase isn't big.
There are two ways to do it: an easy method and a harder method. Below I describe both ways, because even the harder method has its use: it shows more clearly what you're doing than the "magical terminal incantation" of the easy method.
The easiest way: speeding up your WiFi by executing a single command
10.1. The easiest way to speed up your wireless internet connection by disabling power management for the WiFi chipset (for that chipset alone, not systemwide), is this:a. First you need to find out whether Mint applies power management to your WiFi chipset. For this, launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Type in the terminal:
iwconfig
Press Enter.
You can then not only see the name for your wireless chipset (for example: wlp2s0), but also whether Power Management is on for it. When it's off, or when no mention is made of Power Management at all, you don't need to do anything.
When Power Management is on, proceed as follows:
c. Use copy/paste for transferring the following line into the terminal (don't try to type it!):
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
d. Reboot your computer.
e. Then check in the terminal, by the command iwconfig, whether Power Management for the wireless chipset is off now.
If so, you're done!
The harder way: speeding up your WiFi by editing a file manually
10.2. You can also edit a configuration file by hand, in order to disable power management for the Wifi chipset. It's a bit more difficult than the method described in item 10.1, but you can do it as follows:a. First you need to find out whether Mint applies power management to your wireless chipset. For this, launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Type in the terminal:
iwconfig
Press Enter.
You can then not only see the name for your wireless chipset (for example: wlp2s0), but also whether Power Management is on for it. When it's off, or when no mention is made of Power Management at all, you don't need to do anything.
c. When Power Management is on, proceed as follows.
In order to prevent typos, copy/paste this line into the terminal (it's one line!):
xed admin:///etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Press Enter.
d. Now a text file opens. In that text file, you see the following content:
[connection]
wifi.powersave = 3
Change 3 into 2.
Save the modified file and close it.
e. Reboot your computer.
f. Then check in the terminal, by the command iwconfig, whether Power Management for the wireless chipset is off now.
If so, you're done!
Improve writing to external media
11. On some machines, writing to external media like USB memory sticks or external hard disks, is erratic. It proceeds in fits and starts: a blazingly fast start, followed by a sharp drop to a slow and faltering speed. Furthermore, the process is unintuitive (it's unclear when the operation is complete).This undesirable behaviour can be improved by shrinking the write buffers in the RAM (memory), which is especially useful on machines with a lot of RAM. Thus you force the system to start writing earlier from the RAM to the external medium, and with shorter intervals.
This smoothes the process considerably, although writing speed will still drop after the fast start. That's inevitable.
You shouldn't reduce those write buffers too much though, because otherwise writing to internal media might be negatively affected. Such things are always a compromise.... But there's a compromise available that's better suited to modern computers with a lot of memory.
Proceed like this:
a. First you're going to check the current sizes of the write buffers. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Use copy/paste to transfer this command line into the terminal:
cat /proc/sys/vm/dirty_ratio
Press Enter. The output will probably be 20, which means that this buffer has a maximum of 20 % of your RAM.
c. Then execute this command (again, use copy/paste to transfer it into the terminal!):
cat /proc/sys/vm/dirty_background_ratio
Press Enter. The output will probably be 10, which means that this buffer has a maximum of 10 % of your RAM.
d. Now let's proceed to replace those two ratios by fixed sizes, namely respectively 320 MB and 160 MB. In order to prevent typos, copy/paste this line into the terminal:
xed admin:///etc/sysctl.conf
(the three consecutive slashes are intended and no typo!)
Press Enter. Type your password when prompted.
e. Now a text file opens. In that text file, copy/paste the following blue text block to the bottom of the existing text:
# Improve writing to external media like USB memory sticks
vm.dirty_bytes=335544320
vm.dirty_background_bytes=167772160
Save the modified file and close it.
f. Reboot your computer. Then test whether this hack has worked. First with the commands used at steps b and c: both commands should return a 0 now.
These two commands should return the amount of bytes that are currently set:
cat /proc/sys/vm/dirty_bytes
cat /proc/sys/vm/dirty_background_bytes
Speed up your Intel wireless chipset
12. If you have a (reasonably) modern wireless chipset from Intel, it'll run on the iwlwifi driver. If so, you might be able to increase its speed noticeably, by turning on Tx AMPDU for it.The purpose of AMPDU is to improve data transmission by aggregating or grouping together several sets of data. Thus it sharply reduces the amount of transmission overhead.
It used to be "on" by default in the iwlwifi driver. But several years ago, it was turned off because of stability issues on a few wifi chipsets. This problem affects, however, only a minority of chipsets...
For turning it on, proceed like this:
a. First check whether your chipset runs on the iwlwifi driver:
Launch a terminal window.
(You can launch a terminal window like this: *Click*)
Use copy/paste to transfer this line into the terminal:
lsmod | grep iwlwifi
Press Enter.
Does the terminal output contain the word iwlwifi (in red letters)? If so, proceed with the next step.
b. Use copy/paste to transfer the following blue line (it's one line!) to the terminal. Don't type it; it's too easy to make typing errors:
echo "options iwlwifi 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi-speed.conf
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Don't be confused by the name of the option: when it's set to 8, you don't actually disable anything but you enable something.
c. Reboot your computer.
d. Finally, check your new wireless speed, for example on speedtest.net.
Has your wifi become unstable? Then undo the iwlwifi hack as described below.
Problems? Then undo it like this
12.1. Does the iwlwifi hack create stability issues for your wifi? Then undo it with the following terminal command:sudo rm -v /etc/modprobe.d/iwlwifi-speed.conf
Then reboot. All should be then, as it was before.
Remove the search database
13. Especially on low-powered machines, mlocate (which periodically creates a system-wide file search database) can tax the system resources too heavily. It's not installed by default, but you might have done that yourself at some point, possibly as a side effect of installing something else.That file search database isn't very useful anyway, so you'll probably benefit from removing mlocate (or locate, if that's installed instead of mlocate).
For that, proceed as follows:
a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste this blue line into the terminal:
sudo apt-get purge mlocate locate
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Problems? Then undo it like this
12.1. Does removing mlocate cause any problems for you? Then re-install it with the following terminal command:sudo apt-get install mlocate
All should be then, as it was before.
Turn off the firewall log
13. Have you enabled the firewall ufw (which is recommended)? Then you'll probably never look at its logs, so it won't hurt to turn off all logging by the firewall. Especially because it can be rather spammy sometimes. Turning off its log can save some system resources and disk space, and can be done like this:a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste this blue line into the terminal:
sudo ufw logging off
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Regrets? Then turn firewall logging on again like this
14.1. Do you want to enable logging by the firewall again? Then use the following terminal command to turn firewall logging on again, with the default amount of activity (low), because otherwise it'll start spamming like crazy:sudo ufw logging low
All should be then, as it was before.
Tame the thumbnail feature
15. For each displayed local picture, Mint automatically creates a thumbnail, for easy browsing in the file manager. This might impact performance, when you're dealing with a lot of pictures.... Furthermore, it's a "usual suspect" for memory leaks. This is how to tame this feature a bit:a. In Mint Cinnamon's file manager, Nemo, you can reduce the activity of the thumbnailer service as follows:
Launch your file manager (Nemo) - panel: Edit - Preferences
Tab Preview - section Previewable files - Only for files smaller than: change that to 5 MB.
Note: On very old and slow machines it's better to disable thumbnailing entirely in that dialogue window, by setting Show thumbnails: to No (instead of the default setting, which is Local Files Only)
Close Nemo.
b. You can also install a small stand-alone file manager called SpaceFM, which behaves itself a bit better with thumbnails than Cinnamon's Nemo or MATE's Caja. For that, proceed like this:
In the terminal:
sudo apt-get install spacefm
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
Launch SpaceFM, open a folder with images in it, and then in its panel: View - Preferences - tab General: select Show Thumbnails
Blacklisting the drivers for Bluetooth, the webcam and the ethernet chipset
16. This tip should give you a small speed increase, because fewer active drivers (kernel modules) mean less system load. More importantly, applying this tip will also noticeably increase laptop battery duration.Proceed like this:
Blacklisting Bluetooth
16.1. First the Bluetooth driver. If you rarely use Bluetooth, you can probably increase the battery duration of your laptop noticeably, by disabling the Bluetooth driver (instead of simply disabling the Bluetooth feature). Like this:a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste this blue line into the terminal (it's one line!):
echo "blacklist btusb" | sudo tee /etc/modprobe.d/blacklist-bluetooth.conf
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
c. Reboot your computer. Bluetooth should no longer be available.
d. Is Bluetooth still available? Then your Bluetooth is probably running on another driver than btusb, namely hci_uart, which is for Bluetooth with a serial port interface. In that case, copy/paste this line into the terminal (it's one line!):
echo "blacklist hci_uart" | sudo tee /etc/modprobe.d/blacklist-bluetooth.conf
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
e. Reboot your computer. Bluetooth should finally no longer be available.
Note: this might take down your WiFi as well. In that case, undo it by means of this command:
sudo rm -v /etc/modprobe.d/blacklist-bluetooth.conf
Press Enter. Then reboot.
Blacklisting the built-in webcam
16.2. Now how to blacklist the webcam driver, which is obviously only a good idea when you use the webcam rarely or never. First find out which module (driver) it's running on: executing the command inxi -G should tell you that.Below I'll describe the procedure for the commonly used module uvcvideo, because a specific example always makes it easier. Modify if needed.
a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste this blue line into the terminal (it's one line!):
echo "blacklist uvcvideo" | sudo tee /etc/modprobe.d/blacklist-webcam.conf
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
c. Reboot your computer. The webcam should no longer be available.
Blacklisting ethernet
16.3. This is how to disable the ethernet chipset driver, which can be a good idea when you only connect by means of WiFi anyway. First find out which module (driver) it's running on; executing the command inxi -n should tell you that.Below I'll describe the procedure for the commonly used module r8169, because a specific example always makes it easier. Modify if needed.
a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste this blue line into the terminal (it's one line!):
echo "blacklist r8169" | sudo tee /etc/modprobe.d/blacklist-ethernet.conf
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
c. Now update the initramfs, which is an extra step needed for this particular module. Copy/paste this blue line into the terminal:
sudo update-initramfs -u
Press Enter.
d. Reboot your computer. The ethernet chipset should no longer be available.
How to undo (re-enabling Bluetooth, webcam and ethernet)
16.4. Do you want to enable Bluetooth, the webcam and ethernet again? Then proceed as follows:a. Temporarily re-enabling Bluetooth, the webcam and the ethernet chipset can be done with a terminal command. Copy/paste the following blue line into the terminal (it's one line!):
sudo modprobe -v btusb && sudo modprobe -v uvcvideo && sudo modprobe -v r8169
Press Enter.
This will instantly re-enable Bluetooth, the webcam and the ethernet chipset (provided that it's running on the r8169 module: modify if needed), but it won't survive a reboot.
b. Permanently re-enabling of Bluetooth, the webcam and the ethernet chipset can be achieved by a terminal command that removes the Bluetooth module, the webcam module and the ethernet module from the blacklist. Copy/paste the following blue line into the terminal (it's one line!):
sudo rm -v /etc/modprobe.d/blacklist-bluetooth.conf && sudo rm -v /etc/modprobe.d/blacklist-webcam.conf && sudo rm -v /etc/modprobe.d/blacklist-ethernet.conf
Press Enter.
c. Then update the initramfs, which is an extra step needed for permanently re-enabling the ethernet module. Copy/paste this blue line into the terminal:
sudo update-initramfs -u
Press Enter.
d. Then reboot your computer. Bluetooth, your webcam and the ethernet chipset should be available again permanently.
Temporary relief: force Firefox to minimize its memory usage
17. Firefox bogging down your system? Then you can provide temporary relief by forcing Firefox to minimize its memory usage, like this:Type in the URL bar of Firefox:
about:memory
Press Enter. Tab Free memory: click the button called Minimize memory usage
This offers only temporary relief; for a structural solution you'll need to investigate a bit more. Start with the usual suspects: the add-ons and extensions that you've weighed your Firefox down with.
An option with a price: set your CPU to Performance mode
18. There's a nifty tool for toggling the performance mode of your CPU. It allows you to set your CPU to perpetual maximal performance. But at a price: a steep increase in power consumption! This is how to install and use it:a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)
b. Copy/paste the following command line into the terminal:
sudo apt-get install cpupower-gui
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
c. Then launch cpupower-gui from the menu and tweak to your heart's delight. It lets you set the scaling governor either individually for each CPU core (why?), or for all of them at once (which is of course what you always want, so make sure you flip that switch for the "All CPUs" option).
The default governor will probably be either schedutil or powersave, both of which are a good compromise for most users. You can set it to performance, which will ensure that your CPU will always run at maximal speed (and at maximal power consumption!).
This sizeable increase in power consumption is of course not a small thing: that's why I only recommend to select performance when you really need it (e.g. for gaming). And only for the duration of that need, so temporarily.
To check what your CPU cores are currently set to, utilize this terminal command (copy/paste it into the terminal and press Enter):
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Clean up your Mint
19. A clean Mint will perform better than a Mint that has become polluted too much by file debris and disordered settings (although pollution is much less of a problem than in Windows). This is how to clean Linux Mint.Want more tips?
20. Do you want more tips and tweaks? There's a lot more of them on this website!For example:
Avoid 10 fatal mistakes
To the content of this website applies a Creative Commons license.
Back to the home page
Disclaimer