0

I have a newish HP laptop with a Realtek RTL8821CE wireless network card. It didn't work right away when I installed Ubuntu 20.04, so I followed the instructions here with success, even though those instructions were supposedly limited to Ubuntu 18.04. Fast-forward to today: I ran "sudo apt-get autoremove" as a routine matter, and noticed a message from DKMS saying that the module was being uninstalled. I suspected that this would close down my computer's wireless connection abilities the next time I rebooted, and that did happen. I am really not sure why uninstalling old kernels and such should have prompted DKMS to completely remove a module I was using, but I tried following the steps in @ThomasAFink's answer again with my current kernel ("linux-modules-5.4.0-37-generic 5.4.0-37.41", I believe). The steps worked, but DKMS ended with a message saying:

Good news! Module version v5.5.2_34066.20200325_COEX20180712-3232 for 8821ce.ko exactly matches what is already found in kernel 5.4.0-37-generic. DKMS will not replace this module. You may override by specifying --force.

I guessed that it might be fruitful to revert to the kernel version that was removed by "apt-get autoremove", so I followed these steps to determine that it was 5.4.0-31-generic, and booted into that kernel to perform the same steps again. However, DKMS has given me the same message, and WiFi still doesn't work. I have a backup, Ubuntu 18.04 installed on the same computer, which does still support Wifi with tomaspinho's driver. However, there are a bunch of annoyances associated with reverting to 18.04 - older version of Emacs, which I use quite heavily, among others - and I would like to resolve this issue in 20.04 if possible. Any ideas?

Requested edit: The output of dkms status is:

rtl8821ce, v5.5.2_34066.20200325, 5.4.0-31-generic, x86_64: installed

I'm not able to get the output of 'uname -r' through chroot, but hopefully I have made it clear which kernel versions I am working with, above.

Requested edit: Here is a log from this morning of what I did. This log has the output of uname, dkms status, and everything else. In case you're wondering how git clone worked without internet access - I'm tethering my phone.

  • Please edit your question to add the result of the terminal command: sudo dkms status and also: uname -r – chili555 Jun 14 '20 at 23:20
  • It appears that the correct driver is built and installed in kernel version xx-31 only. Your original question says that it is not working in xx-37 or perhaps xx-41. It is difficult to repair without knowing what kernel version you are booted into. I admit that I am unfamiliar with the chroot environment. What does this tell us? modinfo lp | grep file It should tell you the current running kernel version. – chili555 Jun 15 '20 at 14:29

1 Answers1

1

As we see from your paste, you followed both the sudo make install and the dkms process. That is what leads to the message:

Module version v5.5.2_34066.20200325_COEX20180712-3232 for 8821ce.ko exactly matches what is already found in kernel 5.4.0-31-generic.

In other words, dkms is not going to install it because sudo make install has already installed it.

These two methods are different ways to do the same thing; they need not be mixed and may result, as you've seen, in confusing results.

I suggest that you do:

cd ~/git/rtl8821ce
sudo make uninstall
sudo dkms remove rtl8821ce/v5.5.2_34066.20200325 --all

Confirm that it is removed:

sudo dkms status

It should return nothing. If so, try only the dkms process:

sudo dkms-install.sh
sudo modprobe 8821ce

Your wirless should now be working.

To install it for kernel version xx-37, the latest available, as far as I know, reboot into xx-37 and repeat:

cd ~/git/rtl8821ce
sudo dkms-install-sh  

EDIT: In our chat we found this in your wireless info paste:

0: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no

Soft blocked:yes typically means either that Airplane Mode is set to On in Network Manager or else in Settings > WiFi. After checking and toggling both, your wireless is now working properly.

chili555
  • 60,188
  • Thanks @chili555. I will respond further a little later after trying this out. – airbornemihir Jun 15 '20 at 16:31
  • Dear @chili555 unfortunately this didn't work for me; the wireless didn't come back on. I got your point about sudo make install colliding with ./dkms-install... so I did only the latter. See here: https://paste.ubuntu.com/p/zvR2mJGWYc/ I expect this to work because it did work with an earlier version - most likely 5.4.0-31-generic, which got uninstalled when I did apt-get autoremove - so it really flummoxes me that I'm unable to find my path back to making it work, sigh. – airbornemihir Jun 15 '20 at 22:51
  • Let's dig a little deeper. Please let me see a paste of: lspci -nnk | grep 0280 -A3 and also: dmesg | grep -i rtl – chili555 Jun 15 '20 at 23:21
  • Thanks for sticking with this. Here is the paste you asked for: https://paste.ubuntu.com/p/dSZQ6KQtr8/ – airbornemihir Jun 16 '20 at 12:45
  • Here is evidence that the wireless is still hosed: https://imgur.com/a/Idrpn7r – airbornemihir Jun 16 '20 at 12:47
  • It shows a wireless interface, wlo1, was created. Is it improperly managed elsewhere than Network Manager? /etc/network/interfaces? Netplan? Does it scan and see networks? sudo iwlist wlo1 scan or else: nmcli device wifi list Are there any clues here? dmesg | grep wlo1 – chili555 Jun 16 '20 at 14:11
  • @chil555 let me check with these commands. – airbornemihir Jun 16 '20 at 17:00
  • sudo iwlist wlo1 scan works in that it detects a bunch of wifi networks nearby, which I'll post only if needed because my neighbours probably don't need their wifi names out on the web... nmcli device wifi list doesn't show anything, which is surprising but probably not a problem. I looked up other AskUbuntu answers about NetworkManager not seeing a wifi card, but most of them, like your comment, pointed to /etc/network/interfaces which doesn't exist. Finally, the 1 line emitted by dmesg | grep wlo1 is "[ 2.366168] rtl8821ce 0000:02:00.0 wlo1: renamed from wlan0". Any ideas? – airbornemihir Jun 16 '20 at 17:48
  • One more thing: I looked at the output of journalctl -u NetworkManager. It didn't tell me much, but it is here: https://paste.ubuntu.com/p/QwSW2d465m/ – airbornemihir Jun 16 '20 at 18:35
  • Let's also see a paste of: cat /etc/netplan/*.yaml If needed, please redact any personal details with xxxx. Also: cat /etc/NetworkManager/NetworkManager.conf We know that NM is operating correctly as the USB connects as expected. By any chance, is Wicd installed? – chili555 Jun 16 '20 at 20:05
  • I ran both of those commands: https://paste.ubuntu.com/p/JzCpW958bQ/ Also, I ran dpkg -l | grep wicd getting no output. – airbornemihir Jun 16 '20 at 20:52