如何在Ubuntu 12.04中为LCD添加显示分辨率? xrandr问题

我是Ubuntu的新手。 我已经安装了Ubuntu 12.04,并试图为我的LCD显示器设置正确的分辨率。

LCD的原始分辨率为1920×1080

这是xrandr的输出:

 $ xrandr Screen 0: minimum 320 x 200, current 1280 x 720, maximum 4096 x 4096 LVDS1 connected 1280x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1280x720 60.0*+ 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) 

然后我创建新的模式:

 $ cvt 1920 1080 60 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync 

到现在为止还挺好。 然后我使用xrandr创建新模式:

 $ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync 

但出于某种原因,为VGA(VGA1)输出而不是LCD输出(LVDS1)创建了新模式:

 $ xrandr Screen 0: minimum 320 x 200, current 1280 x 720, maximum 4096 x 4096 LVDS1 connected 1280x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1280x720 60.0*+ 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) 1920x1080_60.00 (0xbc) 173.0MHz <---------- ????!!!!!! h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.2KHz v: height 1080 start 1083 end 1088 total 1120 clock 60.0Hz 

所以,如果我尝试将模式添加到LVDS1,我会收到一个错误:

 $ xrandr --addmode LVDS1 "1920x1080_60.00" X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 149 (RANDR) Minor opcode of failed request: 18 (RRAddOutputMode) Serial number of failed request: 25 Current serial number in output stream: 26 

将该新模式添加到VGA1工作正常,但我不使用该VGA1输出。

您可以使用xrandr向Ubuntu 12.04添加缺少的分辨率。

首先,使用cvt创建新的分辨率模式。

 sudo cvt 1920 1080 60 

部分输出应与此类似:“Modeline”1920x1080_60.00“173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync + vsync”(无引号)。

接下来,声明一种新的分辨率模式。

 sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync 

接下来,找出您的video设备的名称。

 sudo xrandr -q 

我被命名为“Virtual1”(运行虚拟机)。 一旦知道了设备的名称,就可以最终将新的分辨率模式添加到设备/系统中。

 sudo xrandr --addmode Virtual1 1920x1080_60.00 

请在此处的“添加未检测到的分辨率”部分中查看更多信息: https : //wiki.ubuntu.com/X/Config/Resolution/#Adding_undetected_resolutions

这个链接对我有帮助。

简而言之:像你一样运行xrandr和cvt,然后创建以下文件:

 /usr/share/X11/xorg.conf.d/10-monitor.conf 

在文件中根据您的规格更改<>中的参数:

 Section "Monitor" Identifier "Monitor0"  EndSection Section "Screen" Identifier "Screen0" Device "" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 Modes "" EndSubSection EndSection