在 Debian 上使用 Compton(现为 Picom 前身) 时,调试错误通常可以从日志、配置、依赖、运行方式几个方面入手。下面按实用顺序说明。
Debian newer 版本中:
compton 已停止维护picom检查:
which compton
which picom
如果只有 picom,请用:
picom --help
不要直接后台运行,先前台看输出:
compton --config ~/.config/compton.conf
或
picom --config ~/.config/picom.conf
常见错误会直接打印,例如:
compton -b --log-level debug --log-file /tmp/compton.log
picom --log-level debug --log-file /tmp/picom.log
然后查看:
cat /tmp/compton.log
配置文件常见位置:
~/.config/compton.conf
~/.config/picom.conf
测试配置文件是否有效:
compton --config ~/.config/compton.conf --dry-run
或
picom --config ~/.config/picom.conf --dry-run
Failed to initialize backend
解决:
backend = "xrender";
或
backend = "glx";
并确保:
glxinfo | grep OpenGL
如果你同时有:
会导致黑屏或崩溃。
解决:
pkill compton
pkill picom
安装:
sudo apt install mesa-utils libgl1-mesa-dri
尝试最小配置:
backend = "xrender";
shadow = false;
fade = false;
如果你用 i3 / bspwm:
exec_always compton --config ~/.config/compton.conf
调试时先手动运行,再写入配置。
compton --version
picom --version
compton --help
如果你愿意,可以把具体的错误信息或配置文件贴出来,我可以直接帮你定位问题。