无法在内置屏幕上使用 GUI,只能在 HDMI 端口上使用

无法在内置屏幕上使用 GUI,只能在 HDMI 端口上使用

Ubuntu 启动后,我无法使用笔记本电脑的内置显示器作为 GUI 桌面。当我使用 Ubuntu 20.4.1 LTS 时,内置显示器和外接显示器都可以工作,我还可以使用WIN+P来扩展桌面。我现在有 Ubuntu 22.04.1 LTS。升级后,我不得不重新安装 NVIDIA 驱动程序。

我有一块英特尔集成显卡和一块 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

添加了 的输出。此外,我意识到NVIDIA X Server Settings 中 xrandr --listproviders不再有名为的条目:PRIME ProfilesNVIDIA X 服务器 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

相关内容