安装 NVIDIA 驱动程序 470 后,网络和蓝牙停止工作

安装 NVIDIA 驱动程序 470 后,网络和蓝牙停止工作

Ubuntu18.04,GPU GeForce 2070S

我使用命令将 GPU 驱动程序从 460 升级到 470:

sudo apt-add-repository -r ppa:graphics-drivers/ppa
sudo apt remove nvidia*
sudo apt autoremove
sudo ubuntu-drivers autoinstall

重启后,没有网络和蓝牙;(

> ping 8.8.8.8
connect: Network is unreachable
> sudo service networking status
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Thu 2021-09-23 23:56:31 CST; 24h ago
     Docs: man:interfaces(5)
  Process: 9891 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=0/SUCCESS)
  Process: 9972 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 9962 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=1/FAILURE)
 Main PID: 9972 (code=exited, status=0/SUCCESS)

9月 23 23:56:31 fey-pc systemd[1]: Starting Raise network interfaces...
9月 23 23:56:31 fey-pc systemd[1]: Started Raise network interfaces.
> sudo service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)
> sudo ifconfig -a
br-0edafad07ad9: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        inet6 fe80::42:2ff:fedf:94e2  prefixlen 64  scopeid 0x20<link>
        ether 02:42:02:df:94:e2  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 331  bytes 48011 (48.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ab415028e09a: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:18:4f:89:44  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:cc:31:62:ec  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 71164  bytes 47374312 (47.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 71164  bytes 47374312 (47.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

我检查了 apt 日志

> less /var/log/apt/history.log

Start-Date: 2021-09-23  22:48:59
Commandline: apt remove nvidia*
Requested-By: fey (1000)
Remove: nvidia-kernel-common-460:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-modprobe:amd64 (384.111-2), nvidia-utils-460:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-prime:amd64 (0.8.16~0.18.04.1), nvidia-dkms-460:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-compute-utils-460:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-driver-440:amd64 (450.119.03-0ubuntu0.18.04.1), nvidia-driver-450:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-driver-460:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-kernel-source-460:amd64 (460.91.03-0ubuntu0.18.04.1), nvidia-settings:amd64 (470.57.01-0ubuntu0.18.04.1)
End-Date: 2021-09-23  22:49:15

Start-Date: 2021-09-23  22:49:25
Commandline: apt autoremove
Requested-By: fey (1000)
Remove: libdrm-nouveau2:i386 (2.4.101-2~18.04.1), libnvidia-compute-460:i386 (460.91.03-0ubuntu0.18.04.1), libnvidia-encode-460:amd64 (460.91.03-0ubuntu0.18.04.1), libnvidia-encode-460:i386 (460.91.03-0ubuntu0.18.04.1), xserver-xorg-video-nvidia-460:amd64 (460.91.03-0ubuntu0.18.04.1), libpciaccess0:i386 (0.14-1), libnvidia-gl-460:amd64 (460.91.03-0ubuntu0.18.04.1), libnvidia-gl-460:i386 (460.91.03-0ubuntu0.18.04.1), libgl1:i386 (1.0.0-2ubuntu2.3), libnvidia-fbc1-460:amd64 (460.91.03-0ubuntu0.18.04.1), libnvidia-fbc1-460:i386 (460.91.03-0ubuntu0.18.04.1), libelf1:i386 (0.170-0.4ubuntu0.1), libnvidia-decode-460:amd64 (460.91.03-0ubuntu0.18.04.1), libnvidia-decode-460:i386 (460.91.03-0ubuntu0.18.04.1), linux-headers-5.3.0-53-generic:amd64 (5.3.0-53.47~18.04.1), libnvidia-cfg1-460:amd64 (460.91.03-0ubuntu0.18.04.1), dkms:amd64 (2.3-3ubuntu9.7), libdrm-amdgpu1:i386 (2.4.101-2~18.04.1), libllvm10:i386 (1:10.0.0-4ubuntu1~18.04.2), libnvidia-ifr1-460:amd64 (460.91.03-0ubuntu0.18.04.1), libnvidia-ifr1-460:i386 (460.91.03-0ubuntu0.18.04.1), libglx0:i386 (1.0.0-2ubuntu2.3), libgl1-mesa-dri:i386 (20.0.8-0ubuntu1~18.04.1), screen-resolution-extra:amd64 (0.17.3), libxdamage1:i386 (1:1.1.4-3), linux-headers-5.3.0-53:amd64 (5.3.0-53.47~18.04.1), libedit2:i386 (3.1-20170329-1), libdrm-intel1:i386 (2.4.101-2~18.04.1), libdrm-radeon1:i386 (2.4.101-2~18.04.1), libnvidia-common-460:amd64 (460.91.03-0ubuntu0.18.04.1), libatomic1:i386 (8.4.0-1ubuntu1~18.04), libnvidia-extra-460:amd64 (460.91.03-0ubuntu0.18.04.1), libxcb-glx0:i386 (1.13-2~ubuntu18.04), libsensors4:i386 (1:3.4.0-4), libglx-mesa0:i386 (20.0.8-0ubuntu1~18.04.1)
End-Date: 2021-09-23  22:49:33

Start-Date: 2021-09-23  22:51:09
Commandline: apt-get install -o DPkg::options::=--force-confnew -y nvidia-driver-470 linux-modules-nvidia-470-generic-hwe-18.04-edge
Requested-By: fey (1000)
Install: libdrm-nouveau2:i386 (2.4.101-2~18.04.1, automatic), linux-image-5.4.0-86-generic:amd64 (5.4.0-86.97~18.04.1, automatic), libnvidia-compute-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-compute-470:i386 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-encode-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-encode-470:i386 (470.63.01-0ubuntu0.18.04.2, automatic), nvidia-kernel-common-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libpciaccess0:i386 (0.14-1, automatic), xserver-xorg-video-nvidia-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-gl-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-gl-470:i386 (470.63.01-0ubuntu0.18.04.2, automatic), libgl1:i386 (1.0.0-2ubuntu2.3, automatic), libnvidia-fbc1-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-fbc1-470:i386 (470.63.01-0ubuntu0.18.04.2, automatic), libelf1:i386 (0.170-0.4ubuntu0.1, automatic), libnvidia-decode-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-decode-470:i386 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-cfg1-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), nvidia-utils-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), nvidia-prime:amd64 (0.8.16~0.18.04.1, automatic), libdrm-amdgpu1:i386 (2.4.101-2~18.04.1, automatic), libllvm10:i386 (1:10.0.0-4ubuntu1~18.04.2, automatic), linux-signatures-nvidia-5.4.0-86-generic:amd64 (5.4.0-86.97~18.04.1, automatic), linux-modules-5.4.0-86-generic:amd64 (5.4.0-86.97~18.04.1, automatic), nvidia-compute-utils-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), linux-modules-nvidia-470-generic-hwe-18.04-edge:amd64 (5.4.0-86.97~18.04.1), libnvidia-ifr1-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libnvidia-ifr1-470:i386 (470.63.01-0ubuntu0.18.04.2, automatic), nvidia-driver-470:amd64 (470.63.01-0ubuntu0.18.04.2), libglx0:i386 (1.0.0-2ubuntu2.3, automatic), libgl1-mesa-dri:i386 (20.0.8-0ubuntu1~18.04.1, automatic), screen-resolution-extra:amd64 (0.17.3, automatic), libxdamage1:i386 (1:1.1.4-3, automatic), libedit2:i386 (3.1-20170329-1, automatic), libdrm-intel1:i386 (2.4.101-2~18.04.1, automatic), libdrm-radeon1:i386 (2.4.101-2~18.04.1, automatic), libnvidia-common-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libatomic1:i386 (8.4.0-1ubuntu1~18.04, automatic), linux-objects-nvidia-470-5.4.0-86-generic:amd64 (5.4.0-86.97~18.04.1, automatic), libnvidia-extra-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), libxcb-glx0:i386 (1.13-2~ubuntu18.04, automatic), libsensors4:i386 (1:3.4.0-4, automatic), nvidia-kernel-source-470:amd64 (470.63.01-0ubuntu0.18.04.2, automatic), nvidia-settings:amd64 (470.57.01-0ubuntu0.18.04.1, automatic), linux-modules-nvidia-470-5.4.0-86-generic:amd64 (5.4.0-86.97~18.04.1, automatic), libglx-mesa0:i386 (20.0.8-0ubuntu1~18.04.1, automatic)
Remove: libnvidia-compute-460:amd64 (460.91.03-0ubuntu0.18.04.1)
End-Date: 2021-09-23  22:52:01

