一、显卡信息

1、glxinfo |grep OpenGL

安装了了英伟达独立显卡,依照下边OpenGL信息OpenGL renderer string: llvmpipe (LLVM 10.0.0, 256 bits)来看,我们安装了英伟达独立显卡,此时却使用的是集成显卡。

123@123-OptiPlex-7071:~$ glxinfo |grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 10.0.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.1.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 20.1.0
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.1.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

2、 lspci -vnn | grep VGA -A 12

查看显卡信息,从显卡信息来看,NVIDIA显卡并没有识别出具体的型号,且显卡驱动使用的是nouveau:

123@123-OptiPlex-7071:~$ lspci -vnn | grep VGA -A 12
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:2184] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Device [7377:0000]
    Flags: bus master, fast devsel, latency 0, IRQ 131
    Memory at a4000000 (32-bit, non-prefetchable) [size=16M]
    Memory at 90000000 (64-bit, prefetchable) [size=256M]
    Memory at a0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 3000 [size=128]
    Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: nouveau
    Kernel modules: nvidiafb, nouveau

01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:1aeb] (rev a1)

3、 sudo lshw -C display

查看硬件的显示信息,从下边可以看出,显示1为英伟达显卡,驱动使用的是nouveau;显示2为Intel Corporation的集成显卡,驱动为driver=i915

123@123-OptiPlex-7071:~$ sudo lshw -C display
  *-display                 
       description: VGA compatible controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:131 memory:a4000000-a4ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:3000(size=128) memory:c0000-dffff
  *-display
       description: Display controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm bus_master cap_list
       configuration: driver=i915 latency=0
       resources: irq:132 memory:a3000000-a3ffffff memory:80000000-8fffffff ioport:4000(size=64)

4、modinfo

查看nouveau驱动的详细信息,filename:       /lib/modules/5.4.0-45-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko可以看出系统内核驱动:

123@123-OptiPlex-7071:~$ sudo modinfo nouveau
filename:       /lib/modules/5.4.0-45-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko
firmware:       nvidia/gp100/gr/sw_method_init.bin
firmware:       nvidia/gp100/gr/sw_bundle_init.bin
。。。
firmware:       nvidia/gp108/acr/ucode_load.bin
firmware:       nvidia/gp108/acr/unload_bl.bin
firmware:       nvidia/gp108/acr/bl.bin
license:        GPL and additional rights
description:    nVidia Riva/TNT/GeForce/Quadro/Tesla/Tegra K1+
author:         Nouveau Project
srcversion:     DA3B1938D2C974ADF623CDD
alias:          pci:v000012D2d*sv*sd*bc03sc*i*
alias:          pci:v000010DEd*sv*sd*bc03sc*i*
depends:        drm,drm_kms_helper,ttm,mxm-wmi,wmi,video,i2c-algo-bit
retpoline:      Y
intree:         Y
name:           nouveau
vermagic:       5.4.0-45-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           vram_pushbuf:Create DMA push buffers in VRAM (int)
parm:           tv_norm:Default TV norm.
        Supported: PAL, PAL-M, PAL-N, PAL-Nc, NTSC-M, NTSC-J,
            hd480i, hd480p, hd576i, hd576p, hd720p, hd1080i.
        Default: PAL
        *NOTE* Ignored for cards with external TV encoders. (charp)
parm:           nofbaccel:Disable fbcon acceleration (int)
parm:           fbcon_bpp:fbcon bits-per-pixel (default: auto) (int)
parm:           mst:Enable DisplayPort multi-stream (default: enabled) (int)
parm:           tv_disable:Disable TV-out detection (int)
parm:           ignorelid:Ignore ACPI lid status (int)
parm:           duallink:Allow dual-link TMDS (default: enabled) (int)
parm:           hdmimhz:Force a maximum HDMI pixel clock (in MHz) (int)
parm:           config:option string to pass to driver core (charp)
parm:           debug:debug string to pass to driver core (charp)
parm:           noaccel:disable kernel/abi16 acceleration (int)
parm:           modeset:enable driver (default: auto, 0 = disabled, 1 = enabled, 2 = headless) (int)
parm:           atomic:Expose atomic ioctl (default: disabled) (int)
parm:           runpm:disable (0), force enable (1), optimus only default (-1) (int)

驱动i915的显示信息如下:

