Ubuntu 26.04 desktop performance optimization actual combat: a complete tuning record from stuck to stable operation

about:config

作者:

From Windows to Ubuntu: A Complete Guide to Migration and Configuration

在启动项列表中找到刚创建的 Ubuntu Installer,通过右侧的 “上移” 按钮将其移到第一位。这样重启后电脑会优先从这个启动项引导。

(1) Migrate from Windows 10 to Ubuntu – Previous: Preparation before installation

如图24 – 选择 Ubuntu 外观,高亮默认

(2) Migrate to Ubuntu from Windows 10 – Next: Ubuntu 26.04 Installation and First Time Configuration

安装完成后,打开 Fcitx5 配置工具(fcitx5-configtool),在“输入法”选项卡中添加 “五笔拼音” 即可正常使用。

(3) Ubuntu initialization configuration (basic settings, software installation)

图10 – 新分区信息(UUID、卷标、文件系统)

(4) Ubuntu Disk Planning: Migrate /home to the second block SSD

如图10:点击 安装 按钮,进度条显示“正在准备…”。

(5) Ubuntu 26.04 software installation and maintenance best practices: take WeChat as an example

图中查找范围为 /home/wangqiang,名称列表里仅有「下载」和「xwechat_files」两个文件夹

(6) Solve the problem that the Linux WeChat “Save As” dialog box only displays two folders

图1 重启后右上角没有输入法图标

(7) Ubuntu 26.04 Input Method Tossing Notes: From FcitX5 Self-Starting Failed to Wubi Pinyin Stable Use

下图为实拍照片(图3): (此处为双屏实物照片,展示左外接、右笔记本的布局,两台显示器并排亮起)

(8) Ubuntu dual-screen configuration actual combat: ThinkPad T570 external monitor, the left screen and the right are more convenient

中文部分显示为梦源宋体,清晰舒适

(9) From Siyuan to Mengyuan: Understand the “toss” of the Song Dynasty on Ubuntu 26.04

至此,三个数据库容器均已正常运行。

(10) Configure development environment: Manage multi-version MySQL and Redis with Docker

SOLO 模式欢迎界面,我切换到了 IDE

(11) Push from Baidu API to AI IDE selection: how do I get the trae installation and prepare to start work

如图15:授权完成后,Gmail 账号成功添加。最终,Thunderbird 账户列表里一共添加了 8 个邮箱。

(12) Ubuntu 26.04 Mail Client Tossing Notes: From NetEase Mailbox Master to Thunderbird, add 8 mailboxes in one go

图1:优化前60标签整机内存占用截图(原始满载19GB+)

(13) Under Ubuntu 26.04 High memory usage optimization full record | Same as 60 tags, Win10≈7GB, Ubuntu skyrocketed to 20GB row pit record

📸 浏览器显示 JSON 数据,如图4

(14) Ubuntu 26.04 + Docker build a Go Gin development environment (full record)

在保存对话框中找到 显示选项 - 编码 ,将其从“自动检测”改为 UTF-8。

(15) Ubuntu opens the Windows document and prompts “Invalid Characters”? my solution

从截图中可以看到,我连续执行了 mv、chmod、nano,最后 ssh aliyun 一气呵成,直接显示欢迎信息和上次登录时间,没有任何密码询问。

(16) Say goodbye to passwords and disconnects: Alibaba Cloud ECS SSH password-free login and heartbeat preservation practice

[截图 5:扩展显示“用户已全局禁用此扩展”及右键菜单]

(17) Try Dev Containers in Trae CN: A not very successful step on the pit record

Docker 扩展面板的容器操作菜单

(18) From zero to one: Build a Go + Gin development environment in Trae CN + Docker

Flameshot 的功能

(19) Farewell to WeChat window restrictions: use Flameshot to bind global ALT+A screenshots in Ubuntu 26.04

微信的内存占用高达 2.01 GB(1.5%);而在只开启一个标签页的情况下,Google Chrome 的内存占用更是达到了 2.96 GB(1.0%)。

(20) Ubuntu 26.04 Software Installation and Maintenance Best Practice Update: From Chrome Memory Surge to Discharge Pits to Deprecated Flatpak

deb 版 Firefox 更实用:能直接访问 Chrome 配置文件,资源占用更小。现在开启 4 个窗口,50 个标签页,内存占用 5 GB 左右

(21) Migrating from Chrome to Firefox under Ubuntu 26.04: my tossing experience

如图4:将中州韵加入输入法列表

(22) Input method selection failure record from Windows to Ubuntu:rime → wbpy

about:config

(23) Ubuntu 26.04 desktop performance optimization actual combat: a complete tuning record from stuck to stable operation

🧭 1. Background: The Linux desktop is starting to have problems with stuck and OOM

During the daily use of Ubuntu 26.04 LTS (ThinkPad T570), the following problems gradually arise:

  • Firefox is occasionally stuck and even forced to shut down by the system
  • Clash Verge memory usage continues to grow
  • Gnome Input delay, window freeze
  • The system is unstable at the same time when multiple applications are running at the same time
