在 Ubuntu 20.04 上玩游戏时专用 NVidia GPU 未运行

在 Ubuntu 20.04 上玩游戏时专用 NVidia GPU 未运行

所以我买了一台新的华硕 TUF Gaming FX705DT,绝对不想安装 Windows 10。我安装了 Ubuntu 20.04。Wi-Fi 驱动程序出了点小问题,通过它安装了 steam 和 War Thunder。我用 nouveau 运行游戏,结果崩溃了。所以,我不得不安装一个 NVidia 专有驱动程序。试过 418、430、440、450 和 455。它们都不能使游戏在 NVidia GPU 上运行,游戏在集成 GPU 上运行(给出 10-29 FPS)。前三个版本(418、430 和 440)提供了一个空白的 Nvidia X 服务器设置程序。另外两个(450 和 455)提供了一个没有 PRIME 的简短菜单。运行时出现nvidia-settings消息说 PRIME:是否支持?不支持。

我花了 10 多个小时尝试修复此问题,但至今无果。有人能帮帮我吗?

以下是我的规格:

System:
  Host: ASUS-FX705DT Kernel: 5.4.0-52-generic x86_64 bits: 64 
  Desktop: Gnome 3.36.4 Distro: Ubuntu 20.04.1 LTS (Focal Fossa) 
Machine:
  Type: Laptop System: ASUSTeK product: TUF Gaming FX705DT_FX705DT v: 1.0 
  serial: <superuser/root required> 
  Mobo: ASUSTeK model: FX705DT v: 1.0 serial: <superuser/root required> 
  UEFI: American Megatrends v: FX705DT.310 date: 12/24/2019 
Battery:
  ID-1: BAT0 charge: 64.3 Wh condition: 64.0/64.1 Wh (100%) 
CPU:
  Topology: Quad Core model: AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx 
  bits: 64 type: MT MCP L2 cache: 2048 KiB 
  Speed: 1249 MHz min/max: 1400/2300 MHz Core speeds (MHz): 1: 1229 2: 1279 
  3: 1252 4: 1250 5: 1225 6: 1227 7: 1225 8: 1224 
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia 
  v: 450.80.02 
  Device-2: AMD Picasso driver: amdgpu v: kernel 
  Display: x11 server: X.Org 1.20.8 driver: amdgpu,ati,nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~120Hz 
  OpenGL: renderer: AMD RAVEN (DRM 3.35.0 5.4.0-52-generic LLVM 10.0.0) 
  v: 4.6 Mesa 20.0.8 
Audio:
  Device-1: AMD Family 17h HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.4.0-52-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  driver: r8169 
  IF: enp2s0 state: down mac: d4:5d:64:64:1b:03 
  Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter 
  driver: rtl8821ce 
  IF: wlp4s0 state: up mac: d8:c0:a6:30:5b:c7 
Drives:
  Local Storage: total: 476.94 GiB used: 58.89 GiB (12.3%) 
  ID-1: /dev/nvme0n1 vendor: Micron model: 2200V MTFDHBA512TCK 
  size: 476.94 GiB 
Partition:
  ID-1: / size: 467.96 GiB used: 58.88 GiB (12.6%) fs: ext4 
  dev: /dev/nvme0n1p2 
Sensors:
  System Temperatures: cpu: 52.1 C mobo: N/A gpu: amdgpu temp: 52 C 
  Fan Speeds (RPM): cpu: 2400 
Info:
  Processes: 315 Uptime: 11m Memory: 7.65 GiB used: 1.99 GiB (26.0%) 
  Shell: bash inxi: 3.0.38 

nvidia-smi输出:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1650    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   46C    P8     1W /  N/A |     11MiB /  3911MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       837      G   /usr/lib/xorg/Xorg                  4MiB |
|    0   N/A  N/A      1410      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

nvidia-settings输出:

(nvidia-settings:6231): GLib-GObject-CRITICAL **: 23:55:47.314: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

ERROR: nvidia-settings could not find the registry key file. This file should
       have been installed along with this driver at
       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
       application profiles will continue to work, but values cannot be
       prepopulated or validated, and will not be listed in the help text.
       Please see the README for possible values and descriptions.

** Message: 23:55:47.367: PRIME: No offloading required. Abort
** Message: 23:55:47.367: PRIME: is it supported? no

相关内容