ubuntu安装后分辨率只有640*480怎么解决

2020-08-31 教育 73阅读
把设置新分辨率的命令写到一个sh脚本中,如果分辨率恢复到原来的自动执行此shell文件就可以了。
代码如下:
#!/bin/bash</p>

# set screen resolution to 1400 * 900</p>

# Query current resolution
echo "Current resolution:"
xrandr
echo "-------------------------------------"</p>

# New one modeline for 1440 * 900
echo "New one modeline for 1440 * 900:"
cvt 1440 900
echo "-------------------------------------"</p>

# 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 "-------------------------------------"</p>

# Add the resolution to monitor
echo "Add the resolution to monitor:"
xrandr --addmode VGA1 "1440x900_60.00"
echo "-------------------------------------"</p>

# Apply the resolution
echo "Apply the resolution:"
xrandr --output VGA1 --mode "1440x900_60.00"
echo "-------------------------------------"</p>

# Query current resolution again to determine the settings valid or not
echo "Current resolution after settings:"
xrandr
echo "-------------------------------------"

声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com