在 CentOS 上检查 Compton(或它的继任者 picom) 的配置,通常可以按下面几个步骤来排查。
CentOS 默认仓库里一般没有 compton,常见的是 picom(compton 的 fork)。
which compton
which picom
或:
rpm -qa | grep -E 'compton|picom'
如果都没有,说明还没安装。
ps -ef | grep -E 'compton|picom'
或:
pgrep -a compton
pgrep -a picom
如果有输出,说明正在运行。
Compton / picom 常见配置文件路径:
~/.config/compton.conf
~/.config/picom.conf
/etc/compton.conf
/etc/picom.conf
检查是否存在:
ls -l ~/.config/compton.conf ~/.config/picom.conf
如果不确定加载的是哪个配置文件,可以用:
compton --help
或:
picom --help
查找类似:
--config <config-file>
很多时候配置不是写在文件里,而是写在 启动命令 中。
ps -ef | grep compton
ps -ef | grep picom
例如你可能会看到:
picom --backend glx --vsync
说明配置来自命令行参数,而不是配置文件。
killall compton
killall picom
picom --config ~/.config/picom.conf
如果有错误,会直接输出到终端,方便排查。
打开配置文件,重点检查这些项:
backend = "glx";
vsync = true;
shadow = true;
opacity-rule = [ "80:class_g = 'Alacritty'" ];
常见问题:
backend 设置错误(xrender / glx)vsync 与显卡驱动冲突picom --config ~/.config/picom.conf --verbose
~/.local/share/xorg/Xorg.0.log
/var/log/Xorg.0.log
lspci | grep VGA
glxinfo | grep "OpenGL renderer"
如果是:
backend = "glx" + vsync = falsebackend = "xrender" 更稳定# 1. 是否安装
which picom
# 2. 是否运行
pgrep -a picom
# 3. 配置文件是否存在
ls ~/.config/picom.conf
# 4. 手动启动测试
picom --config ~/.config/picom.conf --verbose
如果你愿意,可以把 你的 CentOS 版本 + 桌面环境 + 显卡型号 + 配置文件内容 发出来,我可以帮你逐行检查哪里有问题。