在 Debian 上使用 Compton(现已多被 picom 继承) 出现卡顿,通常和显卡驱动、合成器配置、桌面环境冲突、资源占用有关。下面按常见原因逐一说明,并给出排查/解决办法。
Compton 依赖 GPU 合成,如果用了**软件渲染(llvmpipe)**就会非常卡。
检查:
glxinfo | grep "OpenGL renderer"
llvmpipe / Software Rasterizer → 驱动没装好Intel / AMD / NVIDIA 具体型号解决:
mesa、xf86-video-*nvidia-driver如果你在:
再开 Compton,会双重合成 → 卡顿、闪屏
解决:
Compton 默认配置可能开了:
这些很吃性能。
建议最小配置(~/.config/compton.conf):
backend = "glx";
vsync = true;
shadow = false;
blur-background = false;
fade = false;
vsync 错会导致:
尝试:
vsync = "opengl-swc";
或
vsync = "none";
很多人默认用 xrender,在 Debian 上很慢。
改:
backend = "glx";
Debian 老版本里的 compton 已废弃。
建议改用 picom:
sudo apt install picom
picom --config ~/.config/picom.conf
尤其 Debian Stable:
可尝试:
# 是否用 GPU
glxinfo | grep OpenGL
# CPU 占用
htop
# 是否有多个合成器
ps aux | grep -E "compton|picom|kwin|mutter"
✅ 用 picom 替代 compton
✅ 关闭阴影/模糊
✅ 使用 glx 后端
✅ 确保显卡驱动正常
✅ 不同桌面只用一个合成器
如果你愿意,可以告诉我:
cat /etc/os-release)我可以给你一份可直接用的配置。