温馨提示×

ubuntu compton如何禁用

小樊
35
2026-07-27 04:41:42
栏目: 智能运维

在 Ubuntu 上“禁用 Compton”通常分几种情况,取决于你用的是 Compton 本身,还是 Compton 的替代品(如 Picom),以及你是如何启动它的。下面按常见情况说明。


一、先确认你用的是 Compton 还是 Picom

很多新系统里 Compton 已被 Picom 取代。

which compton
which picom
  • compton → 老版本
  • picom → 新版本(Compton 的分支)

二、如果是通过自动启动运行的(最常见)

1️⃣ 检查自动启动项

ls ~/.config/autostart/

查找是否有:

  • compton.desktop
  • picom.desktop

如果有,直接删除或改名:

rm ~/.config/autostart/compton.desktop
# 或
rm ~/.config/autostart/picom.desktop

2️⃣ 检查窗口管理器启动脚本

如果你用的是 i3 / Openbox / Awesome / bspwm 等:

i3

编辑:

~/.config/i3/config

查找类似:

exec compton
exec picom

注释掉:

# exec compton

然后重新加载 i3:

$mod+Shift+r

Openbox

~/.config/openbox/autostart

删除或注释:

# compton &
# picom &

三、如果是 systemd 启动(较少见)

systemctl --user status compton
systemctl --user status picom

停止并禁用:

systemctl --user stop compton
systemctl --user disable compton

四、临时关闭(不重启)

killall compton
# 或
killall picom

⚠️ 这只是临时,重启后可能还会启动。


五、完全卸载(可选)

sudo apt remove compton
sudo apt remove picom

或:

sudo apt purge compton picom

六、Ubuntu 桌面环境说明(重要)

桌面环境 是否默认使用 Compton
Ubuntu GNOME ❌ 不使用
Ubuntu MATE
XFCE ❌(除非手动装)
i3 / bspwm ✅ 常见
Regolith ✅ 使用 Picom

七、快速判断你是否需要禁用

如果你遇到:

  • 窗口闪烁
  • 透明失效
  • 游戏/视频卡顿
  • 登录后 CPU 占用高

那禁用 Compton / Picom 通常是正确的做法。


如果你愿意,可以告诉我:

  • Ubuntu 版本
  • 桌面环境(GNOME / XFCE / i3 等)
  • 是否自己安装过 Compton

我可以给你精确到命令级别的方案。

0