在 Debian 上调试 compton(或已更名为 picom) 的报错,一般可以按下面步骤来做。
Debian 新版里 compton 基本已被 picom 取代:
which compton
which picom
如果有 picom,建议直接用 picom。
不要后台运行,直接终端启动:
compton --config ~/.config/compton.conf
# 或
picom --config ~/.config/picom.conf
常见调试参数:
picom -b # 后台(调试时不建议)
picom --show-all-errors
picom --log-level trace
picom --log-file /tmp/picom.log
观察终端输出,一般错误会直接显示,比如:
compton / picom 对配置很敏感。
检查配置语法:
picom --config ~/.config/picom.conf --show-all-errors
建议:
最小示例(~/.config/picom.conf):
backend = "glx";
vsync = true;
常见于:
尝试:
backend = "xrender";
或:
picom --backend xrender
如果你在用:
要先关闭系统合成器,否则 compton 无法工作。
例如 GNOME:
gsettings set org.gnome.mutter experimental-features "[]"
确保你在 X11 会话,而不是 Wayland:
echo $XDG_SESSION_TYPE
如果是 wayland,compton 不支持,需切换到 X11。
如果直接闪退:
picom --log-level debug
或:
gdb --args picom --config ~/.config/picom.conf
如果你愿意,可以把 具体报错信息 或 你的 compton.conf 发出来,我可以直接帮你定位问题。