I'm trying to install drivers for my Wifi on my HP All-in-one desktop. I've been told to show the output of the command "sudo lshw -C network" so here it is:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd
physical id: 0
bus info: pci@0000:01:00.0
logical name: enp1s0
version: 15
serial: 48:ba:4e:5c:06:5f
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.21 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: ire:31 import:e000(size=256) memory: fea04000-fea04fff memory:fea00000-fea03fff
*-network UNCLAIMED
description: Network controller
product: Realtek Semiconductor Co., Ltd.
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress cap_list
configuration: latency=0
resources: import:d000(size=256) memory:fe900000-fe90ffff
Output from "lspci -nnk | grep -A2 0280":
02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a]
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)
(This question is a duplicate of Wi-Fi not working on Lenovo ThinkPad E570 (Realtek RTL8821CE) but I was pleased that we eventually found a solution so will write up what worked for Haz.)
As far as I can tell, at the time of writing this, there is not yet a Wifi Driver for the Realtek RTL8821CE in the official Ubuntu Repositories.
Over on github there is a repository with an RTL8821CE driver aimed at kernels 4.14 and above and specifically for Arch Linux with no support provided for other Linux Distros: https://github.com/tomaspinho/rtl8821ce
(Minor note: as of February 2019 tomaspinho is sadly no longer able to maintain the driver as he no longer has access to a computer with this chipset, and so a new maintainer may be needed, but the driver still works with Ubuntu 18.04 as at that time.)
It has, however, been reported to work just fine with Ubuntu 18.04.
The solution is taken directly from post #4 by Praseodym: https://ubuntuforums.org/showthread.php?t=2398917 and will install a number of packages for building the wifi driver module (git, dkms, build-essential & linux-headers) and clone the git repository from tomaspinho.
DKMS is used because it's "a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated."
Open up a terminal and type the following lines (You can cut and paste if you prefer):
After this is completed successfully, you should reboot and find that your Wifi is working.
You also want to make sure SecureBoot is Disabled in the BIOS settings or it won't let you load the unsigned self-complied kernel module.
OR
Sign the 8821ce.ko file yourself as per command given here
@pHeLiOn's answer helped me out, but it wasn't enough. So here is exactly what I did to get it working on my HP.
Make sure to remove the driver if you have previously unsuccessfully installed it via
sudo ./dkms-install.sh
and then the directoryrm -rf rtl8821ce
. It may be located incd /var/lib/dkms/
, delete it there too.I disabled secure boot (you need to reboot after this command and enter the password chars on the blue screen):
I upgraded the Kernel from 4.15 to 4.18, cuz for some reason it wouldn't work with 4.15. Use
uname -a
to check your kernel version.Then I reinstalled the dkms headers:
I pulled the github respiratory:
Entered the new directory:
I changed the the file permissions:
I synced the driver to the correct kernel version:
I installed the driver:
Finally I rebooted, and to my amazement it worked.
Additionally I changed my PCIe Activate State Power Management as suggested in the github respiratory.
The commands in the post just before this were correct except for the git pull. There is a username and password authentication requirement so you have to just go to the webpage -- https://github.com/tomaspinho/rtl8821ce -- and download the .zip file. I then tried following through with changing the shell files to executable as suggested but when they ran there was a discrepency as to where the files needed to be located. (Im definitely not complaining, it can just be a bit confusing if you didn't really know what you were doing) The files need to be extracted to /usr/src/rtl8821ce-1.0.0 (make a new directory "rtl8821ce-1.0.0" inside /usr/src) and THEN chmod +x dkms-install.sh, everything should work out like gravy from there. Thank you so much whoever wrote this script. I dumped about 600 dollars into this badass machine and was thinking the wifi wouldn't work. Cheers.
To be specific, the machine is a new HP Pavilion x360 2-in-1 with windows 10 and ubuntu studio 18.04.