Error when using Make for a Wifi driver

hello sweet people!

I’m trying to install new wifi drivers because the default one for my wifi card sucks. I’m following a guide on this particular wifi adapter, which apparently is known to have issues on linux.
The guide says:

git clone https://github.com/lwfinger/rtlwifi_new
cd rtlwifi_new
git checkout rock.new_btcoex
make
sudo make install

basically it’s grabbing the driver from git, changing the branch, compiling the driver and installing it. However I can’t make the file, I get 2 errors.

eze@kanji:~/rtlwifi_new$ make
make -C /lib/modules/4.15.0-30-generic/build M=/home/eze/rtlwifi_new modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-30-generic'
  CC [M]  /home/eze/rtlwifi_new/base.o
In file included from /home/eze/rtlwifi_new/base.c:26:0:
/home/eze/rtlwifi_new/wifi.h:43:2: error: #error "This branch is abandoned. Please do not use"
 #error "This branch is abandoned. Please do not use"
  ^~~~~
/home/eze/rtlwifi_new/base.c: In function ‘_rtl_init_deferred_work’:
/home/eze/rtlwifi_new/base.c:602:2: error: implicit declaration of function ‘setup_timer’; did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
  setup_timer(&rtlpriv->works.watchdog_timer,
  ^~~~~~~~~~~
  sk_stop_timer
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/home/eze/rtlwifi_new/base.o' failed
make[2]: *** [/home/eze/rtlwifi_new/base.o] Error 1
Makefile:1552: recipe for target '_module_/home/eze/rtlwifi_new' failed
make[1]: *** [_module_/home/eze/rtlwifi_new] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-30-generic'
Makefile:57: recipe for target 'all' failed
make: *** [all] Error 2

One error is about the used branch, I don’t really think it matters that much tbh.
The second one has an invalid function apparently, which is why I can’t compile this.

Any suggestions? Or anyone knows a better driver for the RTL8723BE ?

They hardcoded that error. From the commit log it is clear that was intentional to mark that branch as not maintained.

$ git log --oneline
34a22ef (HEAD -> rock.new_btcoex, origin/rock.new_btcoex) rtlwifi_new: Add error directive that this branch is no longer maintained
...

Add error directive that this branch is no longer maintained

You can see that rock.new_btcoex branch is stale.

Looks like they didn’t update the README.

master branch builds without errors on Arch.

1 Like

this worked, I was able to compile it!

After making the install I have the driver, I followed the guide to set it up. However nothing changed, my wifi is still utter poo :frowning:

I’ve read that this driver won’t load when secure bios is turned on in the uefi
However, I’ve tried with it on and off, and nothing changed, I guess I’ll keep trying.

One weird thing: During the live boot I did to test the distro out, wifi worked pretty good actually, it was after the OS install that it all went south. Any clues?

What distro are you using?

Can you give me the output of

$ lspci | grep Wireless

and of

$ uname -a

I know this isn’t the answer you’re looking for. Ditch it and buy an Intel WiFi chip instead. You’re literally wasting your valuable time (unless you’re a WiFi driver developer or have a shitty Lenovo laptop with whitelisted cards)

Weirdly using lspci doesn’t show any network stuff, however with:

eze@kanji:~$ sudo lshw -C network
*-network:0
description: Wireless interface
physical id: 1
bus info: usb@1:7
logical name: wlx54c9dfb80482
serial: 54:c9:df:b8:04:82
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8xxxu driverversion=4.15.0-30-generic firmware=N/A link=no multicast=yes wireless=IEEE 802.11

I’m using Xubuntu 18.04 btw.

The guide you linked has rtl8723be as the driver you activate, but it seems from

that you need rtl8xxxu so I assume it’s rtl8192cu. Try to modprobe that one,


Might I add that the repo’s README has this in it:

This code will build on any kernel 4.2 and newer as long as the distro has not modified any of the kernel APIs. IF YOU RUN UBUNTU, YOU CAN BE ASSURED THAT THE APIs HAVE CHANGED. NO, I WILL NOT MODIFY THE SOURCE FOR YOU. YOU ARE ON YOUR OWN!!!

1 Like

I’ve been considering it, however this is a really cheap laptop, 14" quite slim, nice looking screen and acceptable keyboard, but it only has 4gb ram (on board, doesn’t have slots), and a Celeron N3350 dual core CPU. Plus a eMMC 32gb drive + 500gb HDD.
The battery is pretty decent because it’s the same one their higher power models use, while being quite low power and fanless.

I’ve got it for about $150

What I mean is, it’s a dirt cheap system, and I don’t know how cheap I can get a replacement wifi module.
Plus, I tried it on windows (which I don’t use), but it worked pretty OK, It SHOULD be decent on linux

If you were in the UK is just send you one I have spares laying around :smile: there like £15 normally.

Try and get it working but don’t go to the end of the earth for it. You can look up the WiFi slot type and get a new chip online pretty cheap if you don’t get it working.

I’d probably say if/when you stop learning anything from this process then stop doing it and just go for the one that will let you get on with other stuff.

1 Like

Oh to answer this slightly. There are a couple of WiFi chip types that don’t have drivers with code allowed in the kenrel. As such, they are a pain and horrible to work with in the long run.

I’ve used

sudo modprobe -v rtl8192cu

however nothing happened, even I used -v

Wow, I didn’t see that!, How come the live-USB had it working out of the box, Instantly!

Well when commands don’t say anything it’s usually means they did they job and that’s that.

Check if it’s working? I don’t remember if you need to reboot after modprobe.


Are you sure there nothing in the ubuntu repos that already does this so you don’t need to do it manually?


Also remove previous moudules? (modprobre -r)

yes sir, I’ve also tried with -C
I’ve also rebooted after each try, I’ve also tried going back to the older driver I was using, still nothing.

Don’t get me wrong, it does show 1 maybe 2 networks out of the 10 it should be displaying. What’s weird is that the connections that should have the strongest signal, don’t appear at all! (even if I create a hotspot with my phone and place it next to it)
I’ve also tried editing the parameter ant_sel with 0, with 1, and with 2. None of them changed much.
When I try to connect to one of the displayed networks, most of the time it fails, sometimes it connects successfully and becomes really unstable after it. If I try manually entering to a not-displayed network, it won’t connect.

Why can’t you look at the mod probe or whatever on the live distro and see what driver it is using, and then copy that driver over to your install?

I had the same problem you have but forgot how I got it to work.

1 Like

I think we’re activating the wrong modules.

can you try one of these again:

$ lspci | grep Wireless
$ lspci | grep wireless
$ lspci | grep net

we need to know which module to activate, so we need to know the device


fucking genius

(it’s lsmod to check loaded modules btw)

1 Like

Now I remember. I was trying to install Gentoo via the live cd. The live cd worked with my wifi card, but the install didn’t. I also had the Realtek chip. This was on my, since retired, toshiba laptop. This was back in 2010.

This is the entire lspci, as none of the grep’d commands worked.

lspci
eze@kanji:~$ lspci
00:00.0 Host bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge (rev 0b)
00:00.1 Signal processing controller: Intel Corporation Device 5a8c (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Device 5a85 (rev 0b)
00:0e.0 Audio device: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster (rev 0b)
00:0f.0 Communication controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Trusted Execution Engine (rev 0b)
00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b)
00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b)
00:16.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #1 (rev 0b)
00:16.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #2 (rev 0b)
00:16.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #3 (rev 0b)
00:16.3 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #4 (rev 0b)
00:17.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #5 (rev 0b)
00:17.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #6 (rev 0b)
00:17.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #7 (rev 0b)
00:17.3 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #8 (rev 0b)
00:18.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #1 (rev 0b)
00:18.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #2 (rev 0b)
00:18.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #3 (rev 0b)
00:18.3 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #4 (rev 0b)
00:19.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #1 (rev 0b)
00:19.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #2 (rev 0b)
00:19.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #3 (rev 0b)
00:1a.0 Serial bus controller [0c80]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PWM Pin Controller (rev 0b)
00:1b.0 SD Host controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SDXC/MMC Host Controller (rev 0b)
00:1c.0 SD Host controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series eMMC Controller (rev 0b)
00:1e.0 SD Host controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SDIO Controller (rev 0b)
00:1f.0 ISA bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Low Pin Count Interface (rev 0b)
00:1f.1 SMBus: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller (rev 0b)

I can’t find network related stuff there…

However using lsmod showerd this:

eze@kanji:~$ lsmod | grep rtl
rtl8xxxu              122880  0
mac80211              778240  1 rtl8xxxu
btrtl                  16384  1 btusb
bluetooth             548864  43 btrtl,btintel,bnep,btbcm,rfcomm,btusb