简体   繁体   English

使用xrandr自动将Screenresolutions添加到Ubuntu 14.04

[英]Add Screenresolutions to Ubuntu 14.04 automatically with xrandr

I use Ubuntu 14.04 with a Laptop and an external screen with a resolution of 1600x900. 我将Ubuntu 14.04与笔记本电脑和分辨率为1600x900的外部屏幕一起使用。 On the original installation the resolution is limited to 1024x768. 在原始安装上,分辨率限制为1024x768。 So I configured a script that runs automatically on booting using xrandr: 因此,我配置了一个脚本,该脚本在使用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"

When the machine is booting and I connect the VGA cable it works fine. 机器启动时,我连接了VGA电缆,即可正常工作。 When the screen ist conected and I boot or reboot the computer this error appears: 当屏幕已连接并且我引导或重新引导计算机时,出现此错误:

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 ... 无法将CRTC分配给输出:CRTC 63 CRTC 63的尝试模式:尝试模式1600x900 @ 60Hz,输出为1600x900 @ 60Hz(通过0),未选择任何模式与可能的模式兼容:CRTC 63 CRTC 63的尝试模式:尝试模式1024x768 @ 60Hz,输出为1600x900 @ 60Hz(通过0)CRTC 63:尝试模式800x600 @ 60Hz,输出为1600x900 @ 60Hz(通过0)CRTC 63:尝试模式800x600 @ 56Hz,输出为1600x900 @ 60Hz(通过0 )CRTC 63:尝试模式848x480 @ 60Hz,输出为1600x900 @ 60Hz(通过0)CRTC 63:尝试模式640x480 @ 60Hz,输出为1600x900 @ 60Hz(通过0)CRTC 63:尝试模式1024x768 @ 60Hz,输出为1600x900 @ 60Hz(通过1)CRTC 63:尝试模式800x600 @ 60Hz,输出为1600x900 @ 60Hz(通过1)CRTC 63:尝试模式800x600 @ 56Hz,输出为1600x900 @ 60Hz(通过1)CRTC 63:尝试模式848x480 @ 60Hz,具有以1600x900 @ 60Hz的输出(通过1)CRTC 63:尝试模式640x480 @ 60Hz,以1600x900 @ 60Hz的输出(通过1)CRTC 64的尝试模式...

Is there a solution to make work this script without conecting and disconecting the cable on every boot or reboot? 是否有解决方案可以使此脚本正常工作,而不必在每次引导或重新引导时都连接或断开电缆?

I got it! 我知道了! It is a hardware problem: I changed the cable and Ubuntu detects the screen model perfectly and applies the correct resolution even without the script. 这是一个硬件问题:我更换了电缆,Ubuntu完美地检测了屏幕模型,即使没有脚本也能应用正确的分辨率。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM