Wifi driver after kernel upgrade

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
Post Reply
skomo
Level 1
Level 1
Posts: 15
Joined: Mon Dec 18, 2017 2:59 am

Wifi driver after kernel upgrade

Post by skomo » Thu Oct 04, 2018 12:48 am

Hi all, linux noob here.
I bought a wifi ac chinese usb dongle sporting a Realtek rtl8821cu chip, found a working driver, and installed via

Code: Select all

make
sudo make install
sudo modprobe 8821cu
It worked perfectly since yesterday when i updated the kernel to 4.15.0-36, than rebooted and.... no wifi.
i tried to reinstall the driver via

Code: Select all

make
sudo make install
sudo modprobe 8821cu
And now it works again.

The questions are:

1- I need to reinstall the driver every kernel update?
2- If yes, i always need to make and install or i can simply "modprobe" or something else?

Thanks

User avatar
AZgl1500
Level 9
Level 9
Posts: 2772
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: Wifi driver after kernel upgrade

Post by AZgl1500 » Thu Oct 04, 2018 2:01 am

JeremyB will help you fix it,
he did for me.
I had the same problems, had to reinstall with each new kernel.

JeremyB wrote a special script just for me, and mine is good now.

JeremyB
Level 19
Level 19
Posts: 9337
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi driver after kernel upgrade

Post by JeremyB » Thu Oct 04, 2018 5:11 pm

Where is the source code from?

skomo
Level 1
Level 1
Posts: 15
Joined: Mon Dec 18, 2017 2:59 am

Re: Wifi driver after kernel upgrade

Post by skomo » Tue Oct 09, 2018 12:58 am

Hi, i found this driver on github https://github.com/whitebatman2/rtl8821CU

I haven't understand if i need to make, make install then modprobe everytime i upgrade the kernel or i can only modprobe or similar..

JeremyB
Level 19
Level 19
Posts: 9337
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi driver after kernel upgrade

Post by JeremyB » Tue Oct 09, 2018 5:28 am

Since that source code has no dkms.conf file, the make, sudo make install commands will be needed after kernel updates but if you want to a dkms.conf file can be created in the rtl8821CU folder

Code: Select all

xed ~/rtl8821CU/dkms.conf
Use this for contents

Code: Select all

PACKAGE_NAME="rtl8821cu"
PACKAGE_VERSION="1.0"
BUILT_MODULE_NAME="8821cu"
DEST_MODULE_LOCATION="/kernel/drivers/net/wireless/"
REMAKE_INITRD="yes"
AUTOINSTALL="yes"
MAKE="'make' all KVER=${kernelver}"
CLEAN="make clean"
Save and exit text editor, then in terminal

Code: Select all

cd
sudo apt install dkms
sudo dkms add rtl8821CU
sudo dkms install rtl8821cu/1.0
Then it should compile during the install of a new kernel automatically

skomo
Level 1
Level 1
Posts: 15
Joined: Mon Dec 18, 2017 2:59 am

Re: Wifi driver after kernel upgrade

Post by skomo » Wed Oct 10, 2018 1:27 am

Thanks a lot man, you are great! I'll give a try.
I would not have known where to start.

What to do if i want to remove this script to install the driver automatically?

P.S. now i need to "study" what DKMS is.

JeremyB
Level 19
Level 19
Posts: 9337
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi driver after kernel upgrade

Post by JeremyB » Wed Oct 10, 2018 4:15 am

Code: Select all

sudo dkms remove rtl8821cu/1.0 --all
Will remove the dkms for the module

skomo
Level 1
Level 1
Posts: 15
Joined: Mon Dec 18, 2017 2:59 am

Re: Wifi driver after kernel upgrade

Post by skomo » Tue Oct 23, 2018 12:19 am

Yesterday i upgraded the kernel, and your script worked perfectly. I'm impressed with how powerful linux can be if you know enough of it.

Post Reply

Return to “Wireless”