優化Ubuntu Compton資源占用可從以下方面入手:
~/.config/compton.conf
,將backend
設為glx
或wayland
(需顯卡支持OpenGL),替代xrender
以提升性能。shadow = false
;禁用窗口透明:opacity = false
,減少渲染開銷。vsync
(垂直同步),可設為true
或false
以適配顯示器。backend glx
,并確保驅動已正確安裝。cpulimit
限制CPU占用,例如:cpulimit -l 50 -p $(pgrep compton)
(將CPU限制為50%)。xcompmgr
等更輕量的合成器。修改后需重啟Compton生效:sudo systemctl restart compton
。