安装 Nvidia 340 驱动程序后设置正确分辨率时出错

安装 Nvidia 340 驱动程序后设置正确分辨率时出错

我有 ubuntu 14.04 并安装了 Nvidia 推荐的驱动程序,但分辨率仍然是 1360x768,我需要更改为 1920x1080

这是我安装的驱动程序

在此处输入图片描述

Xrandr 值如下

mohamed@mohamed-Work:~$ xrandr
Screen 0: minimum 8 x 8, current 1360 x 768, maximum 8192 x 8192
DVI-I-0 connected primary 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0 +
   1360x768       60.0*    59.8  
   1152x864       60.0  
   800x600        72.2     60.3     56.2  
   680x384        60.0     59.8  
   640x480        59.9  
   512x384        60.0  
   400x300        72.2  
   320x240        60.1  
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)

我所做的就是创造这样的新模式

xrandr --newmode "1920x1080"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

然后像这样添加新模式

xrandr --addmode DVI-I-0 1920x1080_60.00

但我收到以下错误

mohamed@mohamed-Work:~$ xrandr --addmode DVI-I-0 1920x1080_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:  33
  Current serial number in output stream:  34

以及下面列出的我的 xorg.conf 文件

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 331.20  (buildd@roseapple)  Mon Feb  3 15:07:22 UTC 2014

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

Section "Files"
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-0"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    ModeLine       "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
    ModeLine       "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    ModeLine       "1360x768" 72.000 1360 1408 1440 1520 768 771 781 790 +hsync -vsync
    ModeLine       "1152x864" 81.620 1152 1216 1336 1520 864 865 868 895 -hsync +vsync
    ModeLine       "800x600" 50.000 800 856 976 1040 600 637 643 666 +hsync +vsync
    ModeLine       "680x384" 36.000 680 704 720 760 384 385 390 395 +hsync -vsync doublescan
    ModeLine       "640x480" 25.175 640 656 752 800 480 490 492 525 -hsync -vsync
    ModeLine       "512x384" 32.500 512 524 592 672 384 385 388 403 -hsync -vsync doublescan
    ModeLine       "400x300" 25.000 400 428 488 520 300 318 321 333 +hsync +vsync doublescan
    ModeLine       "320x240" 12.587 320 328 376 400 240 245 246 262 -hsync -vsync doublescan
    ModeLine       "nvidia-auto-select" 65.000 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro FX 1800"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "1920x1080"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    Option "ModeValidation" "AllowNonEdidModes, NoVirtualSizeCheck, NoMaxPClkCheck, NoWidthAlignmentCheck, NoExtendedGpuCapabilitiesCheck"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

答案1

我找到了一个解决方案关联

像这样打开文件 xorg.conf

sudo nano /etc/X11/xorg.conf

编辑设备部分,使其类似于上面的链接

相关内容