在 Debian 上“修复 compton”通常指 compton 无法启动、黑屏、闪屏、占用高 CPU、透明无效 等问题。下面按「排查 → 常见修复 → 替代方案」来说明。
uname -a
lsb_release -a
echo $XDG_SESSION_TYPE
X11 → compton 可用Wayland → compton 不支持,需换 picomsudo apt update
sudo apt install --reinstall compton
可选(更推荐):
sudo apt install picom
Debian 官方 repo 中
compton已逐渐被picom取代。
测试启动:
compton --config ~/.config/compton.conf
常见错误:
Another compositor is runningBackend error修复:
killall compton
killall picom
并确保没有:
编辑配置:
nano ~/.config/compton.conf
最小可用配置:
backend = "glx";
glx-no-stencil = true;
vsync = "opengl";
shadow = false;
然后:
compton --config ~/.config/compton.conf &
改用 xrender:
backend = "xrender";
vsync = "none";
或关闭阴影:
shadow = false;
确认:
例如 alacritty:
background_opacity: 0.8
echo "exec --no-startup-id compton &" >> ~/.config/i3/config
echo "compton &" >> ~/.config/openbox/autostart
sudo apt install picom
picom --config ~/.config/picom.conf &
picom 是 compton 的活跃维护版,修复了大量 Debian 12 的问题。
请提供:
我可以直接给你一份可用配置文件。