centos

centos compton如何提高渲染效率

小樊
38
2025-12-29 11:27:35
栏目: 智能运维

CentOS 上提升 Compton 渲染效率的实用方案

一 基础准备与驱动检查

二 核心配置优化

三 示例性能优先配置

backend = "glx"
vsync = "opengl-swc"
fps = 60

# 关闭高开销特效
shadow = false
opacity = false
bg_blur = false
fade = false

# GPU 加速细节
glx-no-stencil = true
glx-copy-from-front = true
glx-fbo = true
glx-hardware = true

# 减少合成窗口
unredir-if-possible = true
unredir-if-possible-exclude = [ "class_g = 'Firefox'" ]

# 刷新与缓存
update-interval = 0.1
cache-size = 4096

# 可选:排除特定窗口的阴影/模糊
shadow-exclude = [
  "name = 'Notification'",
  "class_g = 'Conky'",
  "class_g = 'Notify-osd'"
]

说明:该配置以性能为优先,适合日常办公与轻度图形场景;如需保留阴影或透明度,可逐项开启并配合排除规则。

四 启动与自启

[Unit]
Description=Compton Compositor
After=graphical.target

[Service]
ExecStart=/usr/bin/compton -b -c /home/your-username/.config/compton.conf
Restart=always
User=your-username
Group=your-username

[Install]
WantedBy=multi-user.target

启用与启动:sudo systemctl daemon-reload && sudo systemctl enable --now compton。如需全局配置,可将 User 改为 root 并调整 ExecStart 路径。

五 验证与排障

0
看了该问题的人还看了