Start-Date: 2021-09-23  23:26:26
Commandline: apt autoremove
Requested-By: fey (1000)
Remove: linux-modules-5.4.0-78-generic:amd64 (5.4.0-78.87~18.04.1), linux-image-5.4.0-77-generic:amd64 (5.4.0-77.86~18.04.1), linux-image-5.4.0-78-generic:amd64 (5.4.0-78.87~18.04.1), linux-modules-extra-5.4.0-77-generic:amd64 (5.4.0-77.86~18.04.1), linux-headers-5.4.0-78-generic:amd64 (5.4.0-78.87~18.04.1), linux-hwe-5.4-headers-5.4.0-77:amd64 (5.4.0-77.86~18.04.1), linux-hwe-5.4-headers-5.4.0-78:amd64 (5.4.0-78.87~18.04.1), linux-headers-5.4.0-77-generic:amd64 (5.4.0-77.86~18.04.1), linux-modules-extra-5.4.0-78-generic:amd64 (5.4.0-78.87~18.04.1), linux-modules-5.4.0-77-generic:amd64 (5.4.0-77.86~18.04.1)
End-Date: 2021-09-23  23:26:35

其他信息

> uname -r
5.4.0-86-generic
> dpkg -l | grep 'linux-' | grep '^ii'
ii  binutils-x86-64-linux-gnu                       2.30-21ubuntu1~18.04.5                           amd64        GNU binary utilities, for x86-64-linux-gnu target
ii  linux-base                                      4.5ubuntu1.6                                     all          Linux image base package
ii  linux-firmware                                  1.173.20                                         all          Firmware for Linux kernel drivers
ii  linux-generic-hwe-18.04                         5.4.0.81.91~18.04.73                             amd64        Complete Generic Linux kernel and headers
ii  linux-headers-5.4.0-81-generic                  5.4.0-81.91~18.04.1                              amd64        Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii  linux-headers-generic-hwe-18.04                 5.4.0.81.91~18.04.73                             amd64        Generic Linux kernel headers
ii  linux-hwe-5.4-headers-5.4.0-81                  5.4.0-81.91~18.04.1                              all          Header files related to Linux kernel version 5.4.0
ii  linux-image-5.4.0-81-generic                    5.4.0-81.91~18.04.1                              amd64        Signed kernel image generic
ii  linux-image-5.4.0-86-generic                    5.4.0-86.97~18.04.1                              amd64        Signed kernel image generic
ii  linux-image-generic-hwe-18.04                   5.4.0.81.91~18.04.73                             amd64        Generic Linux kernel image
ii  linux-libc-dev:amd64                            4.15.0-154.161                                   amd64        Linux Kernel Headers for development
ii  linux-modules-5.4.0-81-generic                  5.4.0-81.91~18.04.1                              amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-5.4.0-86-generic                  5.4.0-86.97~18.04.1                              amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.4.0-81-generic            5.4.0-81.91~18.04.1                              amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-nvidia-470-5.4.0-86-generic       5.4.0-86.97~18.04.1                              amd64        Linux kernel nvidia modules for version 5.4.0-86
ii  linux-modules-nvidia-470-generic-hwe-18.04-edge 5.4.0-86.97~18.04.1                              amd64        Extra drivers for nvidia-470 for the generic-hwe-18.04-edge flavour
ii  linux-objects-nvidia-470-5.4.0-86-generic       5.4.0-86.97~18.04.1                              amd64        Linux kernel nvidia modules for version 5.4.0-86 (objects)
ii  linux-signatures-nvidia-5.4.0-86-generic        5.4.0-86.97~18.04.1                              amd64        Linux kernel signatures for nvidia modules for version 5.4.0-86-generic
ii  linux-signed-generic-hwe-18.04                  5.3.0.62.115                                     amd64        Complete Signed Generic Linux kernel and headers (dummy transitional package)
ii  linux-sound-base                                1.0.25+dfsg-0ubuntu5                             all          base package for ALSA and OSS sound systems
ii  syslinux-common                                 3:6.03+dfsg1-2ubuntu0.18.04.2                    all          collection of bootloaders (common)
ii  syslinux-legacy                                 2:3.63+dfsg-2ubuntu9                             amd64        Bootloader for Linux/i386 using MS-DOS floppies
> lspci -vvv
...
22:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
    Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 10
    Region 0: I/O ports at f000 [size=256]
    Region 2: Memory at f7504000 (64-bit, non-prefetchable) [size=4K]
    Region 4: Memory at f7500000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
