Kubuntu 19.10 内核更新后(即通过正常更新),wifi 停止工作,驱动程序不再加载。我尝试运行,但sudo modprobe -v iwlwifi
没有成功,结果如下:
insmod /lib/modules/5.3.0-24-generic/updates/dkms/compat.ko
modprobe: ERROR: could not insert 'iwlwifi': Operation not permitted
我相信这可能是由于 SecureBoot 以及我需要对模块进行签名的事实iwlwifi
。
我发现这为 SecureBoot 签署内核模块的示例,并尝试了此处显示的 VirtualBox 示例。这对 VirtualBox 有效。(VirtualBox 无法工作这个问题困扰了我一段时间。)然后我尝试了以下相同的操作iwlwifi
:
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n iwlwifi)
但这次,没有任何效果。上面的错误信息(“操作不允许”)仍然存在。
我尝试在 BIOS 中禁用 SecureBoot,但 Kubuntu 却无法启动。我可以输入密码,但桌面却变灰,系统死机了。
所以我重新打开了安全启动。列出昨天的更新时,grep " upgrade " /var/log/dpkg.log
发现以下内容:
2019-12-07 09:47:31 upgrade backport-iwlwifi-dkms:all 7906-0ubuntu1 7906-0ubuntu2~19.10.1
为了修复问题,我卸载并重新安装了backport-iwlwifi-dkms
。重新安装时,系统引导我完成签署安全启动模块的过程。这最初看起来很有希望,但重新启动后,系统无法启动。所以现在我的系统死机了,桌面呈灰色,无论是否启用安全启动。不过,我仍然可以从启动菜单启动到以前的内核版本。
Eoan 反向移植已在源列表中启用。
而在以前的内核版本中,则dkms status
产生以下输出:
backport-iwlwifi, 7906, 5.3.0-24-generic, x86_64: installed (WARNING! Diff between built and installed module!)
virtualbox, 6.0.14, 5.3.0-23-generic, x86_64: installed
virtualbox, 6.0.14, 5.3.0-24-generic, x86_64: installed (WARNING! Diff between built and installed module!)
并ls -al /lib/modules/*/updates/dkms
产生以下输出:
/lib/modules/5.3.0-23-generic/updates/dkms:
total 636
drwxr-xr-x 2 root root 4096 Dec 8 15:33 .
drwxr-xr-x 3 root root 4096 Nov 15 09:06 ..
-rw-r--r-- 1 root root 547635 Nov 15 09:06 vboxdrv.ko
-rw-r--r-- 1 root root 15523 Nov 15 09:06 vboxnetadp.ko
-rw-r--r-- 1 root root 38803 Nov 15 09:06 vboxnetflt.ko
-rw-r--r-- 1 root root 36331 Nov 15 09:06 vboxpci.ko
/lib/modules/5.3.0-24-generic/updates/dkms:
total 4408
drwxr-xr-x 2 root root 4096 Dec 8 15:37 .
drwxr-xr-x 3 root root 4096 Dec 7 09:49 ..
-rw-r--r-- 1 root root 1124323 Dec 8 15:37 cfg80211.ko
-rw-r--r-- 1 root root 7227 Dec 8 15:37 compat.ko
-rw-r--r-- 1 root root 684483 Dec 8 15:37 iwlmvm.ko
-rw-r--r-- 1 root root 676194 Dec 8 12:29 iwlwifi.ko
-rw-r--r-- 1 root root 82699 Dec 8 15:37 iwlxvt.ko
-rw-r--r-- 1 root root 1272979 Dec 8 15:37 mac80211.ko
-rw-r--r-- 1 root root 548088 Dec 8 12:06 vboxdrv.ko
-rw-r--r-- 1 root root 15523 Dec 7 09:49 vboxnetadp.ko
-rw-r--r-- 1 root root 38803 Dec 7 09:49 vboxnetflt.ko
-rw-r--r-- 1 root root 36331 Dec 7 09:49 vboxpci.ko
编辑:@heynnema 要求我将几个命令的输出发布在下面作为他答案的一部分:
步骤3:
ls -al /etc/modprobe.d
:
total 60
drwxr-xr-x 2 root root 4096 Dec 5 13:52 .
drwxr-xr-x 143 root root 12288 Dec 7 09:49 ..
-rw-r--r-- 1 root root 2507 Jul 31 2015 alsa-base.conf
-rw-r--r-- 1 root root 154 Aug 1 02:54 amd64-microcode-blacklist.conf
-rw-r--r-- 1 root root 325 Apr 30 2019 blacklist-ath_pci.conf
-rw-r--r-- 1 root root 1518 Apr 30 2019 blacklist.conf
-rw-r--r-- 1 root root 210 Apr 30 2019 blacklist-firewire.conf
-rw-r--r-- 1 root root 677 Apr 30 2019 blacklist-framebuffer.conf
-rw-r--r-- 1 root root 156 Jul 31 2015 blacklist-modem.conf
lrwxrwxrwx 1 root root 41 Oct 31 12:22 blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
-rw-r--r-- 1 root root 583 Apr 30 2019 blacklist-rare-network.conf
-rw-r--r-- 1 root root 127 Oct 3 10:38 dkms.conf
-rw-r--r-- 1 root root 154 Sep 30 19:37 intel-microcode-blacklist.conf
-rw-r--r-- 1 root root 347 Apr 30 2019 iwlwifi.conf
more /etc/modprobe.d/iwlwifi.conf
:
# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system. When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211
dkms status
什么也没显示。
ls -al /lib/modules/*/updates/dkms
:
total 8
drwxr-xr-x 2 root root 4096 Dec 8 17:25 .
drwxr-xr-x 3 root root 4096 Dec 7 09:49 ..
sudo lshw -C network
:
*-network:0 UNCLAIMED
description: Network controller
product: Cannon Point-LP CNVi [Wireless-AC]
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
version: 30
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix cap_list
configuration: latency=0
resources: memory:c9738000-c973bfff
*-network:1
description: Ethernet interface
product: Ethernet Connection (6) I219-LM
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@0000:00:1f.6
logical name: enp0s31f6
version: 30
serial: 98:fa:9b:d4:56:64
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.4-3 ip=192.168.1.213 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:147 memory:c9700000-c971ffff
步骤4:
卸载并重新安装virtualbox
(因为virtualbox-6.0
不存在)。步骤 4 中的其余两个命令不返回任何内容。
步骤5:
ls -al /lib/modules/5.3.0-24-generic/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
:
-rw-r--r-- 1 root root 640985 Nov 13 22:41 /lib/modules/5.3.0-24-generic/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
modinfo iwlwifi
:
filename: /lib/modules/5.3.0-24-generic/updates/dkms/iwlwifi.ko
modinfo: ERROR: could not get modinfo from 'iwlwifi': No such file or directory
dpkg -l *virtualbox*
:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============================-=============-============-============================================================
ii virtualbox 6.0.14-dfsg-1 amd64 x86 virtualization solution - base binaries
un virtualbox-2.0 <none> <none> (no description available)
un virtualbox-2.1 <none> <none> (no description available)
un virtualbox-2.2 <none> <none> (no description available)
un virtualbox-3.0 <none> <none> (no description available)
un virtualbox-3.1 <none> <none> (no description available)
un virtualbox-3.2 <none> <none> (no description available)
un virtualbox-4.0 <none> <none> (no description available)
un virtualbox-4.1 <none> <none> (no description available)
un virtualbox-4.2 <none> <none> (no description available)
un virtualbox-4.3 <none> <none> (no description available)
un virtualbox-5.0 <none> <none> (no description available)
un virtualbox-5.1 <none> <none> (no description available)
un virtualbox-5.2 <none> <none> (no description available)
un virtualbox-6.0 <none> <none> (no description available)
ii virtualbox-dkms 6.0.14-dfsg-1 all x86 virtualization solution - kernel module sources for dkms
un virtualbox-guest-additions-iso <none> <none> (no description available)
un virtualbox-guest-dkms <none> <none> (no description available)
un virtualbox-guest-modules <none> <none> (no description available)
un virtualbox-modules <none> <none> (no description available)
ii virtualbox-qt 6.0.14-dfsg-1 amd64 x86 virtualization solution - Qt based user interface
un virtualbox-source <none> <none> (no description available)
cat /etc/network/interfaces
:
cat: /etc/network/interfaces: No such file or directory
cat /etc/netplan/*.yaml
:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
第 6 步:
VirtualBox 无法打开。错误消息:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing
'modprobe vboxdrv'
as root.
If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
启用了反向移植,想重新安装backport-iwlwifi-dkms
,但它已经在那里了。我点击了re-install
。之后,dkms status
返回backport-iwlwifi, 7906, 5.3.0-24-generic, x86_64: installed
。输出sudo lshw -C network
:
*-network:0
description: Network controller
product: Cannon Point-LP CNVi [Wireless-AC]
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
version: 30
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list
configuration: driver=iwlwifi latency=0
resources: irq:16 memory:c9738000-c973bfff
*-network:1
description: Ethernet interface
product: Ethernet Connection (6) I219-LM
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@0000:00:1f.6
logical name: enp0s31f6
version: 30
serial: 98:fa:9b:d4:56:64
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.4-3 ip=192.168.1.213 latency=0 lin
resources: irq:147 memory:c9700000-c971ffff
ls -al /lib/modules/*/updates/dkms
:
total 3776
drwxr-xr-x 2 root root 4096 Dec 8 18:48 .
drwxr-xr-x 3 root root 4096 Dec 7 09:49 ..
-rw-r--r-- 1 root root 1124323 Dec 8 18:48 cfg80211.ko
-rw-r--r-- 1 root root 7227 Dec 8 18:48 compat.ko
-rw-r--r-- 1 root root 684483 Dec 8 18:48 iwlmvm.ko
-rw-r--r-- 1 root root 674835 Dec 8 18:48 iwlwifi.ko
-rw-r--r-- 1 root root 82699 Dec 8 18:48 iwlxvt.ko
-rw-r--r-- 1 root root 1272979 Dec 8 18:48 mac80211.ko
答案1
步骤1
启动到先前的内核。
至少暂时禁用 backports repo 并更新软件数据库。
在terminal
...
sudo dkms remove backport-iwlwifi/7906 --all
# 删除 dkms 驱动程序
sudo dkms remove virtualbox/6.0.14 --all
# 删除 dkms 驱动程序
dkms status
# 不应显示任何内容
ls -al /lib/modules/*/updates/dkms
# 重新检查 dkms 目录
启动到较新的内核,并检查 wifi 是否再次工作。
第2步
sudo rm -i /lib/modules/5.3.0-24-generic/updates/dkms/iwlwifi.ko
sudo rm -i /lib/modules/5.3.0-24-generic/updates/dkms/vboxdrv.ko
ls -al /lib/modules/*/updates/dkms
# 不应显示任何内容
reboot
# 重启系统
重新检查 wifi。
步骤#3
ls -al /etc/modprobe.d
# 显示配置文件
more /etc/modprobe.d/iwlwifi.conf
# 给我看看
dkms status
# 应该什么都没有
ls -al /lib/modules/*/updates/dkms
# 不应显示任何内容
sudo lshw -C network
# 显示网络配置
步骤4
sudo apt-get remove virtualbox
# 卸载 VB
sudo apt-get install virtualbox
#重新安装 VB
dkms status
# 给我看看
ls -al /lib/modules/*/updates/dkms
# 给我看看
步骤#5
ls -al /lib/modules/5.3.0-24-generic/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
# 显示原始 iwlwifi 内核模块
modinfo iwlwifi
# 内核模块信息
dpkg -l *virtualbox*
# 给我看看
cat /etc/network/interfaces
# 给我看看
cat /etc/netplan/*.yaml
# 给我看看
步骤#6
现在...勇敢地向前迈进...
dkms status
# 应该显示 virtualbox,没有错误
尝试 Virtualbox 并确保其可以正常工作。
重新启用 backports repo 并更新软件数据库。
运行Software Updater
# reinstall backport-iwlwifi-dkms
暂时不要重新签署iwlwifi模块。
dkms status
# 再显示一次
sudo lshw -C network
# 再显示一次
ls -al /lib/modules/*/updates/dkms
# 再显示一次
重新测试 wifi
最终的...
启动到先前工作的内核
我们卸载了
backport-iwlwifi
dkms 内核模块启动回 -24 内核
删除并重新
virtualbox
安装virtualbox-dkms
重新签名 VirtualBox 内核模块
wifi 和 virtualbox 现已正常运行