Debian 下调试 Compton 配置错误的实用流程
一 快速定位流程
ps -e | grep comptonsystemctl status compton.servicejournalctl -xe | grep comptoncompton --config ~/.config/compton.conf --checkcompton --config ~/.config/compton.conf --verbose二 配置文件与路径要点
~/.config/compton.conf/etc/xdg/compton.conf/etc/systemd/system/compton.service[Unit]
Description=Compton Window Composer
After=xorg.service
[Service]
ExecStart=/usr/bin/compton --config /etc/xdg/compton.conf -b
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload && sudo systemctl enable --now comptonbackend:渲染后端,常见为 glx / xrendervsync:垂直同步,常见为 true / falseshadow:窗口阴影,常见为 true / falseopacity / alpha:透明度相关ignore_root:忽略根窗口透明度,常见为 true / falseblur-background、blur-kern:背景模糊相关(如 blur-kern = "3x3box")三 常见症状与修复建议
compton --config <file> --check 校验;前台运行 compton --config <file> -b -v 观察首条报错journalctl -u compton.service -bbackend 在 glx 与 xrender 间切换测试shadow=false、opacity=false 或关闭模糊效果vsync 为 true/false 对比;必要时更新显卡驱动--config 一致;修改后执行 systemctl --user daemon-reload && systemctl --user restart compton(若以用户会话运行)四 进阶诊断与性能分析
compton --config ~/.config/compton.conf -b -v,观察启动期与操作期的输出top -p $(pidof compton) 或 htopsudo perf top -p $(pidof compton) -e cpu-clockvalgrind --tool=memcheck --leak-check=full compton --config ~/.config/compton.conf -bjournalctl -xe | grep compton 或查看 /var/log/syslog五 一键最小化调试配置示例
# ~/.config/compton.conf
backend = glx
vsync = true
shadow = false
opacity = 1.0
blur-background = false
# 其他所有实验性选项先注释
compton --config ~/.config/compton.conf --checkcompton --config ~/.config/compton.conf -b -v