更改系統預設顯示卡

更改系統預設顯示卡

我目前在我的筆記本 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(雷諾阿,LLVM 15.0.6,DRM 3.47,5.19.0-35-generic)”

所以我可以看出它正在被識別,但是當我訪問視頻遊戲(在本例中為異星工廠)並將精靈圖形質量修改為“高”時,它會顯示“我們檢測到您的顯示卡只有512mb內存......” (即使當我嘗試運行它時右鍵>使用專用顯示卡運行

所以我想知道是否有一種方法可以正確設定 xorg.conf 檔案以使我的專用顯示卡成為系統的預設顯示卡,或者也許有一種更好的方法來解決這種情況,從而作為更好的解決方案。

相關內容