123@123-OptiPlex-7071:~$ sudo modinfo i915
filename:       /lib/modules/5.4.0-45-generic/kernel/drivers/gpu/drm/i915/i915.ko
license:        GPL and additional rights
description:    Intel Graphics
author:         Intel Corporation
author:         Tungsten Graphics, Inc.
firmware:       i915/bxt_dmc_ver1_07.bin
firmware:       i915/skl_dmc_ver1_27.bin
firmware:       i915/kbl_dmc_ver1_04.bin
firmware:       i915/glk_dmc_ver1_04.bin
firmware:       i915/cnl_dmc_ver1_07.bin
firmware:       i915/icl_dmc_ver1_07.bin
firmware:       i915/tgl_dmc_ver2_04.bin
firmware:       i915/skl_huc_ver01_07_1398.bin
firmware:       i915/skl_guc_33.0.0.bin
firmware:       i915/bxt_huc_ver01_8_2893.bin
firmware:       i915/bxt_guc_33.0.0.bin
firmware:       i915/kbl_huc_ver02_00_1810.bin
firmware:       i915/kbl_guc_33.0.0.bin
firmware:       i915/glk_huc_ver03_01_2893.bin
firmware:       i915/glk_guc_33.0.0.bin
firmware:       i915/kbl_huc_ver02_00_1810.bin
firmware:       i915/kbl_guc_33.0.0.bin
firmware:       i915/icl_huc_ver8_4_3238.bin
firmware:       i915/icl_guc_33.0.0.bin
srcversion:     6431C540743939B7CB15701
alias:          pci:v00008086d00009A78sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A70sv*sd*bc03sc*i*
alias:          pci:v00008086d00009A68sv*sd*bc03sc*i*
。。。
alias:          pci:v00008086d00003582sv*sd*bc03sc*i*
alias:          pci:v00008086d00002562sv*sd*bc03sc*i*
alias:          pci:v00008086d00003577sv*sd*bc03sc*i*
depends:        drm_kms_helper,drm,video,i2c-algo-bit
retpoline:      Y
intree:         Y
name:           i915
vermagic:       5.4.0-45-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4
parm:           modeset:Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)
parm:           enable_dc:Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6) (int)
parm:           enable_fbc:Enable frame buffer compression for power savings (default: -1 (use per-chip default)) (int)
parm:           lvds_channel_mode:Specify LVDS channel mode (0=probe BIOS [default], 1=single-channel, 2=dual-channel) (int)
parm:           panel_use_ssc:Use Spread Spectrum Clock with panels [LVDS/eDP] (default: auto from VBT) (int)
parm:           vbt_sdvo_panel_type:Override/Ignore selection of SDVO panel mode in the VBT (-2=ignore, -1=auto [default], index in VBT BIOS table) (int)
parm:           reset:Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default]) (int)
parm:           vbt_firmware:Load VBT from specified file under /lib/firmware (charp)
parm:           error_capture:Record the GPU state following a hang. This information in /sys/class/drm/card<N>/error is vital for triaging and debugging hangs. (bool)
parm:           enable_hangcheck:Periodically check GPU activity for detecting hangs. WARNING: Disabling this can cause system wide hangs. (default: true) (bool)
parm:           enable_psr:Enable PSR (-1=use per-chip default, 0=disabled [default], 1=enabled)  (int)
parm:           force_probe:Force probe the driver for specified devices. See CONFIG_DRM_I915_FORCE_PROBE for details. (charp)
parm:           alpha_support:Deprecated. See i915.force_probe. (bool)
parm:           disable_power_well:Disable display power wells when possible (-1=auto [default], 0=power wells always on, 1=power wells disabled when possible) (int)
parm:           enable_ips:Enable IPS (default: true) (int)
parm:           fastboot:Try to skip unnecessary mode sets at boot time (0=disabled, 1=enabled) Default: -1 (use per-chip default) (int)
parm:           prefault_disable:Disable page prefaulting for pread/pwrite/reloc (default:false). For developers only. (bool)
parm:           load_detect_test:Force-enable the VGA load detect code for testing (default:false). For developers only. (bool)
parm:           force_reset_modeset_test:Force a modeset during gpu reset for testing (default:false). For developers only. (bool)
parm:           invert_brightness:Invert backlight brightness (-1 force normal, 0 machine defaults, 1 force inversion), please report PCI device ID, subsystem vendor and subsystem device ID to dri-devel@lists.freedesktop.org, if your machine needs it. It will then be included in an upcoming module version. (int)
parm:           disable_display:Disable display (default: false) (bool)
parm:           mmio_debug:Enable the MMIO debug code for the first N failures (default: off). This may negatively affect performance. (int)
parm:           verbose_state_checks:Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions. (bool)
parm:           nuclear_pageflip:Force enable atomic functionality on platforms that don't have full support yet. (bool)
parm:           edp_vswing:Ignore/Override vswing pre-emph table selection from VBT (0=use value from vbt [default], 1=low power swing(200mV),2=default swing(400mV)) (int)
parm:           enable_guc:Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto, 0=disable [default], 1=GuC submission, 2=HuC load) (int)
parm:           guc_log_level:GuC firmware logging level. Requires GuC to be loaded. (-1=auto [default], 0=disable, 1..4=enable with verbosity min..max) (int)
parm:           guc_firmware_path:GuC firmware path to use instead of the default one (charp)
parm:           huc_firmware_path:HuC firmware path to use instead of the default one (charp)
parm:           dmc_firmware_path:DMC firmware path to use instead of the default one (charp)
parm:           enable_dp_mst:Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true) (bool)
parm:           enable_dpcd_backlight:Enable support for DPCD backlight control(-1=use per-VBT LFP backlight type setting [default], 0=disabled, 1=enabled) (int)
parm:           enable_gvt:Enable support for Intel GVT-g graphics virtualization host support(default:false) (bool)

