检测到第二个屏幕但黑屏(Xubuntu 20.04,Nvidia gpu)

检测到第二个屏幕但黑屏(Xubuntu 20.04,Nvidia gpu)

大家晚上好,我是 Ubuntu 新手。我几乎成功安装了 Xubuntu 20.04。我说几乎是因为我无法让外接屏幕工作。很难让它被识别(Nvidia 驱动程序 455 无法做到这一点)。我降级到驱动程序 450:屏幕被识别但变黑。

有人有解决方案吗?如果您需要更具体的提示,请不要犹豫。

希望以下内容能有所帮助:)

此致,

吉米

    j@j-Nitro-AN515-44:~$ lspci -vnn | grep -A12 '\''[030[02]\]' | grep -Ei "vga|3d|display|kernel"
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1f95] (rev a1) (prog-if 00 [VGA controller])
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [1002:1636] (rev c7) (prog-if 00 [VGA controller])
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu
j@j-Nitro-AN515-44:~$

j@j-Nitro-AN515-44:~$ uname -a
Linux s-Nitro-AN515-44 5.8.0-33-generic #36~20.04.1-Ubuntu SMP Wed Dec 9 17:01:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
j@j-Nitro-AN515-44:~$ 

j@j-Nitro-AN515-44:~$ xrandr
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.01*+
   1680x1050     60.01  
   1280x1024     60.01  
   1440x900      60.01  
   1280x800      60.01  
   1280x720      60.01  
   1024x768      60.01  
   800x600       60.01  
   640x480       60.01  
HDMI-1-0 connected 1920x1080+1920+0 531mm x 299mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x720      60.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    72.81    59.94  
j@j-Nitro-AN515-44:~$ 

j@j-Nitro-AN515-44:~$ dpkg -l | grep -v ^ii
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom                                       Version                               Architecture Description
+++-=========================================-=====================================-============-======================================================================================================
rc  libnvidia-compute-455:amd64               455.38-0ubuntu0.20.04.1               amd64        NVIDIA libcompute package
rc  libpython2.7-minimal:amd64                2.7.18-1~20.04                        amd64        Minimal subset of the Python language (version 2.7)
rc  linux-image-5.4.0-42-generic              5.4.0-42.46                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-54-generic              5.4.0-54.60                           amd64        Signed kernel image generic
rc  linux-modules-5.4.0-42-generic            5.4.0-42.46                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-54-generic            5.4.0-54.60                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.4.0-42-generic      5.4.0-42.46                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.4.0-54-generic      5.4.0-54.60                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-nvidia-455-5.4.0-54-generic 5.4.0-54.60                           amd64        Linux kernel nvidia modules for version 5.4.0-54
rc  nvidia-compute-utils-455                  455.38-0ubuntu0.20.04.1               amd64        NVIDIA compute utilities
rc  nvidia-dkms-455                           455.38-0ubuntu0.20.04.1               amd64        NVIDIA DKMS package
rc  nvidia-kernel-common-455                  455.38-0ubuntu0.20.04.1               amd64        Shared files used with the kernel module
rc  python2.7-minimal                         2.7.18-1~20.04                        amd64        Minimal subset of the Python language (version 2.7)
j@j-Nitro-AN515-44:~$ 

