更改,定制显示器的分辨率,有两种方法。
法一:
一:想设置屏幕分辨率,首先得知道显示器的硬件支持参数。
下面,通过三种不同的方法,可以得到参数
1,查看显示的说明书。这是最直接的方法,但古老了。
2,使用ddcprobe命令查看。如果提示需要安装软件,则安装即可。
Monitorrange 参数,就是水平扫描频率和垂直扫描频率。
3,运行xvidtune 命令
退出xvidtune时(可以按Ctrl+Shift+z),会显示参数 ,我的参数如下
cyq@cyq-desktop:~$ xvidtune
Vendor: Generic LCD Display, Model: LCD Panel 1440x900
Num hsync: 1, Num vsync: 1
hsync range 0: 31.50 - 56.00
vsync range 0: 56.00 - 65.00
二,备份xorg.conf 为下一步修改服务。
~$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
注意上面的命令中的x,有的是大写X
这样备份完之后,如果下面的操作有误,可以还原。
三,修改xorg.conf
用vi 或者 gedit 打开 xorg.conf
$ sudo gedit /etc/X11/xorg.conf
我的xorg.conf 文件如下:
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
EndSection
找到 Section "Monitor"填写上面获得的参数
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1440x900"
Horizsync 31.5-56.0 #垂直
Vertrefresh 56.0 - 65.0 #水平
找到下面的 Section "Screen" 根据需要修改,我的修改如下:
Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1440 900
Modes "1440x900@60" "1280x800@60" "1280x720@60" "1280x768@60" "800x600@60" "800x600@56"
EndSubSection
EndSection
法二:
如果认为上面的过于复杂,可用下面的命令
$ sudo dpkg-reconfigure xserver-xorg
然后根据提示,进一步设置即可。
声明:本文档可以随意更改,但必须署名原作者
作者:凤凰舞者 qq:578989855