0

My WiFi worked fine with Ubuntu 18.04 on my HP-ab516tx laptop. Then I updated to 20.04 and my WiFi didn't work. My visible network list was empty. I found the now deleted from Github, rtlwifi_new driver for my rtl8723be here. It installed fine and my WiFi worked again. When I upgraded to 22.04, and tried to install it again to get back my WiFi, I got an error. Here is the output of make. How can I fix this error and what is causing it?

/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c: In function ‘_rtl92cu_init_chipN_one_out_ep_priority’:
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:617:9: warning: parameter names (without types) in function declaration
  617 |         u16 uninitialized_var(value);
      |         ^~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:621:17: error: ‘value’ undeclared (first use in this function)
  621 |                 value = QUEUE_HIGH;
      |                 ^~~~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:621:17: note: each undeclared identifier is reported only once for each function it appears in
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c: In function ‘_rtl92cu_init_chipN_two_out_ep_priority’:
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:643:9: warning: parameter names (without types) in function declaration
  643 |         u16 uninitialized_var(valueHi);
      |         ^~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:644:9: warning: parameter names (without types) in function declaration
  644 |         u16 uninitialized_var(valueLow);
      |         ^~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:648:17: error: ‘valueHi’ undeclared (first use in this function)
  648 |                 valueHi = QUEUE_HIGH;
      |                 ^~~~~~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:649:17: error: ‘valueLow’ undeclared (first use in this function)
  649 |                 valueLow = QUEUE_LOW;
      |                 ^~~~~~~~
make[3]: *** [scripts/Makefile.build:297: /home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.o] Error 1
make[2]: *** [scripts/Makefile.build:560: /home/sns/Downloads/rtlwifi_new/rtl8192cu] Error 2
make[1]: *** [Makefile:1909: /home/sns/Downloads/rtlwifi_new] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-79-generic'
make: *** [Makefile:85: all] Error 2

This is lspci output.

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev a2)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 0a)

Results of lspci -nnk -d ::0280 :

03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
    DeviceName: Realtek RTL8723BE 802.11b/g/n 1x1Wi-Fi + BT4.0 Combo Adapter
    Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:804c]
    Kernel driver in use: rtl8723be
    Kernel modules: rtl8723be
karel
  • 110,292
  • 102
  • 269
  • 299
nupro
  • 3
  • 2
  • Here is the complete output of [make](https://pastebin.com/Z5nTU9uy). – nupro Aug 20 '23 at 05:04
  • What GitHub repo are you trying to compile? – R A Aug 20 '23 at 08:16
  • [This](https://github.com/lwfinger/rtlwifi_new). But this is deleted. Somebody posted a Dropbox link with a copy [here](https://ubuntuforums.org/archive/index.php/t-2449277.html). I used this on 20.04 and it worked. But gave me this error on 22.04. – nupro Aug 20 '23 at 08:46
  • RTL8723BE should work out of the box with no additional drivers. The only thing that's required is disabling power management. Could you load a recent Ubuntu off a USB stick to see if wi-fi works there? – R A Aug 20 '23 at 09:08
  • Please add the output of `lspci -nnk -d ::0280` – R A Aug 20 '23 at 09:11
  • This is the output [here](https://pastebin.com/JYJe994b). I will get back to you about booting from a USB. – nupro Aug 20 '23 at 10:56
  • Your wireless device already has a driver in place: rtl8723be. The driver you are trying to build, rtl8192cu is incorrect for your device. Welcome to Ask Ubuntu. – chili555 Aug 20 '23 at 12:49
  • @chili555 why isn't the installed driver isn't working? I think the repo has multiple drivers. After `make`, there is `make install` and then `modprobe `. It's all in the [README](https://pastebin.com/QtR97Fxu) file of the repo. – nupro Aug 20 '23 at 15:10
  • @RA I booted with USB and it had the same problem. No visible networks. – nupro Aug 20 '23 at 15:11
  • @nupro I don't know what's happening here. My device is also `10ec:b723` and works OOTB. It prints `DeviceName: WLAN` though and a slightly different subsystem – R A Aug 20 '23 at 16:07
  • @nupro You could try skipping compiling `rtl8192cu` by removing all lines containing `rtl8192cu` in `Makefile` source file – R A Aug 20 '23 at 16:09
  • Are there any clues in the log? `sudo dmesg | grep 8723` or: `rfkill list all` – chili555 Aug 20 '23 at 18:08
  • @chili555 output of [sudo dmesg | grep 8723](https://pastebin.com/PqNsEcac) and [rfkill list all](https://pastebin.com/nK8wZXYZ) – nupro Aug 20 '23 at 18:17
  • We need a full diagnostic report. Please check here:https://askubuntu.com/questions/425155/my-wireless-wifi-connection-does-not-work-what-information-is-needed-to-diagnos/425180#425180 – chili555 Aug 20 '23 at 18:55
  • @chili555 [Here](https://pastebin.ubuntu.com/p/phjd8xqq6q/) is the full diagnostic report. – nupro Aug 21 '23 at 03:20

1 Answers1

1

There are several items in your wireless info report that are concerning. First, there are two competing and probably needless declarations for module parameters. I suggest that they be removed entirely.

sudo rm /etc/modprobe.d/50-rtl8723be.conf
sudo rm /etc/modprobe.d/rtl8723be.conf

Next, netplan is not set correctly.

sudo nano /etc/netplan/01-network-manager-all.yaml

Add these lines:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Netplan is very specific about spacing and indentation so proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor. Follow with:

sudo netplan generate
sudo netplan apply

resolv.conf is not set correctly.

sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf  /etc/resolv.conf

You have no 8192eu device so let’s remove its declaration:

sudo nano /etc/modules

Remove the 8192eu line. Save and exit nano as above.

Reboot, disconnect the USB ethernet and see if Network Manager takes over the wireless. In any event, let us see:

sudo dmesg | grep rtl

EDIT: You may need a driver parameter. Please do:

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=1

Is there any improvement? If not try the sequence again with ant_sel=2. Tell us which improves the signal strength and we'll wite one file to make it persistant.

chili555
  • 58,968
  • 8
  • 93
  • 129
  • Thank you. I still don't get the list of available network in my area but when I walk over to my router i get a very weak signal of my wifi which don't even connect. Here is output to [sudo dmesg | grep rtl](https://pastebin.ubuntu.com/p/fSVkFfbPK2/). – nupro Aug 21 '23 at 11:41
  • Please see my edit above in a few moments. – chili555 Aug 21 '23 at 12:34
  • I tried both, but none of them worked. no visible network. – nupro Aug 21 '23 at 16:04
  • I suspect, then, that neither antenna wire is firmly snapped into place: https://content.spiceworksstatic.com/service.community/p/post_images/attached_image/d5142330-5419-490c-9fd1-5ca118b215d8-wlan1.jpg – chili555 Aug 21 '23 at 16:08
  • I only have one antenna. [Front and back](https://www.dropbox.com/sh/z5mnad20iisa0u3/AAB1DkILWvHeiARZvekhutBca?dl=0) – nupro Aug 21 '23 at 16:31
  • So I switched it to the other one, I got my WiFi back. Thank you for the guidance. – nupro Aug 21 '23 at 16:50