结论

  • 配置文件/etc/X11/xorg.conf未正确配置,

安装历程

安装显卡驱动后,依旧无法正常扩展屏幕显示,仔细一看发现在nvidia-smi时出现No running processes found字样, nvidia-setting查看时出现Error:Unable to load info from any avialable system字样,也没有配置界面弹出。

查询一通,发现有人说通过apt-get安装驱动、软件更新的additional driver安装驱动就能够正常扩展显示器,但是这样不能够控制nvidia驱动的版本号,安装方式的不同只是系统会不同程度的配置环境而已,驱动肯定都是一样的。

  • 通过摸索,可能是xorg的配置文件没有自动更新的问题,装完nvidia驱动后,居然没有自动生成/etc/X11/xorg.conf文件。
问题详细描述

安装nvidia显卡驱动后,但是安装完毕后无法使用正常扩展显示,使用nvidia-smi查看时No running processes found, nvidia-setting查看时Error:Unable to load info from any avialable system

qy@qy:~$ nvidia-smi 
Sat Nov  6 09:31:31 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.82.00    Driver Version: 470.82.00    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| 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   46C    P0    13W /  N/A |      0MiB /  3911MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

驱动正常安装后无法使用,hdmi vga均无法扩展屏幕, xrandr检测不到外接屏。nvidia-setting无界面

Error :Unable to load info from any avialable system

在这里插入图片描述

解决方法

问题的发现过程:我是打算重新nvidia显卡驱动时,安装到cc check时退出了,意外发现xorg.conf更新了,nvidia显卡正常用在显示中,能够正常接扩展显示屏。

  • nvidia显卡驱动安装后,扩展屏幕不能使用的问题解决方法
    xorg显示时没有调用到nvidia显卡,发现xorg.conf文件是空的。按照如下添加修改配置文件/etc/X11/xorg.conf:
cd /etc/X11
sudo gedit xorg.conf

备份文件后,在其中添加如下内容

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

或者输入指令自动配置xorg

 sudo nvidia-xconfig 

重启即可扩展显示器,nvidia-smi也可看见显卡在正常调用,nvidia-setting也可正常配置。

qy@qy:~$ nvidia-smi 
Sun Nov  7 10:25:00 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.44       Driver Version: 495.44       CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| 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   37C    P8     3W /  N/A |     97MiB /  3911MiB |      9%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1217      G   /usr/lib/xorg/Xorg                 96MiB |
+-----------------------------------------------------------------------------+
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