二、显卡驱动安装

在没有禁用nouveau时,直接使用英伟达显卡专项驱动,重启,把系统搞残过。

再次尝试时,看了网上的一些教程,并结合上边的分析情况,重新安装英伟达显卡驱动。

1、禁用集成的驱动nouveau

sudo gedit  /etc/modprobe.d/blacklist.conf

在打开的blacklist.conf文件尾部添加禁用选项

blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb

以上的选项可能不需要全部加,但是没做实验。

2、更新

sudo update-initramfs -u

3、选择附加驱动

4、重启

5、查看驱动情况

现在终于不再是默认的集成显卡,而是独立显卡啦

查看显卡情况

123@123-OptiPlex-7071:~$ nvidia-smi
Mon Sep 21 19:25:45 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66       Driver Version: 450.66       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| 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  GeForce GTX 1660    Off  | 00000000:01:00.0  On |                  N/A |
| 43%   33C    P8    16W / 120W |    430MiB /  5936MiB |      2%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1048      G   /usr/lib/xorg/Xorg                 18MiB |
|    0   N/A  N/A      1107      G   /usr/bin/gnome-shell               49MiB |
|    0   N/A  N/A      1373      G   /usr/lib/xorg/Xorg                180MiB |
|    0   N/A  N/A      1517      G   /usr/bin/gnome-shell              155MiB |
|    0   N/A  N/A     19987      G   /usr/lib/firefox/firefox            2MiB |
|    0   N/A  N/A     20094      G   /usr/lib/firefox/firefox            2MiB |
|    0   N/A  N/A     20136      G   /usr/lib/firefox/firefox            2MiB |
|    0   N/A  N/A     20295      G   /usr/lib/firefox/firefox            2MiB |
|    0   N/A  N/A     20393      G   /usr/lib/firefox/firefox            2MiB |
|    0   N/A  N/A     20436      G   /usr/lib/firefox/firefox            2MiB |
|    0   N/A  N/A     20483      G   /usr/lib/firefox/firefox            2MiB |
+-----------------------------------------------------------------------------+

查看可用驱动情况

123@123-OptiPlex-7071:~$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00002184sv00007377sd00000000bc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-driver-435 - distro non-free
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-450 - distro non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

查看英伟达显卡设置情况:终端运行nvidia-settings

