装了UBUNTU后找不到适合的分辨率,就是要靠运行这个脚本才能勉强度日。
其中的:DVI-I-2是我的显示器,
1440x900是自定义的分辨率。

#!/bin/bash
# set screen resolution to 1400 * 900
# Query current resolution
echo "Current resolution:"
xrandr
echo "-------------------------------------"
# New one modeline for 1440 * 900
echo "New one modeline for 1440 * 900:"
cvt 1440 900
echo "-------------------------------------"
# Create resolution using "xrandr --newmode" command
echo "Create resolution 1400 * 900:"
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
echo "-------------------------------------"
# Add the resolution to monitor
echo "Add the resolution to monitor:"
xrandr --addmode DVI-I-2 "1440x900_60.00"
echo "-------------------------------------"
# Apply the resolution
echo "Apply the resolution:"
xrandr --output DVI-I-2 --mode "1440x900_60.00"
echo "-------------------------------------"
# Query current resolution again to determine the settings valid or not
echo "Current resolution after settings:"
xrandr
echo "-------------------------------------"

¥打赏这个不要脸的博主