Linux 求助。设置分辨率?

本文介绍如何在X终端下通过编辑xorg.conf文件来设置显示器的分辨率及刷新率。包括对行频、场频的设置以及首选和可选分辨率的具体配置方法。

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

1、X终端下显示器分辨率及刷新率设置
  刷新率和分辨率可以在/etc/X11/xorg.conf中设置

(1)对显示器行频(水平分辨率)和场频(垂直分辨率)的设置 

  在xorg.conf中有类似一段: 
  Section "Monitor" 
  Identifier "Monitor0" 
  VendorName "Monitor Vendor" 
  ModelName "206STUDIO" 
  HorizSync 30.0 - 70.0 
  VertRefresh 50.0 - 160.0 
  EndSection 
  其中HorizSync,VertRefresh分别是显示器行频(水平分辨率)和场频(垂直分辨率)的设置 

应该根据显示器的性能进行设置,他们的值决定了显示分辨率和刷新频率可能取值的范围。 

(2)对首先和可选分辨率的设置 
  在xorg.conf中有类似一段: 
  Section "Screen" 
  Identifier "Screen0" 
  Device "Videocard0" 
  Monitor "Monitor0" 
  DefaultDepth 24 
  SubSection "Display" 
  Depth 24 
  Modes "1024x768" "800x600" "640x480" "1280x1024" 
  EndSubSection 
  EndSection 
  行 : 
  Modes "1024x768" "800x600" "640x480" 
  设置了三种可选的分辨率,排在最前面的就是首选的分辨率,也就是一般生效的分辨率。X启动时如果首选的分辨率无效,比如过高,会依次尝试后面的分辨率。

下面是具体对应的的xort.conf文件的内容

# /.../
# SaX generated X11 config file
# Created on: 2008-08-31T05:51:02+0800.
#
# Version: 7.1
# Contact: Marcus Schaefer <sax@suse.de>, 2005
# Contact: SaX-User list <https://lists.berlios.de/mailman/listinfo/sax-users>
#
# Automatically generated by [ISaX] (7.1)
# PLEASE DO NOT EDIT THIS FILE!
#

Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/local"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/URW"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
FontPath "/usr/X11R6/lib/X11/fonts/PEX"
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic"
FontPath "/usr/X11R6/lib/X11/fonts/latin2/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/latin2/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/latin2/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/latin2/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/latin7/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/baekmuk:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/japanese:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/kwintv"
FontPath "/usr/X11R6/lib/X11/fonts/truetype"
FontPath "/usr/X11R6/lib/X11/fonts/uni:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/CID"
FontPath "/usr/X11R6/lib/X11/fonts/ucs/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/ucs/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/ucs/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/hellas/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/hellas/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/hellas/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/hellas/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/misc/sgi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/xtest"
FontPath "/opt/kde3/share/fonts"
InputDevices "/dev/gpmdata"
InputDevices "/dev/input/mice"
EndSection

Section "ServerFlags"
Option "AllowMouseOpenFail" "on"
EndSection

Section "Module"
Load "dbe"
Load "type1"
Load "freetype"
Load "extmod"
Load "glx"
Load "v4l"
EndSection

Section "InputDevice"
Driver "kbd"
Identifier "Keyboard[0]"
Option "Protocol" "Standard"
Option "XkbLayout" "us"
Option "XkbModel" "pc104"
Option "XkbRules" "xfree86"
EndSection

Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Buttons" "5"
Option "Device" "/dev/input/mice"
Option "Name" "HP Virtual Keyboard"
Option "Protocol" "explorerps/2"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
HorizSync 31-48
Identifier "Monitor[0]"
ModelName "1024X768@60HZ"
Option "DPMS"
VendorName "--> VESA"
VertRefresh 50-60
UseModes "Modes[0]"
EndSection

Section "Modes"
Identifier "Modes[0]"
Modeline "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
Modeline "1024x768" 61.89 1024 1080 1184 1344 768 769 772 794
EndSection

Section "Screen"
DefaultDepth 16
SubSection "Display"
Depth 15
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
EndSection

Section "Device"
BoardName "ES1000 515E"
BusID "1:3:0"
Driver "radeon"
Identifier "Device[0]"
VendorName "ATI"
EndSection

Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
Option "Clone" "off"
Option "Xinerama" "off"
Screen "Screen[0]"
EndSection

Section "DRI"
Group "video"
Mode 0660
EndSection

Section "Extensions"
EndSection

Ubuntu 开机后出现花屏的情况可能是由于显卡驱动问题、分辨率设置不当或其他硬件兼容性引起的。以下是解决此问题的一些常见步骤: --- ### **解决方法** #### 1. **进入恢复模式** - 在启动时按住 `Shift` 键(对于UEFI系统可能需要按下 `Esc` 键),进入 GRUB 菜单。 - 选择“Advanced options for Ubuntu”,然后找到带有 `(recovery mode)` 的选项并回车。 #### 2. **调整显示分辨率** - 在恢复模式下,选择 “root” 模式以获得命令行权限。 - 编辑GRUB配置文件: ```bash sudo nano /etc/default/grub ``` - 找到这一行:`GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"` 将其改为:`GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"` - 这样可以禁用图形驱动程序的早期加载。 - 更新 GRUB 配置: ```bash sudo update-grub ``` #### 3. **安装或更新显卡驱动** - 如果问题是因显卡驱动引起,则可以通过终端安装适合的驱动程序。 - 使用以下命令查看可用的驱动列表: ```bash ubuntu-drivers devices ``` - 安装推荐的驱动程序(例如 NVIDIA 或 AMD 驱动): ```bash sudo apt install nvidia-driver-xxx # 根据提示替换 xxx 为具体版本号 ``` - 完成后重启计算机:`sudo reboot` #### 4. **切换桌面环境或窗口管理器** - 如果当前使用的 GNOME 环境有问题,可以尝试更换其他轻量级桌面环境如 XFCE、LXDE 等。 ```bash sudo apt install xubuntu-desktop # 示例:安装 Xfce ``` - 登录界面可以选择新的桌面会话。 #### 5. **检查显示器连接线缆** - 排查是否是因为物理连接松动导致画面异常,建议重新插拔 HDMI/VGA/DVI 线,并确认两端牢固无误。 --- 如果以上办法均未能解决问题,请进一步收集日志信息以便调试。运行以下命令导出错误详情: ```bash dmesg > ~/error_log.txt ``` 并将生成的日志上传至社区论坛求助专业人士分析原因。 --- **
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值