virtualbox下找不到1366x768显示模式

在virtualbox 5.0.2下运行gentoo linux,已经设置了:

VBoxManage.exe setextradata linux CustomVideoMode1 1366x768x32

VBoxManage.exe controlvm linux setvideomodehint 1366 768 32

虽然文本模式下可以运行在1366x768,但是进行X,xrandr只能显不一系列4:3的显示模式:

Screen 0: minimum 64 x 64, current 1024 x 768, maximum 32766 x 32766

VGA-0 connected primary 1024x768+0+0 0mm x 0mm

   800x600       60.00 +  60.00  

   2560x1600     60.00  

   2560x1440     60.00  

   2048x1536     60.00  

   1920x1600     60.00  

   1920x1080     60.00  

   1600x1200     60.00  

   1680x1050     60.00  

   1400x1050     60.00  

   1280x1024     60.00  

   1024x768      60.00  

   640x480       60.00  

1、首先运行cvt 1366 768 查找相关参数

# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz

Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

2、添加新的显示模式:

xrandr --newmode "1366x768" 85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

3、将显示模式添加到输出设备:

xrandr --addmode VGA-0 "1366x768" 

4、将VGA-0分辨率指定为刚添加的条目。

xrandr --ouput VGA-0 --mode "1366x768"

5、以上的修改只能在当前会话生效,写到一个脚本,以备以后使用。

6、网上有的说在xorg.conf加上相应条目,可以永久生效,但没有成功,我的xorg.conf

Section "Monitor"

        Identifier "Default Monitor"

        Modeline "1366x768"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

        Option "PreferredMode" "1366x768"

EndSection

Section "Device"

        Identifier  "Default Device"

EndSection

Section "Screen"

        Identifier  "Default Screen"

        Monitor     "Default Monitor"

        Device      "Default Device"

        DefaultDepth 24

        SubSection "Display"

                Depth 24

                Modes "1366x768" 

        EndSubSection

EndSection

Section "ServerLayout"

        Identifier  "Default Layout"

        Screen      "Default Screen"

EndSection


2016.1.29补充:

将配置文件中的Default Monitor改为VGA-0,可以正确设置分辨率。

转载于:https://my.oschina.net/u/136074/blog/498761

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值