0

I'm trying to get Linux working with my Lenovo Yoga 530-14ARR laptop. It has a wireless Realtek "rtl8821ce" card, which is not recognized out of the box by my brand new Lubuntu 18.10 install (I tried other lightweight distros before, without success). According to this question's top answer, compiling this and modprobe the resulting module should do the trick.

Unfortunately, I can't get it to compile on my machine:

liloboot@lubuntu:~/rtl8821ce$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.18.0-10-generic/build M=/home/liloboot/rtl8821ce  modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.0-10-generic'
Makefile:982: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/liloboot/rtl8821ce/os_dep/linux/os_intfs.o
    /home/liloboot/rtl8821ce/os_dep/linux/os_intfs.c:1325:22: error: initialization of ‘u16 (*)(struct net_device *, struct sk_buff *, void *, u16 (*)(struct net_device *, struct sk_buff *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, void *, short unsigned int (*)(struct net_device *, struct sk_buff *))’} from incompatible pointer type ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *, u16 (*)(struct net_device *, struct sk_buff *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *, short unsigned int (*)(struct net_device *, struct sk_buff *))’} [-Werror=incompatible-pointer-types]
  .ndo_select_queue = rtw_select_queue,
                      ^~~~~~~~~~~~~~~~
/home/liloboot/rtl8821ce/os_dep/linux/os_intfs.c:1325:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:327: /home/liloboot/rtl8821ce/os_dep/linux/os_intfs.o] Error 1
make[1]: *** [Makefile:1546: _module_/home/liloboot/rtl8821ce] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-10-generic'
make: *** [Makefile:1902: modules] Error 2

EDIT: Following chili555's comment, I tried this. It finally worked but I had several problems that I want to point out in an answer. See below.

2
  • 3
    Ubuntu 18.10 uses a newer kernel version than that contemplated in the answer you quoted above. I suggest that you try this instead: askubuntu.com/questions/1070593/… It 'makes' for me in 18.10, albeit with a few possibly harmless warnngs. Welcome to Ask Ubuntu.
    – chili555
    Feb 6, 2019 at 20:46
  • Thanks a lot for pointing that out. I posted an answer with some complements. Feb 6, 2019 at 22:34

1 Answer 1

1

Problems and solutions when following the steps of this answer:

  • Coming from a Windows PC, all script files where in a wrong format, resulting in a 'no such file or directory' error when trying to sudo ./dkms-install.sh. I had to dos2unix all of them.
  • I had to manually sudo-run some of the dkms commands in dkms-install.sh because sudo ./dkms-install.sh was reporting errors that I finally interpreted as a lack of privileges. Don't know why.

sudo dkms build -m rtl8821ce -v v5.2.5_1.26055.20180108

sudo dkms install -m rtl8821ce -v v5.2.5_1.26055.20180108

  • Then I rebooted and ip a showed the new wlp1s0 network interface. But I was not out of the woods yet.
  • The wifi module was still hard-blocked, as shown by the outputs of nmcli radio and rfkill list. I had to add an entry to /etc/modprobe.d/blacklist.conf as explained in this: append blacklist ideapad_laptop at the end of the file, then reboot.

And the wifi module is now working properly.

2
  • Awesome! Glad to hear it's working.
    – chili555
    Feb 6, 2019 at 22:43
  • @chili555 Thanks again! 15 years without Linux and the first thing I had to do when coming back was messing with a wireless connection problem... I see that manufacturers still have a long way to go... You really have to want it on some configurations. Feb 6, 2019 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .