我目前在笔记本电脑 Lenovo Gaming 15AH05 中使用 Ubuntu 22.04,没有额外的显示器。最近我安装了 Nvidia 驱动程序,当我运行命令“nvidia-smi”时,输出如下:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05 Driver Version: 525.85.05 CUDA Version: 12.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 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 45C P8 3W / 50W | 6MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2505 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------+
我还使用命令“nvidia-xconfig”创建了一个非常默认的 xorg.conf 文件,并产生了以下结果:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 525.85.05
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
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"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
这是命令“lspci | grep VGA”的结果:
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c6)
现在,当我访问设置 > 详细信息 > 图形上面写着:“NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] / RENOIR (renoir、LLVM 15.0.6、DRM 3.47、5.19.0-35-generic)”
所以我知道它被识别了,但是当我访问一个视频游戏(在本例中是 Factorio)并将精灵图形质量修改为“高”时,它会说“我们检测到您的显卡只有 512mb 内存......”(即使我尝试使用右键点击>使用独立显卡运行)
所以我想知道是否有办法正确设置 xorg.conf 文件,使我的专用显卡成为系统的默认显卡,或者也许有更好的方法来解决这种情况,从而提供更好的解决方案。