ubnutu设置设置屏幕分辨率

本文介绍如何在Ubuntu系统中手动配置显示器的分辨率,包括使用gtf命令获取所需的分辨率参数,并将这些参数添加到xorg.conf文件中,以确保系统启动时能够正确地应用所需的分辨率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

当然我知道ubnutu有图形用户界面可以设置分辨率,但是此文将的是自己手动设置。

Ubuntu 9.04 did not detect the native resolution of my new LCD monitor which was 1440 x 900.

Fix :

1. Get the modeline for the required resolution + refresh rate using the gtf command.

1desktop:~$ gtf 1440 900 75
2 
3  # 1440x900 @ 75.00 Hz (GTF) hsync: 70.50 kHz; pclk: 136.49 MHz
4  Modeline "1440x900_75.00"  136.49  1440 1536 1688 1936  900 901 904940  -HSync +Vsync

The modeline is to be added to the xorg.conf file at /etc/X11/xorg.conf
Take a backup of the file before editing it.

On a fresh Ubuntu installation the file may look small like this :

1#Some comments on top
2Section "Monitor"
3 Identifier "Configured Monitor"
4EndSection
5 
6Section "Screen"
7 Identifier "Default Screen"
8 Monitor  "Configured Monitor"
9 Device  "Configured Video Device"
10EndSection
11 
12Section "Device"
13 Identifier "Configured Video Device"
14EndSection
15 
16Section "ServerFlags"
17 Option "DontZap" "True"
18EndSection

Simply add the modeline to the monitor section like this :

1Section "Monitor"
2 Identifier "Configured Monitor"
3 Modeline "1440x900_75.00"  136.49  1440 1536 1688 1936  900 901 904 940  -HSync +Vsync
4 Option          "PreferredMode" "1440x900_75.00"
5EndSection
6 
7Section "Screen"
8 Identifier "Default Screen"
9 Monitor  "Configured Monitor"
10 Device  "Configured Video Device"
11EndSection
12 
13Section "Device"
14 Identifier "Configured Video Device"
15EndSection
16 
17Section "ServerFlags"
18 Option "DontZap" "True"
19EndSection

The option “PreferredMode” “1440x900_75.00″ is used so that it becomes the default resolution on gnome, KDE desktops and GDM and KDM i.e. the login screen. If this option is not used then there may be issues such that resolution after reboot or relogin reverts to a default like 1280 x 1200 as discussed here Bug.

Another fix could to be reconfigure X like : sudo dpkg-reconfigure xserver-xorg.

References :
1. Ubuntu Resolution Configuration
2. Forum

转载于:https://www.cnblogs.com/rollenholt/articles/2590990.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值