Compton在Debian上的分辨率配置说明
核心概念与适用范围
快速步骤
xrandr -qcvt 1920 1080(示例为 1920×1080@60Hz)xrandr --newmode "<Modeline 内容>"xrandr --addmode <输出名> "<模式名>"xrandr --output <输出名> --mode "<模式名>"sudo systemctl restart comptonkillall compton && compton --config ~/.config/compton.confxrandr --output HDMI-1 --mode 1920x1080 --right-of eDP-1xrandr 命令加入登录自启(如 ~/.xprofile 或显示管理器会话脚本),确保每次登录自动设置分辨率。示例命令
cvt 1920 1080
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode HDMI-1 "1920x1080_60.00"
xrandr --output HDMI-1 --mode "1920x1080_60.00"
xrandr --output eDP-1 --mode 1366x768 --primary
xrandr --output HDMI-1 --mode 1920x1080 --right-of eDP-1
sudo systemctl restart compton
# 或
killall compton && compton --config ~/.config/compton.conf
以上命令中的输出名(如 HDMI-1、eDP-1)请以 xrandr -q 的实际结果为准。
常见问题与排查
xrandr --output <输出名> --mode <原有模式>xrandr 命令加入 ~/.xprofile、桌面会话的启动脚本,或使用显示管理器的会话配置,确保登录即应用。--left-of、--right-of、--above、--below 明确相对位置,必要时先禁用自动缩放/镜像再设置。scale: 2;(全局缩放)或 dpi: 96;(按 DPI 缩放),然后重启 Compton 生效;不同后端(如 glx、xrender)对缩放支持与性能表现不同,可按硬件与驱动情况选择。