Firefox is occasionally stuck and even forced to shut down by the system

The initial judgment is:

🧠 Memory scheduling + Swap policy + Electron application overlays cause high system pressure


⚙️ 2. Optimization goals

This optimization goal:

  • Improve desktop stability
  • Reduce memory peak impact
  • Optimize VPN + browser concurrency scenarios
  • Reduce Oom Killer trigger probability

🧩 3. Basic system information

Equipment environment:

  • ThinkPad T570
  • Ubuntu 26.04 LTS
  • Gnome Wayland
  • Firefox + Clash Verge resident

Memory configuration:

  • 16GB RAM
  • swap.img 4GB
  • ZRAM 7.4GB

🛠️ 4. Core optimization process


🧊 1. Install ZRAM (improve memory buffering)

Bash
sudo apt install zram-tools

function:

  • Use a portion of memory compression as swap
  • Improve high-load scenario stability
  • Reduce disk Swap usage frequency

⚙️ 2. Adjust Swap Policy (SWAPPINESS)

Original value:

Plaintext
vm.swappiness = 60

Adjust to:

Bash
sudo sysctl vm.swappiness=10

and write:

Plaintext
/etc/sysctl.conf

Optimization meaning:

  • Reduce SWAP usage frequency
  • Prioritize use of RAM + ZRAM
  • Avoid desktop shaking and stuck

After restarting you should observe these two points:

Plaintext
swapon --show
Plaintext
cat /proc/sys/vm/swappiness

🧠 3. Firefox performance optimization

Key parameter adjustment:

Plaintext
about:config
about:config
Plaintext
dom.ipc.processCount = 4
browser.sessionstore.interval = 30000
browser.tabs.unloadOnLowMemory = true
dom.ipc.ProcessCount = 4

Optimization effect:

  • Reduce multi-process usage
  • Control Tab Memory Growth
  • Reduce background write pressure

🌐 4. Clash Verge Optimization (Key Step)

⚡ Enable light weight mode (finally execute)

path:

Plaintext
Verge → 高级设置 → 轻量模式

Also optimize:

  • Log level: Info → warn
  • Close flow chart
  • Turn off the kernel usage display

Optimization effect:

  • Memory usage from 500MB → 150~200MB
  • The burden of UI rendering is greatly reduced
  • The Electron resident process is significantly reduced

Reference:🚀 Clash Verge from 500MB to 200MB: Ubuntu VPN client lightweight optimization practice


🎨 5. GNOME Extension Check

Current extension:

  • ubuntu-dock
  • tiling-assistant
  • Snapd Components

Conclusion:

Keep core extensions to avoid excessive UI plugins affecting performance


📊 5. Optimization results comparison

Projectbefore optimizationafter optimization
Clash Verge500MB+150~200MB
firefoxCattonstable operation
system responseOccasionally stuckStable and smooth
OOM riskExistSignificant decrease

🧠 6. Summary of core optimization ideas

The core of this optimization is not a ‘single point adjustment’, but a three-layer structure optimization:

🧩 1. Memory structure optimization

  • RAM + ZRAM + SWAP three-layer system

🧩 2. Application layer optimization

  • Firefox restricts multiprocessing
  • Clash Verge Lightweight Mode

🧩 3. System scheduling optimization

  • swappiness reduced to 10
  • Reduce SWAP interference

🚀 Seven, key experience summary

The root cause of the Linux desktop lag is often not ‘insufficient memory’, but ‘unreasonable memory scheduling policy + Electron application overlay load’.


📌 8. Applicable scenarios

This article applies to:

  • Ubuntu 22.04 / 24.04 / 26.04
  • GNOME Desktop Environment
  • Clash Verge / Electron tool users
  • Firefox heavy users
  • Open VPN + browser parallel work scenarios for a long time

🎯 Nine, the conclusion

Through this optimization, the system enters a stable operation mode from the state of ‘occasional stuttering + memory fluctuation’.

The overall experience changes are very obvious:

🧠 From ‘Desktop Unstable’ → ‘Can be used for a long time’

Input method selection failure record from Windows to Ubuntu:rime → wbpy

Linux Server Deployment & Operations Consulting

I have extensive experience working with Ubuntu, Debian, Docker, Nginx, and cloud servers in production environments. This includes server deployment, website migration, performance tuning, and long-term maintenance.

Ideal For:
✅ Linux migration projects
✅ Website deployment
✅ Docker-based environments
✅ Nginx optimization
✅ Server performance tuning

What I Offer:
✅ Linux Environment Setup
✅ Website Migration & Deployment
✅ Docker Configuration & Maintenance
✅ Nginx Optimization
✅ Long-Term Technical Support

Please contact me and mention: Linux Operations Consultation.

Contact Me:
Telegram: @shuijingwan
WeChat: 13980074657
Email: shuijingwanwq@gmail.com

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.