linux 修改分辨率lcd_如何在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

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

sudo xrandr -q

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

sudo xrandr --addmode Virtual1 1920x1080_60.00

次佳解决方案

简而言之:像你一样运行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

参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值