免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9802 | 回复: 4
打印 上一主题 下一主题

[OpenBSD] X11如何设置最佳分辨率 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-11-20 12:14 |只看该作者 |倒序浏览
本帖最后由 f5b 于 2013-11-25 15:21 编辑

只有>>>
# startx 进入X图形界面之后,看起来不是显示器默认最佳分辨率
# xrandr X界面下输入此命令看到的默认值也不是最佳分辨率

才需要以下操作

仔细看http://www.openbsd.org/faq/faq11.html

特别是“如何退出X”,首选CTRL-ALT-Backspace,也要保留ssh服务开放登陆
This might be a really good time to talk about ways of exiting X when started in this way. In order of preference:

    CTRL-ALT-Backspace: This hopefully causes X to immediately terminate, along with all X applications that are running. Of course, during the configuration process, you don't have any applications running, so this is not a problem (and in fact, at this point, this is your best way to exit X).
    SSH into the box, and "pkill Xorg", which may kill the X process, and may return you to a usable console.
    SSH into the box and reboot it.
    Reset or power button. Sometimes things go really bad. Yes, it is usually good to get X running before you load critical applications on the system. Sometimes, a bad X configuration will hang the entire machine to the point that only a hard reset will resolve the problem.

Fortunately for us, CTRL-ALT-Backspace does the job here, and we are returned to a command prompt. So now we need to see if we can figure out what is wrong. First, we should look at what Xorg thinks is going on, and that is recorded in the file /var/log/Xorg.0.log. In this case, it appears that X thinks all is running fine, there are no obviously significant errors shown in the log (lines that start with an "(EE)" are errors).


个人总结


1. 生成基本的xorg.conf.new文件

# X -configure

文件自动生成在 /root/xorg.conf.new

测试xorg.conf.new

# X -config xorg.conf.new     ## 确定鼠标可以移动,CTRL-ALT-Backspace退出X


2. 设置显示器的最佳分辨率

生成最佳分辨率参数
# gtf 1600 1200 60       ###指定目标分辨率和刷新率,注意空格

  # 1600x1200 @ 60.00 Hz (GTF) hsync: 74.52 kHz; pclk: 160.96 MHz
  Modeline "1600x1200_60.00"  160.96  1600 1704 1880 2160  1200 1201 1204 1242  -HSync +Vsync

编辑xorg.conf.new,
把 “Modeline …… ”整行添加到 Section "Monitor"



再测试xorg.conf.new

# X -config xorg.conf.new     ## 确定鼠标还可以移动,CTRL-ALT-Backspace退出X



# cp /root/xorg.conf.new /etc/X11/xorg.conf


# startx


这样显示器就不需要依赖于任何桌面软件的设置就能以最佳分辨率正常显示了

论坛徽章:
71
15-16赛季CBA联赛之同曦
日期:2018-08-23 15:41:42辰龙
日期:2014-08-15 09:07:43狮子座
日期:2014-06-03 13:55:33亥猪
日期:2014-06-02 11:17:08巨蟹座
日期:2014-05-06 10:02:03午马
日期:2014-05-04 08:18:27亥猪
日期:2014-04-29 11:11:32技术图书徽章
日期:2014-04-24 15:51:26技术图书徽章
日期:2014-04-17 11:01:53辰龙
日期:2014-04-15 12:45:46亥猪
日期:2014-04-11 09:06:23射手座
日期:2014-04-01 15:28:10
2 [报告]
发表于 2013-11-20 16:39 |只看该作者
不错咯      

论坛徽章:
0
3 [报告]
发表于 2013-11-20 18:47 |只看该作者
顺便贴上FreeBSD 改变控制台的分辨率的方法:

将下面两行加入内核配制文件中,重新建立新内核!
options    VESA         
options    SC_PIXEL_MODE   

# vidcontrol -i  mode 查看所支持的模式然后用:
# vidcontrol  MODE_模式编号    如: MODE_280

# vidcontrol -g 100x37 VESA_800x600
或在/etc/rc.conf中加入allscreens_flags="-g 100x37 VESA_800x600"
启动的时候就可以变成800x600了。

论坛徽章:
0
4 [报告]
发表于 2013-11-22 17:18 |只看该作者
多謝分享!

论坛徽章:
48
15-16赛季CBA联赛之青岛
日期:2021-01-07 13:41:2315-16赛季CBA联赛之上海
日期:2020-12-01 18:02:0720周年集字徽章-20	
日期:2020-10-28 14:14:2620周年集字徽章-20	
日期:2020-10-28 14:04:3015-16赛季CBA联赛之天津
日期:2020-10-18 22:51:412016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2015-12-22 13:30:48操作系统版块每日发帖之星
日期:2015-12-07 06:20:00操作系统版块每日发帖之星
日期:2015-09-04 06:20:002015亚冠之德黑兰石油
日期:2015-08-05 18:46:082015年亚洲杯之巴勒斯坦
日期:2015-04-19 10:42:502015年亚洲杯之巴林
日期:2015-04-09 08:03:23
5 [报告]
发表于 2013-11-23 17:00 |只看该作者
谢谢分享,收藏学习~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP