失去检测第二台显示器的能力

失去检测第二台显示器的能力

我知道有很多关于这个话题的帖子,但显然你需要 50 个声望才能发表评论。不过,我已经尝试了这些帖子中的所有方法。

运行带有 nvidia-driver-430* 的 Ubuntu 18.04。星号是,当我尝试降级到 nvidia-driver-390 时,我的附加驱动程序选项卡现在显示“继续使用手动安装的驱动程序”,并且 390 和 nouveau 的选项变灰。所以我可能正在使用 390?

无论如何,无论我使用 nouveau 还是任何 nvidia 驱动程序,问题都是一样的。第二个显示器无法检测到。它本来可以正常工作,但当我尝试修复一个完全不同的问题(视频撕裂)时,在将我的 prime 配置文件设置为 intel 后,它就无法检测到它了。切换回 nvidia 也无法解决这个问题。

我目前正在运行:i7 8750H、RTX 2070、1080p 144hz 内置显示器,一些 benq 1440p 60hz 外部通过 hdmi 连接

当我重新启动 Windows 时,显示器工作正常。所以这不是线路或显示器的问题。

更新:输出nvidia-smi

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

更新:

切换回430,输出nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.40       Driver Version: 430.40       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2070    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P0    34W /  N/A |    191MiB /  7982MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1884      G   /usr/lib/xorg/Xorg                           106MiB |
|    0      2207      G   /usr/bin/gnome-shell                          67MiB |
+-----------------------------------------------------------------------------+

更新:

输出xrandr

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 381mm x 214mm
   1920x1080    144.00*+  60.01    60.02    59.97    59.96    59.93  
   1680x1050     84.94    74.89    69.88    59.95    59.88  
   1600x1024     60.17  
   1400x1050     85.00    74.76    70.00    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864     100.00    85.06    85.00    75.00    75.00    70.00    60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       85.02    74.96    69.88    60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       85.08    74.76    70.06    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98    85.08  
   576x432      100.11    85.15    85.09    75.00    75.00    70.00    60.06  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27

输出自dmesg | grep -i nvidia

[    2.731757] nvidia: loading out-of-tree module taints kernel.
[    2.731764] nvidia: module license 'NVIDIA' taints kernel.
[    2.740486] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    2.749928] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[    2.751126] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
[    2.751247] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    2.793153] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  430.40  Sun Jul 21 04:53:48 CDT 2019
[    2.807484] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  430.40  Sun Jul 21 04:57:42 CDT 2019
[    2.809576] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    3.472496] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input25
[    3.472598] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input26
[    3.724291] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    3.734373] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 237

输出grep -i nvidia /var/log/Xorg.0.log

[    15.088] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/x86_64-linux-gnu/nvidia-430/xorg,/usr/lib/xorg/modules"
[    15.088] (**) OutputClass "Nvidia Prime" ModulePath extended to "/x86_64-linux-gnu/nvidia/xorg,/usr/lib/x86_64-linux-gnu/nvidia-430/xorg,/usr/lib/xorg/modules"
[    15.088] (**) OutputClass "Nvidia Prime" setting /dev/dri/card1 as PrimaryGPU
[    15.092] (II) Applying OutputClass "nvidia" to /dev/dri/card1
[    15.092]    loading driver: nvidia
[    15.092] (II) Applying OutputClass "Nvidia Prime" to /dev/dri/card1
[    15.092]    loading driver: nvidia
[    15.092] (==) Matched nvidia as autoconfigured driver 0
[    15.092] (==) Matched nvidia as autoconfigured driver 1
[    15.092] (II) LoadModule: "nvidia"
[    15.092] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia-430/xorg/nvidia_drv.so
[    15.095] (II) Module nvidia: vendor="NVIDIA Corporation"
[    15.096] (II) NVIDIA dlloader X Driver  430.40  Sun Jul 21 05:01:54 CDT 2019
[    15.096] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    15.096] (II) NOUVEAU driver for NVIDIA chipset families :
[    15.099] (II) NVIDIA(0): Creating default Display subsection in Screen section
[    15.099] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[    15.099] (==) NVIDIA(0): RGB weight 888
[    15.099] (==) NVIDIA(0): Default visual is TrueColor
[    15.099] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    15.099] (II) Applying OutputClass "nvidia" options to /dev/dri/card1
[    15.099] (II) Applying OutputClass "Nvidia Prime" options to /dev/dri/card1
[    15.099] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration"
[    15.099] (**) NVIDIA(0): Option "IgnoreDisplayDevices" "CRT"
[    15.099] (**) NVIDIA(0): Enabling 2D acceleration
[    15.099] (II) Loading sub module "glxserver_nvidia"
[    15.099] (II) LoadModule: "glxserver_nvidia"
[    15.099] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia-430/xorg/libglxserver_nvidia.so
[    15.134] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[    15.134] (II) NVIDIA GLX Module  430.40  Sun Jul 21 05:00:26 CDT 2019
[    15.165] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    15.165] (--) NVIDIA(0):     DFP-0 (boot)
[    15.165] (--) NVIDIA(0):     DFP-1
[    15.165] (--) NVIDIA(0):     DFP-2
[    15.167] (II) NVIDIA(0): NVIDIA GPU GeForce RTX 2070 (TU106-A) at PCI:1:0:0 (GPU-0)
[    15.167] (--) NVIDIA(0): Memory: 8388608 kBytes
[    15.168] (--) NVIDIA(0): VideoBIOS: 90.06.2d.00.55
[    15.168] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    15.198] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    15.198] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    15.198] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    15.198] (--) NVIDIA(GPU-0): 
[    15.198] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    15.198] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    15.198] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    15.198] (--) NVIDIA(GPU-0): 
[    15.198] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    15.198] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    15.198] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    15.198] (--) NVIDIA(GPU-0): 
[    15.234] (==) NVIDIA(0): 
[    15.234] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[    15.234] (==) NVIDIA(0):     will be used as the requested mode.
[    15.234] (==) NVIDIA(0): 
[    15.235] (II) NVIDIA(0): Validated MetaModes:
[    15.235] (II) NVIDIA(0):     "DFP-0:nvidia-auto-select"
[    15.235] (II) NVIDIA(0): Virtual screen size determined to be 2560 x 1440
[    15.278] (--) NVIDIA(0): DPI set to (91, 91); computed from "UseEdidDpi" X config
[    15.278] (--) NVIDIA(0):     option
[    15.590] (II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory
[    15.590] (II) NVIDIA:     access.
[    15.614] (II) NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select"
[    15.699] (==) NVIDIA(0): Disabling shared memory pixmaps
[    15.699] (==) NVIDIA(0): Backing store enabled
[    15.699] (==) NVIDIA(0): Silken mouse enabled
[    15.699] (==) NVIDIA(0): DPMS enabled
[    15.699] (WW) NVIDIA(0): Option "PrimaryGPU" is not used
[    15.699] (II) NVIDIA(0): [DRI2] Setup complete
[    15.699] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    16.213] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event19)
[    16.213] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event20)
[    16.270] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    16.270] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    16.270] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    16.270] (--) NVIDIA(GPU-0): 
[    16.270] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    16.270] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    16.270] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    16.270] (--) NVIDIA(GPU-0): 
[    16.270] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    16.270] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    16.270] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    16.270] (--) NVIDIA(GPU-0): 
[    16.335] (--) NVIDIA(GPU-0): DFP-0: connected
[    16.335] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    16.335] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[    16.335] (--) NVIDIA(GPU-0): 
[    16.335] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    16.335] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    16.335] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    16.335] (--) NVIDIA(GPU-0): 
[    16.335] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    16.335] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    16.335] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    16.335] (--) NVIDIA(GPU-0): 
[    16.340] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    16.340] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    16.340] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[    16.340] (--) NVIDIA(GPU-0): 
[    16.340] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    16.340] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    16.340] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    16.340] (--) NVIDIA(GPU-0): 
[    16.340] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    16.340] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    16.340] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    16.340] (--) NVIDIA(GPU-0): 
[    17.088] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.088] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.088] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.088] (--) NVIDIA(GPU-0): 
[    17.088] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.088] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.088] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.088] (--) NVIDIA(GPU-0): 
[    17.088] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.088] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.088] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.088] (--) NVIDIA(GPU-0): 
[    17.119] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.119] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.119] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.119] (--) NVIDIA(GPU-0): 
[    17.150] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.150] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.150] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.150] (--) NVIDIA(GPU-0): 
[    17.182] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.182] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.182] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.182] (--) NVIDIA(GPU-0): 
[    17.182] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.182] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.182] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.182] (--) NVIDIA(GPU-0): 
[    17.182] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.182] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.182] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.182] (--) NVIDIA(GPU-0): 
[    17.446] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.446] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.446] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.446] (--) NVIDIA(GPU-0): 
[    17.446] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.446] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.446] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.446] (--) NVIDIA(GPU-0): 
[    17.447] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.447] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.447] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.447] (--) NVIDIA(GPU-0): 
[    17.477] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    17.477] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    17.477] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    17.477] (--) NVIDIA(GPU-0): 
[    17.477] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    17.477] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    17.477] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    17.477] (--) NVIDIA(GPU-0): 
[    17.477] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.477] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    17.477] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    17.477] (--) NVIDIA(GPU-0): 
[    19.206] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    19.206] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    19.206] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    19.206] (--) NVIDIA(GPU-0): 
[    19.206] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    19.206] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    19.206] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    19.206] (--) NVIDIA(GPU-0): 
[    19.206] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    19.206] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    19.206] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    19.206] (--) NVIDIA(GPU-0): 
[    19.236] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    19.236] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    19.236] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    19.236] (--) NVIDIA(GPU-0): 
[    19.236] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    19.236] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    19.236] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    19.236] (--) NVIDIA(GPU-0): 
[    19.236] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    19.236] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    19.236] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    19.236] (--) NVIDIA(GPU-0): 
[    20.575] (II) NVIDIA(0): Setting mode "HDMI-0: nvidia-auto-select @2560x1440 +1920+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}"
[    23.616] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    23.616] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    23.616] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    23.616] (--) NVIDIA(GPU-0): 
[    23.616] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    23.616] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    23.616] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    23.616] (--) NVIDIA(GPU-0): 
[    23.616] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    23.616] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    23.616] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    23.616] (--) NVIDIA(GPU-0): 
[    23.646] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): connected
[    23.646] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): Internal TMDS
[    23.646] (--) NVIDIA(GPU-0): BenQ BL3200 (DFP-0): 600.0 MHz maximum pixel clock
[    23.646] (--) NVIDIA(GPU-0): 
[    23.646] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    23.646] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[    23.646] (--) NVIDIA(GPU-0): DFP-1: 2660.0 MHz maximum pixel clock
[    23.646] (--) NVIDIA(GPU-0): 
[    23.646] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    23.646] (--) NVIDIA(GPU-0): DFP-2: Internal TMDS
[    23.646] (--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
[    23.646] (--) NVIDIA(GPU-0): 
[   608.305] (II) NVIDIA(GPU-0): Deleting GPU-0

更新:

您指定要编辑的行未提及 nouveau。这是我当前的行:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

更新:

grep -i nvidia /var/log/Xorg.0.log编辑 grub 行后的输出为GRUB_CMDLINE_LINUX_DEFAULT nouveau.modset=0https://paste.ofcode.org/GEJ9KRDsQwKcXhJSBU66Ma(字符数不足,必须使用外部网站)

更新:

输出自xrandrhttps://paste.ofcode.org/hgadLwahXYMEdC3hkp7yTV

更新:

输出prime-select querynvidia

输出ubuntu-drivers listnvidia-driver-430

`ubuntu-drivers devices 的输出是:

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F10sv00001462sd00001272bc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-driver-430 - third-party free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

的输出为lsmod | grep nvidia

nvidia_uvm            815104  0
nvidia_drm             45056  6
nvidia_modeset       1114112  1 nvidia_drm
nvidia              19025920  278 nvidia_uvm,nvidia_modeset
drm_kms_helper        172032  2 nvidia_drm,i915
drm                   401408  19 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler        53248  2 ipmi_devintf,nvidia

输出lspci -nn |grep -E "VGA|Display|3D"为:

00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e9b]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1f10] (rev a1)

答案1

正在进行中的答案

有些项目已在评论中处理,稍后我会将它们汇总到这个答案中。这个答案注定会成为“如何从 A 到 Z 设置 nVidia”的解决方案。

Xorg.0.log

此文件通常位于(/var/log/如果不使用:)中locate Xorg.0.log来查找它。

找到文件列表后,其内容通常应如下所示:

$ grep -i nvidia /var/log/Xorg.0.log
[     6.175] (**) |-->Screen "nvidia" (0)
[     6.175] (**) |   |-->Device "nvidia"
[     6.175] (**) |   |-->GPUDevice "nvidia"
[     6.175] (==) No monitor specified for screen "nvidia".
[     6.214] (II) Module glx: vendor="NVIDIA Corporation"
[     6.214] (II) NVIDIA GLX Module  384.130  Wed Mar 21 02:54:48 PDT 2018
[     6.214] (II) LoadModule: "nvidia"
[     6.214] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so
[     6.216] (II) Module nvidia: vendor="NVIDIA Corporation"
[     6.218] (II) NVIDIA dlloader X Driver  384.130  Wed Mar 21 02:29:29 PDT 2018
[     6.218] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[     6.263] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "nvidia" for depth/fbbpp 24/32
[     6.263] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[     6.263] (==) NVIDIA(0): RGB weight 888
[     6.263] (==) NVIDIA(0): Default visual is TrueColor
[     6.263] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[     6.264] (**) NVIDIA(0): Option "ConstrainCursor" "off"
[     6.264] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "on"
[     6.264] (**) NVIDIA(0): Option "IgnoreDisplayDevices" "CRT"
[     6.264] (**) NVIDIA(0): Enabling 2D acceleration
[     7.326] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[     7.326] (--) NVIDIA(0):     DFP-0 (boot)
[     7.344] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 970M (GM204-A) at PCI:1:0:0 (GPU-0)
[     7.344] (--) NVIDIA(0): Memory: 3145728 kBytes
[     7.344] (--) NVIDIA(0): VideoBIOS: 84.04.79.00.0a
[     7.344] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[     7.375] (--) NVIDIA(GPU-0): SONY TV  *00 (DFP-0): connected
[     7.375] (--) NVIDIA(GPU-0): SONY TV  *00 (DFP-0): Internal TMDS
[     7.375] (--) NVIDIA(GPU-0): SONY TV  *00 (DFP-0): 600.0 MHz maximum pixel clock
[     7.375] (--) NVIDIA(GPU-0): 
[     7.378] (==) NVIDIA(0): 
[     7.378] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[     7.378] (==) NVIDIA(0):     will be used as the requested mode.
[     7.378] (==) NVIDIA(0): 
[     7.378] (II) NVIDIA(0): Validated MetaModes:
[     7.378] (II) NVIDIA(0):     "DFP-0:nvidia-auto-select"
[     7.378] (II) NVIDIA(0): Virtual screen size determined to be 1920 x 1080
[     7.385] (--) NVIDIA(0): DPI set to (43, 44); computed from "UseEdidDpi" X config
[     7.385] (--) NVIDIA(0):     option
[     7.732] (II) NVIDIA: Using 6144.00 MB of virtual memory for indirect memory
[     7.732] (II) NVIDIA:     access.
[     7.746] (II) NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select"
[     7.770] (==) NVIDIA(0): Disabling shared memory pixmaps
[     7.770] (==) NVIDIA(0): Backing store enabled
[     7.770] (==) NVIDIA(0): Silken mouse enabled
[     7.770] (==) NVIDIA(0): DPMS enabled
[     7.770] (II) NVIDIA(0): [DRI2] Setup complete
[     7.770] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[     8.132] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event8)

精选

键入此命令以确保 Optimus 笔记本电脑已启用 nVidia:

$ prime-select query
nvidia

如果答案是“intel”,请输入sudo prime-select nvidia并重新启动。

Ubuntu 驱动程序

键入此命令来查看使用了哪些驱动程序:

$ ubuntu-drivers list
nvidia-384

为了帮助其他人支持您,请输入:

$ ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000013D8sv00001028sd00000708bc03sc02i00
model    : GM204M [GeForce GTX 970M]
vendor   : NVIDIA Corporation
driver   : nvidia-384 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

检查正在运行的驱动程序

使用以下命令查看内存中正在运行的驱动程序:

lsmod | grep nvidia
lsmod | grep nouveau

其中一个应该返回结果,而不是两个都返回。

检查硬件

Optimus 笔记本电脑应该有两个硬件设备:

$ lspci -nn |grep -E "VGA|Display|3D" 
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
01:00.0 3D controller [0302]: NVIDIA Corporation GM204M [GeForce GTX 970M] [10de:13d8] (rev a1)

检查 Xrandr

一旦插入,Xrandr 应该会显示两个屏幕:

$ xrandr | grep " connected"
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1107mm x 623mm
eDP-1-1 connected primary 1920x1080+3840+2160 (normal left inverted right x axis y axis) 382mm x 215mm
DP-1-1 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1600mm x 900mm

请注意,一些较新的笔记本电脑仅支持通过 nVidia GPU 的 HDMI 插孔。它们是硬连线的,不像以前 HDMI 插孔可以在 nVidia 独立 GPU 和 Intel 集成 GPU 之间切换。

还请注意,一些较新的笔记本电脑在启动时会关闭 HDMI 声道以节省电量,并且只有 Windows 足够智能,可以在内核 5.3 或类似版本之前打开声音。如果内核较旧,则需要nvhda.ko驱动程序,而较新的笔记本电脑则没有 HDMI 声音。

Grub 模式集和黑名单

检查dmesg(设备消息):

[    1.406480] nvidia: loading out-of-tree module taints kernel.
[    1.406496] nvidia: module license 'NVIDIA' taints kernel.
[    1.432247] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.442022] nvidia-nvlink: Nvlink Core is being initialized, major device number 242
[    1.442204] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[    1.442328] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  384.130  Wed Mar 21 03:37:26 PDT 2018 (using threaded interrupts)
[    1.447990] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  384.130  Wed Mar 21 02:59:49 PDT 2018
[    1.449244] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    1.449246] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    4.326406] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 240
[    4.728783] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input9
[    7.317965] nvidia-modeset: Allocated GPU:0 (GPU-30fab9bc-fe6f-ec05-e8e6-c151a1a96121) @ PCI:0000:01:00.0

注意到最后一行了吗?有问题的更新似乎缺失了。

nouveau出现上面或中的情况时Xorg.0.log,或者使用以下命令阻止它在 grub 中加载:

$ sudo -H gedit /etc/default/grub
# Find this line and add nomodeset
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.nomodeset=0"
# Your CMDLINE may have extra or fewer entries
# Save file, Exit editor and type command below
$ sudo update-grub
$ reboot

不要输入上面的行,它们是您的指令。在终端中#输入后面的内容。$

nVidia 或 Nouveau 可能在某个地方被列入黑名单。我将使用我的自定义命令,但您的命令是:

locate blacklist | grep -Ev '/src|/usr|/lib'

对于我的自定义命令请注意,日期将帮助您确定要检查的文件:

$ llocate blacklist | grep -Ev '/src|/mnt|Sdk|/usr|/lib'
ACCESS      OWNER  GROUP  SIZE   MODIFIED      NAME (updatdb last ran: 2019-08-20 17:00:07)
-rw-r--r--  root   root   367    Jan 27  2016  /etc/bindresvport.blacklist
drwxr-xr-x  root   root   4096   Aug 17 12:43  /etc/apport/blacklist.d
-rw-r--r--  root   root   217    Mar 31  2016  /etc/apport/blacklist.d/README.blacklist
-rw-r--r--  root   root   24     Jan  2  2018  /etc/apport/blacklist.d/apport
-rw-r--r--  root   root   59     Feb  8  2018  /etc/apport/blacklist.d/firefox
-rw-r--r--  root   root   71     Jan 24  2018  /etc/apport/blacklist.d/thunderbird
-rw-r--r--  root   root   5230   Aug  3  2015  /etc/gnome/menus.blacklist
-rw-r--r--  root   root   4054   Aug 18  2018  /etc/java-8-oracle/security/blacklist
-rw-r--r--  root   root   1273   Aug 18  2018  /etc/java-8-oracle/security/blacklisted.certs
-rw-r--r--  root   root   154    Jul  2  2018  /etc/modprobe.d/amd64-microcode-blacklist.conf
-rw-r--r--  root   root   325    Mar 13  2016  /etc/modprobe.d/blacklist-ath_pci.conf
-rw-r--r--  root   root   210    Mar 13  2016  /etc/modprobe.d/blacklist-firewire.conf
-rw-r--r--  root   root   697    Mar 13  2016  /etc/modprobe.d/blacklist-framebuffer.conf
-rw-r--r--  root   root   156    Jul 30  2015  /etc/modprobe.d/blacklist-modem.conf
-rw-r--r--  root   root   44     Aug  4 11:21  /etc/modprobe.d/blacklist-nvidia-nouveau.conf
-rw-r--r--  root   root   583    Mar 13  2016  /etc/modprobe.d/blacklist-rare-network.conf
-rw-r--r--  root   root   1077   Mar 13  2016  /etc/modprobe.d/blacklist-watchdog.conf
-rw-r--r--  root   root   1667   Nov 12  2018  /etc/modprobe.d/blacklist.conf
-rw-r--r--  root   root   390    Apr 12  2016  /etc/modprobe.d/fbdev-blacklist.conf
-rw-r--r--  root   root   154    Jul  2  2018  /etc/modprobe.d/intel-microcode-blacklist.conf

相关内容