如何将 1280x1024 屏幕分辨率添加到 nVidia X 服务器设置中?

如何将 1280x1024 屏幕分辨率添加到 nVidia X 服务器设置中?

我对 Ubuntu(17.04 版)和 Linux 还不是很熟悉,而且在分辨率方面我遇到了一个非常令人沮丧的问题。我想将分辨率设置为 1280x1024 60Hz,但我在 nVidia X 服务器设置中没有看到该选项。我的显示器上的最佳分辨率是 1152x870。不知何故,我之前曾将其设置为 1280x1024 60Hz,直到出现问题,我不得不重新安装 Ubuntu。

我已经尽我所能,从调整 xorg.conf 文件到使用 xrander。调整 xorg.conf 并没有改变任何东西,甚至使情况变得更糟。当我使用 xrandr 时,我总是收到错误消息(见下文)

以下是我尝试 xrandr 时发生的情况:

warangel@MyPC:~$ cvt 1280 1024 60

# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 
1034 1063 -hsync +vsync

然后当我使用 xrandr newmode 时:

sudo xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  
1024 1027 1034 1063 -hsync +vsync
[sudo] password for warangel:

当我添加 root 密码时,一切顺利。

Screen 0: minimum 8 x 8, current 1152 x 864, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected primary 1152x864+0+0 (normal left inverted right x 
axis y axis) 0mm x 0mm
    1024x768      60.00 +
    1360x768      59.96    59.80  
    1152x864      60.00* 
    800x600       72.19    60.32    56.25  
    680x384       59.96    59.80  
    640x480       59.94  
    512x384       60.00  
    400x300       72.19  
    320x240       60.05  
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
    1280x1024_60.00 (0x281) 109.000MHz -HSync +VSync
          h: width  1280 start 1368 end 1496 total 1712 skew 0 clock  
    63.67KHz
          v: height 1024 start 1027 end 1034 total 1063 clock 59.89Hz

但这里就出了问题。当我输入:

sudo xrandr --addmode VGA-0 "1280x1024_60.00"

我得到:

X Error of failed request:  BadMatch (invalid parameter attributes)
Major opcode of failed request:  140 (RANDR)
Minor opcode of failed request:  18 (RRAddOutputMode)
Serial number of failed request:  29
Current serial number in output stream:  30

我束手无策。我不知道我做错了什么!这个错误信息是什么意思?我不明白!

有人能帮我解决这个问题吗?我将不胜感激。

编辑:这是我的 xorg.conf 文件当前的样子,它仍然没有像在重新安装 Ubuntu 之前那样给我 1280x1024 的分辨率:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 381.09  (buildd@lcy01-36)  Sat Apr  8 
10:34:38 UTC 2017

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

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

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: builtin, VertRefresh source: builtin
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-1"
    HorizSync       28.0 - 55.0
    VertRefresh     43.0 - 72.0
    Modeline       "1280x1024_60.00"  109.00  1280 1368 1496 1712  
                    1024 1027 1034 1063 -hsync +vsync
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 240"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "1280x1024 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
        Modes          "1280x1024"
    EndSubSection
EndSection

答案1

我找到了一篇帖子:https://ubuntuforums.org/archive/index.php/t-2290004.html从 2015 年开始提到:

The problem is that NVIDIA driver has a BUG in EDID, and cannot use this
information rightly. After search a lot how to override this problem
without success, I just send a nice GTFO to NVIDIA driver and installed the
Nouveaul driver.

这对你有帮助吗?

答案2

您可以编辑您的 xorg.conf。

VendorName     "Unknown"**<===edit this**
ModelName      "CRT-1"
HorizSync       28.0 - 55.0
VertRefresh     43.0 - 72.0

将“未知”更改为您的显示器型号。

保存并重新启动。

然后您可以在 nvidia x 服务器中更改您的分辨率。

答案3

我已经尝试了 5 年更改 Nvidia 默认设置,但无济于事。请确保为您的显卡安装正确的驱动程序版本,而不是更高版本 [就我而言,只有 340 驱动程序与我的 Nvidia 显卡兼容]。然后您应该拥有 Nvidia GUI。Nvidia 默认为显示器的最高分辨率 [就我而言为 4k] 和预设选项。我更改预设选项的唯一可靠方法是每次启动机器时都使用 GUI。虽然很麻烦,但至少只需要几秒钟。

相关内容