...

不过,nvidia 驱动运行良好

> nvidia-smi
Sat Sep 25 00:43:24 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    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:26:00.0  On |                  N/A |
| 33%   36C    P8    21W / 215W |    572MiB /  7974MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2194      G   /usr/bin/gnome-shell               88MiB |
|    0   N/A  N/A      3776      G   /usr/lib/xorg/Xorg                233MiB |
|    0   N/A  N/A      4000      G   /usr/bin/gnome-shell              183MiB |
|    0   N/A  N/A      4890      G   ...AAAAAAAAA= --shared-files       10MiB |
|    0   N/A  N/A      5757      G   gnome-control-center                2MiB |
|    0   N/A  N/A     11742      G   ...AAAAAAAAA= --shared-files       40MiB |
+-----------------------------------------------------------------------------+

感谢您的帮助

答案1

我在 20.04 上尝试了 Nvidia 470 驱动程序,至少有线网络可以工作,但不确定 wifi 和蓝牙是否可以工作。

$ uname -r
5.4.0-88-generic
$ lspci -vvv
....
18:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
    Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 34
    Region 0: I/O ports at f000 [size=256]
    Region 2: Memory at f7504000 (64-bit, non-prefetchable) [size=4K]
    Region 4: Memory at f7500000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: r8169
    Kernel modules: r8169
