玩 OpenGL 游戏后分辨率卡住

玩 OpenGL 游戏后分辨率卡住

我以前用“-opengl”选项启动游戏《冰封王座》(使用 wine)。当我进入游戏时,分辨率会改变,退出游戏后就会恢复。

但这次出现了问题,重启了好几次电脑,分辨率还是没法恢复,Ubuntu 面板和登录窗口都正常, nvidia-settings还检测到分辨率是“1024 x 768”,但这个工具好像没用。截图-NVIDIA X 服务器设置: nvidia-设置

的结果兰德

   Screen 0: minimum 320 x 240, current 1024 x 768, maximum 1024 x 768
   default connected 1024x768+0+0 0mm x 0mm


   1024x768       50.0* 
   800x600        51.0     52.0     53.0  
   680x384        54.0     55.0  
   640x480        56.0  
   576x432        57.0  
   512x384        58.0  
   400x300        59.0     60.0     61.0  
   320x240        62.0  

/etc/X11/xorg.conf的配置:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@yellow)  Fri Apr  9 11:51:21 UTC 2010


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       28.0 - 55.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Entry Graphics"
EndSection

Section "Screen"

# Removed Option "metamodes" "1024x768 +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "1024x768_60 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

答案1

您的 xorg.conf 文件包含“metamodes”选项。删除该行,如果您注销并重新登录,它应该会恢复正常。

为了获得最佳效果(或者如果这不起作用),请删除 xorg.conf,重新启动计算机(在启动前按 ESC 以获取启动菜单),进入恢复模式,选择 root 终端,然后键入nvidia-xconfig并按回车键。这样应该会重置您的 xorg.conf 文件。

现在输入 reboot 并回车以重新启动系统,一切都会好起来。

相关内容