日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

ubuntu 18.04 英伟达显卡驱动

發(fā)布時間:2023/12/20 Ubuntu 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu 18.04 英伟达显卡驱动 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一、顯卡信息

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顯卡并沒有識別出具體的型號,且顯卡驅(qū)動使用的是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為英偉達顯卡,驅(qū)動使用的是nouveau;顯示2為Intel Corporation的集成顯卡,驅(qū)動為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驅(qū)動的詳細信息,filename: ? ? ? /lib/modules/5.4.0-45-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko可以看出系統(tǒng)內(nèi)核驅(qū)動:

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)

驅(qū)動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)
?

二、顯卡驅(qū)動安裝

在沒有禁用nouveau時,直接使用英偉達顯卡專項驅(qū)動,重啟,把系統(tǒng)搞殘過。

再次嘗試時,看了網(wǎng)上的一些教程,并結(jié)合上邊的分析情況,重新安裝英偉達顯卡驅(qū)動。

1、禁用集成的驅(qū)動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、選擇附加驅(qū)動

4、重啟

5、查看驅(qū)動情況

現(xiàn)在終于不再是默認的集成顯卡,而是獨立顯卡啦

?

?

查看顯卡情況

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 |
+-----------------------------------------------------------------------------+

查看可用驅(qū)動情況

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

查看英偉達顯卡設(shè)置情況:終端運行nvidia-settings

?

?

?


?

總結(jié)

以上是生活随笔為你收集整理的ubuntu 18.04 英伟达显卡驱动的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。