X11如何设置最佳分辨率

秀秀桌面并和大家分享一下自己的经验。

版主: lionux天地乾坤

回复
f5b
锆 Zr
帖子: 643
注册时间: 2011-10-22 20:43

X11如何设置最佳分辨率

帖子 f5b » 2013-11-20 12:12

X11如何设置最佳分辨率

仔细看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


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

f5b
锆 Zr
帖子: 643
注册时间: 2011-10-22 20:43

Re: X11如何设置最佳分辨率

帖子 f5b » 2013-11-25 15:22

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

才需要这些操作
f5b 写了:X11如何设置最佳分辨率

仔细看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


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

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 0 访客