Optimizing Debian 12/13 for Work: Post-Installation and Performance Tweaks

In this post, I will show you the configurations I use to optimize my work PC running Debian.

After a minimal Gnome installation, it’s time for the fine-tuning.

Post-Installation Setup

Whether on Debian 12 (Bookworm) or 13 (Trixie), the first thing I do is install the Gnome desktop with the bare minimum of packages.

Then, I install these essential tools:

sudo apt install neofetch virt-manager libvirt-daemon-system qemu-system bridge-utils gnome-settings-daemon htop iotop unattended-upgrades cups cups-client cups-filters system-config-printer gparted vim dbus-x11 libnotify-bin firmware-misc-nonfree --no-install-recommends

The Flatpak Choice: Since I downgraded to Debian 12 for stability, I opted to use more applications via Flatpak instead of native packages.

While on Debian 13 I had installed Evolution, Remmina, and Gnome-Boxes as .deb files, on version 12 I run all of them (including Google Chrome and Brave) via Flatpak.

I also use Flatseal to manage permissions easily.


Update: I’ve just published the second part of this guide! Check out for advanced performance settings


Optimizing Debian for Productivity

My goal is to achieve a faster boot, improve access to my backup drive, and optimize RAM management for Virtual Machines and daily tasks.

1. Switching from Wayland to Xorg

To fix compatibility issues, I disable Wayland in the GDM configuration:

sudo nano /etc/gdm3/daemon.conf

Uncomment the line WaylandEnable=false. Save and reboot.

“Just a reminder: I’m using Xorg instead of Wayland due to my old GPU.”

2. Network Manager Adjustments

To manage the network directly through the GUI without conflicts, I disable the systemd networking service:

  1. sudo systemctl disable networking
  2. sudo rm /etc/network/interfaces

3. Preload

To speed up application launch times, I use Preload:

sudo apt install preload 

Edit the config (sudo nano /etc/preload.conf) and adjust the model:

  • cycle = 30
  • memfree = 10
  • memcached = 70

Restart with sudo systemctl restart preload.

4. Swap and Sysctl Tweaks

I created an 8GB swap file and optimized the kernel parameters for better responsiveness:

First:

sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Now add it to /etc/fstab:

echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab

In /etc/sysctl.conf, I added:

  • vm.swappiness=1 (Avoids unnecessary swap usage)
  • vm.vfs_cache_pressure=50
  • net.core.somaxconn=65535 (Improves network connections)

5. Zram and Tmpfs

To make the most of my 16GB RAM, I use Zram with zstd compression:

sudo apt install zram-tools

In /etc/default/zramswap, I set ALGO=zstd and SIZE=4096.

I also moved temporary files to RAM by adding these to /etc/fstab:

Optimizing debian 12/13 for work
tmpfs /tmp tmpfs defaults,noatime,mode=1777,size=1G 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777,size=512M 0 0
tmpfs /run/libvirt tmpfs defaults,noatime,mode=0755,uid=libvirt-qemu,gid=libvirt-qemu,size=256M 0 0

6. Virtualization and NFS

Since I work in a Microsoft environment, I need a Windows VM.

I use nfs-common to mount network folders at boot via /etc/fstab and configure Virt-Manager to point to my VM storage directory.

For the Bridge Network, I use nmcli to create br0 and link it to my physical interface (e.g., enp4s0).

Make sure to set managed=true in /etc/NetworkManager/NetworkManager.conf.

You can see here How to enable bridge mode on Gnome Boxes

7. Avoiding System Freezes with EarlyOOM

To prevent the system from locking up during high memory usage:

sudo apt install earlyoom && sudo systemctl enable --now earlyoom

Once your system is ready, you might need to help others or manage different OS environments.

If you ever need to create a Windows installation media from your Linux desktop, check out this guide on How to Create a Windows Bootable USB on Linux.

8. Gnome “Wait or Force Quit” Timeout

If Gnome is too impatient with slow-loading apps, run this in the terminal to give them more time (20 seconds):

gsettings set org.gnome.mutter check-alive-timeout 20000
0 0 votes
Article Rating
Subscribe
Notify of

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x