...

以下是安装步骤:

  1. 从 Nvidia 官方网站下载驱动程序,文件名应类似于:NVIDIA-Linux-x86_64-470.74.run
  2. 按 Ctrl+Alt+F1 进入控制台模式,
$ sudo service lightdm stop;  # this is for Unity, for Gnome, change 
lightdm to gdm
  1. 运行470
sudo bash NVIDIA-Linux-x86_64-470.74.run

470 驱动程序将首先尝试卸载开源 nouveau 驱动程序,它会创建 /etc/modprobe.d/nvidia-installer-disable-nouveau.conf,重启后,如果 nouveau 仍然加载,请尝试运行:

$ sudo update-initramfs -u ; # and reboot again

无论如何,确保 nouveau 没有被加载(通过命令检查: lsmod|grep nouveau )并转到步骤 3。

高血压

答案2

我相信这个依赖问题已经修复了。我留下答案以供参考。将来可能会出现类似的问题。


我在 ubuntu 20.04 中遇到了同样的问题。

网络接口为何消失了?

奇怪的是nvidia-driver-470与其他 nvidia-driver 版本不同,它不依赖于dkms。DKMS 允许在内核更新时自动重新编译内核模块。相反linux-modules-nvidia-470-oracle-lts-20.04需要nvidia-driver-470.这导致一个特殊的内核linux-image-5.4.0-1057-oracle。使用此内核启动后,显卡可以工作,但我的网络接口消失了。因此,内核没有包含通用驱动程序所包含的所有常见驱动程序。

我认为依赖关系被破坏了nvidia-driver-470

该怎么做才能解决这个问题?

  • 重新启动并选择旧内核以恢复网络(GFX 卡支持将受到限制)
  • 安装不同的驱动程序,nvidia-driver-460或者nvidia-driver-495,均支持 Vulkan。
  • 删除特殊内核sudo apt remove *1057-oracle*。它可能是 grub 中的默认内核。
  • 重启。

相关内容