Ubuntu 下使用 Compton 调整分辨率与缩放的正确思路
核心结论
调整分辨率的正确方法
xrandr -qxrandr -s 1920x1080xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual1 "1920x1080_60.00"
xrandr --output Virtual1 --mode "1920x1080_60.00"
xrandr 命令加入 ~/.xprofile 或 ~/.xinitrc。以上操作与 Compton 无关,但会影响最终显示效果。在 Compton 中可做的相关优化
backend = "glx";(或 "xrender")refresh-rate = 60;、fps-limit = 60;screen0 { output HDMI-1; position LeftOf eDP-1; }
screen1 { output eDP-1; position RightOf HDMI-1; }
transform = "translate(0px, 0px), scale(1.0, 1.0)";nano ~/.config/compton.confkillall compton && compton常见问题与建议
xrandr 命令加入 ~/.xprofile 或会话自启动脚本,而非写入 Compton 配置。