ubuntu - 使用 xrandr 自动将屏幕分辨率添加到 Ubuntu 14.04

标签 ubuntu screen-resolution xrandr

我使用带有笔记本电脑和分辨率为 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/

相关文章:

selenium - 作为 Jenkins Slave 在虚拟机上设置 Selenium 测试的显示分辨率

javascript - 如何在 WinRT JavaScript 应用程序中获取屏幕分辨率?

ubuntu - 如何在窗口 7 的 Octave 中使用 Vlfeat?

java - 更改 Android 中应用程序的 DisplayMetrics(API 级别低于 17)

Ubuntu preseed 文件安装挂起

c - 如何通过 xcb RandR 扩展获得 RandR 输出的分辨率?

wayland - 当我尝试更改亮度时升级到 Ubuntu 17.10 后从 xrandr 获取 "output eDP-1 not found"

x11 - 使用 xming/vcxsrv/xwin 为 i3wm 设置两个屏幕

node.js - Aws Ubuntu 上的 NodeJs 应用程序在 ipv6 上运行

php - 如何在 Ubuntu 16.04 中安装 php-curl