检查配置文件
~/.config/compton.conf
或 /etc/compton.conf
),用文本编辑器(如 nano
)查看是否有语法错误、拼写错误或弃用选项(如 no-dock-shadow
需替换为 shadow
相关配置)。backend "glx" # 推荐使用glx后端
shadow = true
opacity = 0.9
vsync = true
更新Compton及依赖
sudo yum update
。sudo yum install xrender mesa-libGL
。git pull
后重新 cmake
和 make install
。查看日志排查
~/.cache/compton/compton.log
或 /var/log/
):tail -f ~/.cache/compton/compton.log
,根据错误信息调整配置。journalctl -xe
,排查是否与显卡驱动或服务冲突。调整后端与特效
backend "glx"
。shadow = false
、opacity = 1.0
。重启服务与验证
pkill compton && compton --config ~/.config/compton.conf
。ps -e | grep compton
,确认进程正常。其他高级操作
sudo systemctl stop compton
,或删除配置文件使用默认设置。注意:CentOS默认仓库可能无最新Compton版本,建议通过EPEL仓库或源码安装最新版。若为权限问题,确保配置文件可读写:chmod 644 ~/.config/compton.conf
。