ubuntu 18.04 英伟达显卡驱动相关推荐

  1. cuda卸载_Ubuntu18.04英伟达显卡驱动、Cuda安装

    一.显卡驱动安装 1. 准备工作 禁用BIOS中的secure boot,因为此方法使用第三方源安装显卡驱动,不禁止secure boot会导致安装的驱动不能使用,禁用也不会有多大安全隐患. 2. 禁 ...

  2. Ubuntu安装NVIDIA英伟达显卡驱动教程

    Ubuntu 安装NVIDIA显卡驱动教程(附带降级/删除内核) 前言 在安装好ubuntu以后,大概率是使用的Linux内核自带驱动,后续用CUDA训练很不方便,因此必须将显卡驱动切换成NVIDIA ...

  3. 完整的Ubuntu18.04深度学习GPU环境配置,英伟达显卡驱动安装、cuda9.0安装、cudnn的安装、anaconda安装

    文章目录 1.英伟达显卡驱动安装 2.cuda9.0安装 3.cudnn的安装 4.anaconda安装 5.安装TensorFlow和Keras 安装 参考:https://blog.csdn.ne ...

  4. ubuntu 英伟达显卡驱动异常

    问题:安装某些软件后,ubuntu内核发生变换,英伟达显卡驱动无法正常使用 解决方法:(推荐彻底卸载显卡驱动后,重新安装显卡驱动) 1. 使用dkms.可以解决一部分问题,不一定能解决. 2. 重装显 ...

  5. ubuntu linux显卡驱动安装教程,Ubuntu系统怎么安装英伟达显卡驱动呢 快速安装步骤详解...

    Ubuntu系统怎么安装英伟达显卡驱动呢?Ubuntu系统的电脑,显卡驱动都是默认的开源,并非官方驱动 在性能和功能方面,与官方驱动还是有差别的 下面介绍利用Ubuntu的驱动程序安装显卡官方驱动.需 ...

  6. Linux 安装英伟达显卡驱动和CUDA套件 // Kali // Debian // Ubuntu

    Kali Linux 安装英伟达显卡驱动和CUDA套件 // Debian // Ubuntu 1. 检查仓库源 确保仓库包含contrib和non-free部分.Kali默认就有此部分.Debian ...

  7. 在ubuntu 18.04下安装Nvidia显卡驱动的黑屏问题

    目录 安装环境 问题 解决办法 更新 安装环境 ubuntu 18.04 ROG 幻16 3060 问题 禁用ubuntu 自带显卡驱动Nouveau,具体流程网上查询 根据系统推荐,安装了nvidi ...

  8. linux英伟达显卡内核不匹配,硬核观察|Linus 破例在 Linux 5.11 内核中允许英伟达显卡驱动加塞...

    Linus 破例在 Linux 5.11 内核中允许英伟达显卡驱动加塞 据 cnbeta 报道,曾因闭源驱动对英伟达爆粗口的 Linus Torvalds,刚刚宣布了 Linux 5.11 内核版本的 ...

  9. Win10 英伟达显卡驱动安装不上,显示由于该设备有问题,Windows已将其停止,错误代码43

    环境: 电脑:金河田组装机微星主板 系统:Windows 10 专业版 64位 显卡:NVIDIA GT 710 问题描述: 重装系统后,Win10英伟达显卡驱动安装不上,显示由于该设备有问题,Win ...

  10. nvidia卸载程序失败_英伟达显卡驱动安装失败怎么办?

    一般用户重新安装系统或者更新显卡驱动后,安装光盘中的英伟达显卡驱动,安装后却提示"NVIDIA安装程序失败",遇到这样的问题,很多用户会选择重启后重新安装一次,不过都不能解决安装电 ...

最新文章

  1. 页面置换算法(FIFO , LRU, OPT)(C++实现模拟)
  2. 李宏毅机器学习(九)Multi-lingual BERT
  3. 7 款 Python 可视化工具对比
  4. 蓝桥杯 字母组串(递归)
  5. cartographer的一些结果
  6. swift中的category,扩展
  7. 地理空间数据下载 积累
  8. 直流电机驱动电路整理笔记
  9. excel多表格整合去重与空格去除
  10. DxO FilmPack 5 for Mac(胶片模拟效果滤镜软件)
  11. 【C语言】从零开始的C语言小游戏之路(总)
  12. gdb调试 程序退出没有堆栈信息([Inferior 1 (process 12867) exited with code 0177])
  13. (十)Intellij 远程调试 a bug
  14. NoSQL:列族数据库
  15. 时间转换 MJDUTC
  16. 3DMAX游戏角色头发建模教程
  17. 用MATLAB怎么获取任意像素点的灰度值
  18. 使用 Lambda 表达式的正确姿势,写得太好了叭
  19. 10 个 VSCode 超级摸鱼神器,确定不试一下?
  20. Bug的繁殖速度真快

热门文章

  1. kaminari分页插件的使用
  2. excel中NORM.DIST 的python实现
  3. Excel函数教程_COLUMN和VLOOKUP实现多字段匹配
  4. [安洵杯 2019]easy_web
  5. 告别内卷,扬帆出海,小鹏汽车们找到破局最优解?
  6. Mac终端远程连接历史记录怎么清除
  7. 用笔记本做wifi热点
  8. 百度竞价账户关键词分类
  9. 竟事而后言——谨记微言,聊以自省
  10. RGB合成图片(misc)