温馨提示×

Debian Compton配置中分辨率设置技巧

小樊
55
2025-08-28 02:08:32
栏目: 智能运维

在Debian Compton配置中设置分辨率,主要有以下两种方法:

  • 使用xrandr命令行工具
    1. 查看当前显示器支持的分辨率:在终端输入xrandr -q
    2. 若所需分辨率未列出,用cvt生成新模型线,如cvt 1920 1080,会输出类似Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync的内容。
    3. xrandr --newmode创建新模式,将上述模型线内容替换进去。
    4. xrandr --addmode将新模式添加到显示器,如xrandr --addmode HDMI-1 1920x1080_60.00HDMI-1替换为实际显示器名称)。
    5. xrandr --output设置新分辨率为当前分辨率,如xrandr --output HDMI-1 --mode 1920x1080_60.00
  • 永久设置(编辑配置文件)
    1. /etc/X11/xorg.conf文件不存在,用sudo Xorg -configure生成。
    2. 编辑该文件,添加类似以下内容:
Section "Monitor"
    Identifier "Configured Monitor"
    Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    Option "PreferredMode" "1920x1080_60.00"
EndSection
Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
EndSection
Section "Device"
    Identifier "Configured Video Device"
EndSection

0