j@j-Nitro-AN515-44:~$ dpkg -l | grep nvidia
ii  libnvidia-cfg1-450:amd64                  450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-450                      450.80.02-0ubuntu0.20.04.2            all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-450:amd64               450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA libcompute package
ii  libnvidia-compute-450:i386                450.80.02-0ubuntu0.20.04.2            i386         NVIDIA libcompute package
rc  libnvidia-compute-455:amd64               455.38-0ubuntu0.20.04.1               amd64        NVIDIA libcompute package
ii  libnvidia-decode-450:amd64                450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-450:i386                 450.80.02-0ubuntu0.20.04.2            i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-450:amd64                450.80.02-0ubuntu0.20.04.2            amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-450:i386                 450.80.02-0ubuntu0.20.04.2            i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-450:amd64                 450.80.02-0ubuntu0.20.04.2            amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-450:amd64                  450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-450:i386                   450.80.02-0ubuntu0.20.04.2            i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-450:amd64                    450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-450:i386                     450.80.02-0ubuntu0.20.04.2            i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-450:amd64                  450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-450:i386                   450.80.02-0ubuntu0.20.04.2            i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
rc  linux-modules-nvidia-455-5.4.0-54-generic 5.4.0-54.60                           amd64        Linux kernel nvidia modules for version 5.4.0-54
ii  linux-modules-nvidia-455-5.4.0-58-generic 5.4.0-58.64                           amd64        Linux kernel nvidia modules for version 5.4.0-58
ii  nvidia-compute-utils-450                  450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA compute utilities
rc  nvidia-compute-utils-455                  455.38-0ubuntu0.20.04.1               amd64        NVIDIA compute utilities
ii  nvidia-dkms-450                           450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA DKMS package
rc  nvidia-dkms-455                           455.38-0ubuntu0.20.04.1               amd64        NVIDIA DKMS package
ii  nvidia-driver-430                         440.100-0ubuntu0.20.04.1              amd64        Transitional package for nvidia-driver-440
ii  nvidia-driver-440                         450.80.02-0ubuntu0.20.04.2            amd64        Transitional package for nvidia-driver-450
ii  nvidia-driver-450                         450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-450                  450.80.02-0ubuntu0.20.04.2            amd64        Shared files used with the kernel module
rc  nvidia-kernel-common-455                  455.38-0ubuntu0.20.04.1               amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-450                  450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA kernel source package
ii  nvidia-prime                              0.8.14                                all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                           440.82-0ubuntu0.20.04.1               amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-450                          450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                   0.18build1                            all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-450             450.80.02-0ubuntu0.20.04.2            amd64        NVIDIA binary Xorg driver
j@j-Nitro-AN515-44:~$ 

配置:Acer Nitro 5 AN515-44 | Xubuntu 20.04 | XFCE 4.14 | 内核 5.8.0-33 | AMD Ryzen 5 4600H | 8 核 | GTX 1650 TI (4 核)、AMD Radeon Vega 6 和 Optimus

答案1

我自己并不是高级用户,但我也许能够提供帮助。

首先:你是如何安装驱动程序的?你使用软件与更新的“附加驱动程序”选项卡?

其次:您是否检查过哪个 GPU 处于活动状态?为此,请prime-select query在终端中使用。要切换到独立 GPU,请使用sudo prime-select nvidia。在某些发行版上,您需要注销并重新登录以应用更改,甚至重新启动。

最后:无论选择哪种 GPU,问题是否仍然存在?

答案2

晚上好,

我在这里找到了答案: nvidia-ubuntu-20-04-hdmi-第二台显示器屏幕空白但可以检测到 xrandr

我不得不说,我还没有明白以下修改的最终目的,但不管怎样,我都尝试过了,即使我冒着必须重新安装所有内容的风险。

我“只”需要修改位于此处 /usr/share/X11/xorg.conf.d 的文件 10-amdgpu.conf 和 10-nvidia.conf。首先,您需要被授权在这些文件中进行写入:

j@j-Nitro-AN515-44:~$ sudo chmod o+w /usr/share/X11/xorg.conf.d/10-amdgpu.conf
j@j-Nitro-AN515-44:~$ sudo chmod o+w /usr/share/X11/xorg.conf.d/10-nvidia.conf

然后 :

打开文件 10-amdgpu.conf,将以下行替换驱动程序“amdgpu”经过驱动程序“模式设置”并保存。

打开文件 10-nvidia.conf,添加以下行选项“PrimaryGPU”“是”就在线前结束部分并保存。

希望它能够帮助别人!

如果有人能解释一下修改/添加的线条的最终目的,我很感兴趣。我想学钓鱼:)

祝你晚安,

吉米

相关内容