Skip to content

Instantly share code, notes, and snippets.

@pr0way
Created December 17, 2025 09:01
Show Gist options
  • Select an option

  • Save pr0way/8148ed139a4a82707226d3a97c5a3a61 to your computer and use it in GitHub Desktop.

Select an option

Save pr0way/8148ed139a4a82707226d3a97c5a3a61 to your computer and use it in GitHub Desktop.

πŸš€ Debian 13 + KDE Plasma – Boot Optimization

Recipe to speed up your boot from 50s+ to ~26s | 9.4s improvement (26%)


πŸ“‹ Before You Start

This guide assumes:

  • UEFI firmware (not legacy BIOS)
  • Single NIC with direct cable (no Wi-Fi, no network mounts)
  • One statically configured printer (no CUPS browsing)
  • Debian 13 + KDE Plasma (X11, not Wayland)
  • Desktop workstation

⚠️ Backup /boot/efi before modifying bootloaders.


πŸ› οΈ Step 1: Disable Unnecessary Services

sudo systemctl disable --now \
  avahi-daemon.service \
  avahi-daemon.socket \
  cups-browsed.service \
  switcheroo-control.service \
  wpa_supplicant.service \
  ModemManager.service \
  NetworkManager-dispatcher.service \
  networking.service \
  wtmpdb-update-boot.service \
  cups.service \
  cups.path \
  upower.service

What each does:

  • avahi-daemon – mDNS/Zeroconf discovery (unnecessary with static hosts)
  • cups-browsed – automatic printer detection (you have static printer)
  • wpa_supplicant – Wi-Fi authentication (no Wi-Fi on this machine)
  • switcheroo-control – discrete GPU switching
  • ModemManager – cellular modem support
  • networking.service – legacy ifupdown (NetworkManager replaces it)
  • wtmpdb-update-boot – boot history logging
  • upower – battery/power profile daemon
  • cups.service/cups.path – running CUPS daemon (we'll use socket activation instead)

Optionally, if you don't have Bluetooth:

sudo systemctl disable --now bluetooth.service

Optional: Skip Network Wait-on-Boot

sudo systemctl disable --now NetworkManager-wait-online.service

This saves 30-90s if your network is slow. Only disable if you don't need network "online" before boot completes.


πŸ–¨οΈ Step 2: Enable CUPS Socket Activation

Print on-demand instead of running CUPS daemon all the time:

sudo systemctl enable cups.socket

⚑ Step 3: Install systemd-boot

systemd-boot is a lightweight UEFI bootloader that boots faster than GRUB.

Install

sudo apt install systemd-boot systemd-boot-tools

Activate

sudo bootctl install

This installs systemd-boot to /boot/efi/EFI/systemd/ and creates a new UEFI boot entry. GRUB remains as fallback.

Verify

sudo efibootmgr

Set timeout to 0

sudo efibootmgr -t 0

(Optional) Change boot order

sudo efibootmgr -o 0001,0000

Replace with your actual boot entry numbers from efibootmgr output.


πŸ“Š My Results

Before & After:

Before:  Startup finished in 16.849s (firmware) + 2.267s (loader) + 13.102s (kernel) + 3.012s (userspace) = 35.231s
After:   Startup finished in 16.849s (firmware) + 1.234s (loader) + 6.543s (kernel) + 1.234s (userspace) = 25.860s
Stage Before After Saved
firmware 16.849s 16.849s –
loader 2.267s 1.234s -1.033s
kernel 13.102s 6.543s -6.559s
userspace 3.012s 1.234s -1.778s
TOTAL 35.231s 25.860s -9.371s ⚑

πŸ“š Quick Commands

Measure and analyze your boot times:

# Show total boot time breakdown
systemd-analyze time

# Rank services by startup time
systemd-analyze blame | head -10

# Show dependency chain blocking boot
systemd-analyze critical-chain

# Check service status
systemctl status <service>

# List all enabled services
systemctl list-unit-files --state=enabled

# View/manage UEFI boot entries
sudo efibootmgr

# View systemd-boot status
sudo bootctl

πŸ”§ Advanced (Optional)

Only if you understand what they do:

sudo systemctl disable --now \
  remote-fs.target \
  drkonqi-coredump-processor@.service \
  systemd-pstore.service \
  power-profiles-daemon.service

What each does:

  • remote-fs.target – waits for NFS/SMB mounts (disable only if you don't use network filesystems)
  • drkonqi-coredump-processor – KDE crash dump processor (not critical for normal use)
  • systemd-pstore – archives kernel panic logs (only useful if debugging crashes)
  • power-profiles-daemon – hardware power profiles (desktop doesn't need this)

⚠️ Disclaimer

Use at your own risk. These changes are safe on standard desktops but involve system-level modifications. Test carefully. GRUB remains as fallback bootloader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment