我使用带有笔记本电脑和分辨率为 1600x900 的外部屏幕的 Ubuntu 14.04。在原始安装中,分辨率限制为 1024x768。所以我配置了一个在使用 xrandr 启动时自动运行的脚本:
#/bin/bash
xrandr -s 0
xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
xrandr --addmode VGA1 "1600x900_60.00"
当机器启动并连接 VGA 电缆时,它工作正常。当屏幕连接并且我启动或重新启动计算机时,会出现此错误:
could not assign CRTCs to outputs: Trying modes for CRTC 63 CRTC 63: trying mode 1600x900@60Hz with output at 1600x900@60Hz (pass 0) none of the selected modes were compatible with the possible modes: Trying modes for CRTC 63 CRTC 63: trying mode 1024x768@60Hz with output at 1600x900@60Hz (pass 0) CRTC 63: trying mode 800x600@60Hz with output at 1600x900@60Hz (pass 0) CRTC 63: trying mode 800x600@56Hz with output at 1600x900@60Hz (pass 0) CRTC 63: trying mode 848x480@60Hz with output at 1600x900@60Hz (pass 0) CRTC 63: trying mode 640x480@60Hz with output at 1600x900@60Hz (pass 0) CRTC 63: trying mode 1024x768@60Hz with output at 1600x900@60Hz (pass 1) CRTC 63: trying mode 800x600@60Hz with output at 1600x900@60Hz (pass 1) CRTC 63: trying mode 800x600@56Hz with output at 1600x900@60Hz (pass 1) CRTC 63: trying mode 848x480@60Hz with output at 1600x900@60Hz (pass 1) CRTC 63: trying mode 640x480@60Hz with output at 1600x900@60Hz (pass 1) Trying modes for CRTC 64 ...
是否有解决方案可以在每次启动或重新启动时不连接和断开电缆的情况下使该脚本工作?
最佳答案
我知道了!这是一个硬件问题:我更换了电缆,Ubuntu 完美地检测到屏幕模型,即使没有脚本也应用了正确的分辨率。
关于ubuntu - 使用 xrandr 自动将屏幕分辨率添加到 Ubuntu 14.04,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29571477/