温馨提示×

debian compton为何闪退

小樊
37
2026-09-29 01:59:23
栏目: 智能运维

在 Debian 上 compton(或已更名后的 picom)闪退,常见原因和排查思路如下:


一、最常见原因

1. 显卡驱动 / OpenGL 问题(最多)

compton 依赖 X11 + OpenGL(或 XRender),以下情况容易直接闪退:

  • 使用 虚拟机(VMware / VirtualBox)未开 3D 加速
  • NVIDIA 闭源驱动 + 配置不对
  • Intel / AMD 驱动缺失
  • Wayland 会话下强行跑 compton(不支持)

排查:

glxinfo | grep OpenGL

如果报错或没有输出,基本就是驱动问题。

解决:

  • 虚拟机:开启 3D 加速
  • NVIDIA:
sudo apt install nvidia-driver

并确保用 nvidia 而非 nouveau


2. 配置文件语法错误

compton 对配置非常敏感,一个错误就直接退出。

常见错误:

  • 使用了 picom 新参数但用的是旧 compton
  • 缩进 / 拼写错误
  • 重复或冲突选项

排查:

compton --config ~/.config/compton.conf

看终端报错。

建议:

  • 先用空配置测试:
compton --backend xrender
  • 或换用 picom(推荐):
sudo apt install picom

3. 缺少依赖

Debian 最小化安装时常缺库:

sudo apt install \
  libxext-dev libxcb1-dev libxcb-damage0-dev \
  libxcb-xfixes0-dev libxcb-shape0-dev \
  libgl1-mesa-dev libpcre3-dev

4. 与其他合成器冲突

如果你同时有:

  • xcompmgr
  • kwin
  • mutter
  • picom

会互相抢占,导致 compton 闪退。

解决:

pkill xcompmgr
pkill picom
pkill compton

5. Debian 版本问题

  • Debian 10/11 默认仓库里的 compton 已停止维护
  • 强烈建议直接换 picom
sudo apt remove compton
sudo apt install picom

二、快速自救方案(推荐)

# 1. 杀掉旧进程
pkill compton

# 2. 安装 picom
sudo apt install picom

# 3. 最简启动
picom --backend xrender &

三、如果你愿意贴信息,我可以精确定位

你可以贴出:

  1. compton 启动时的终端报错
  2. inxi -G 或 glxinfo | grep OpenGL
  3. 是否虚拟机 / 什么显卡
  4. Debian 版本(cat /etc/os-release)

我可以一步帮你定位 ✅

0 踩