無法在內建螢幕上使用 GUI,只能在 HDMI 連接埠上使用

無法在內建螢幕上使用 GUI,只能在 HDMI 連接埠上使用

Ubuntu 啟動後,我無法將筆記型電腦的內部顯示器用作 GUI 桌面。當我使用 Ubuntu 20.4.1 LTS 時,內部顯示器和外部顯示器都可以工作,而且我還可以使用WIN+P來擴展我的桌面。我現在有 Ubuntu 22.04.1 LTS。升級後我必須重新安裝 NVIDIA 驅動程式。

我有一個 Intel 整合式圖形晶片和一個 NVIDIA GeForce 1050 行動 GPU。我已經安裝了 NVIDIA 驅動程式(版本 515.65.01),並且可以使用我的第二台顯示器,該顯示器可以透過 HDMI(連接到 NVIDIA GPU 卡)連接。一切運作正常,除了 Ubuntu 無法辨識內部螢幕。當我使用並重新啟動切換到英特爾圖形晶片時,sudo prime-select intel我最終進入終端並startx退出並出現錯誤。

如果我在沒有連接任何 HDMI 的情況下啟動筆記型電腦,它可能會掛在檔案系統檢查上。如果我隨後透過 HDMI 連接螢幕,我會在該顯示器上看到登入螢幕,並且內建螢幕會變黑。

當我使用 NVIDIA X Server GUI 更改某些設定(更改了檔案)時,問題可能就開始出現了/etc/X11/xorg.conf

我已經嘗試刪除/etc/X11/xorg.conf然後使用 重新生成它sudo nvidia-xconfig,但沒有任何更改(文件的佈局除外xorg.conf)。

編輯

當我啟動Windows時,筆記型電腦螢幕工作正常(我有雙啟動,但只真正使用Ubuntu),所以我認為這一定是我弄錯了一些驅動程式設定。

編輯2

添加了 的輸出xrandr --listproviders。此外,我意識到PRIME ProfilesNVIDIA X 伺服器設定中不再有任何命名的條目: NVIDIA X Server GUI 的螢幕截圖

調試文件和輸出

目前的xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 515.65.01

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

上一篇xorg.conf(也有顯示問題):

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 515.65.01

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: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Philips PHL 245E1"
    HorizSync       30.0 - 114.0
    VertRefresh     48.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1050"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "nvidia-auto-select +1920+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

lspci -k 的輸出

...

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
    DeviceName: Intel Kabylake HD Graphics GT2
    Subsystem: Hewlett-Packard Company HD Graphics 630
    Kernel driver in use: i915
    Kernel modules: i915

...

01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
    DeviceName: NVIDIA GeForce GTX 1050
    Subsystem: Hewlett-Packard Company GP107M [GeForce GTX 1050 Mobile]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

...

xrandr 僅報告我的外部顯示器:

Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 32767 x 32767
HDMI-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   2560x1440     59.95*+  74.97  
   1920x1080     60.00    59.94    50.00    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1440     59.91  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  

輸出xrandr --listproviders

Providers: number : 1
Provider 0: id: 0x1b7 cap: 0x1, Source Output crtcs: 4 outputs: 1 associated providers: 0 name:NVIDIA-0

相關內容