Tuesday, 6 June 2017

RTL8723BS Wifi and BT firmware package for Ubuntu mainline v4.12 kernels

The RTL8723BS wifi module is now in v4.12 release candidates but to get wifi working it is necessary to load the firmware.

I've build a package 'rtl8723bs_4.12.0_amd64.deb' which includes not only the wifi firmware from Bastien Nocera's 'rtl8723bs' GitHub (hadess) but also the bluetooth firmware from Larry Finger's 'rtl8723bs_bt' GitHub (lwfinger).

After downloading it can be installed using the 'dpkg -i' command:

sudo dpkg -i rtl8723bs_4.12.0_amd64.deb

If bluetooth fails to start automatically then it can be started manually with the command:

sudo systemctl start rtl8723bsbt.service

If you find this useful then please donate using the following link http://goo.gl/nXWSGf as everything helps with development costs.

32 comments:

VPS Hoster said...

I'm having a torrid time trying to get BT to work with a Click Mini,
Can you post the source code for this combination, so that I can try to compile for 4.14/4.15 kernel builds?
Thanks for all your efforts.

Linuxium said...

The source is from 'https://github.com/lwfinger/rtl8723bs_bt' (credited in earlier postings).

VPS Hoster said...

Thanks. That's what I have already looked at. :-|

Unknown said...

Thnks! Its work the wifi, but not the bluetooth

Linuxium said...

Have you tried starting it manually with the command:

sudo systemctl start rtl8723bsbt.service

Unknown said...

Hi there. Im having a serious issue with this driver since i cannot install it (thus it was a 2014 driver compiled for the linux 3 kernel...).


This is the error that im getting after running dpkg -i

trying to overwrite '/lib/firmware/rtlwifi/rtl8723bs_bt.bin', which is also in package linux-firmware 1.173.3

Linuxium said...

This implies your userland already has the wifi files so you need the bt only deb 'rtl8723bt_4.12.0_amd64.deb' from https://goo.gl/h8WSwX

Kacper said...

Have you 32 bit version?

pman said...

I created my linuxium iso using isorespin.sh -i ubuntu-16.04.6-desktop-amd64.iso --atom and my tablet is Baytrail (Vulcan Challenger II)
When I do journalctl I see that broadcom bluetooth service daemon failed and so did rtl8723bsbt - I am confused. I can see from dmesg that RTL8723BS chip is there . Any tips for debugging?
I need the bluetooth by the way so that I can use bluetooth keyboard that comes with the tablet

pman said...

Here is aditional info I found for my Vulcan Challenger II above

systemctl status rtl8723bsbt.service
● rtl8723bsbt.service - RTL8723BS Bluetooth daemon
Loaded: loaded (/lib/systemd/system/rtl8723bsbt.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-07-13 09:59:59 CDT; 2min 34s ago
Process: 2363 ExecStart=/usr/sbin/rtk_hciattach -n -s 115200 ttyS4 rtk_h5 (code=exited, status=1/FAILURE)
Process: 2360 ExecStartPre=/bin/bash -c grep -qm 1 r8723bs /proc/modules (code=exited, status=0/SUCCESS)
Main PID: 2363 (code=exited, status=1/FAILURE)

Jul 13 09:59:59 VTA0801S systemd[1]: Starting RTL8723BS Bluetooth daemon...
Jul 13 09:59:59 VTA0801S systemd[1]: Started RTL8723BS Bluetooth daemon.
Jul 13 09:59:59 VTA0801S rtk_hciattach[2363]: Can't open serial port: No such file or directory
Jul 13 09:59:59 VTA0801S rtk_hciattach[2363]: Can't initialize device: No such file or directory
Jul 13 09:59:59 VTA0801S systemd[1]: rtl8723bsbt.service: Main process exited, code=exited, status=1/FAILUR
Jul 13 09:59:59 VTA0801S systemd[1]: rtl8723bsbt.service: Unit entered failed state.
Jul 13 09:59:59 VTA0801S systemd[1]: rtl8723bsbt.service: Failed with result 'exit-code'.

pman said...

Furthermore

dmesg|grep tty
[ 0.000000] console [tty0] enabled
[ 2.666133] 00:02: ttyS0 at I/O 0x3f8 (irq = 26, base_baud = 115200) is a 16550A
[ 7.568363] 80860F0A:00: ttyS4 at MMIO 0x50947000 (irq = 16, base_baud = 2764800) is a 16550A
[ 7.568652] serial serial0: tty port ttyS4 registered
[ 7.592319] 80860F0A:01: ttyS5 at MMIO 0x5094d000 (irq = 17, base_baud = 2764800) is a 16550A

However ttyS4 is not there in /dev directory!?

pman said...

I saw some posts in http://linuxiumcomau.blogspot.com/2018/04/installing-ubuntu-on-new-device-ie.html that suggests there is a fix for this from 2018 but I am not sure if it is fixed in linuxium for ubuntu 16.04 - when I boot from linuxium for ubuntu 18.04 iso it cripples my tablet, also the screen is rotated, so wondering if ubuntu 16.04 can be directly fixed

pman said...

I tried to rebuild the 16.04 iso (most functioning one for my tablet) using the -u option at the end, but running into Cannot find mainline kernel header...seems something changed in Kernel 5.x that broke the assumptions in your script v8.2.8
Then I decided to try the same with different versions of 4.x kernels starting with 4.19-rc1 and finally with 4.20.17 I can see bluetooth being recognized, however when I try to pair the keyboard it fails, it's as if the numbers in the PIN that I type are not reaching the tablet!

Linuxium said...

No, only the 64-bit version.

Linuxium said...

@pman: You could try editing the /lib/systemd/system/rtl8723bsbt.service service and point to ttyS0 instead of ttyS4 if this is what you dmesg is saying.

Linuxium said...

The '-u' option failed as the Canonical build for amd64 failed (see https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2/ for example). If you try '-u' now it should work and give you v5.3-rc1.

gmfalka said...

Hello!

Alcatel 10 plus, Ubuntu 19.10 (GNU/Linux 5.3.0-26-generic x86_64)
Bluetooth works, wifi card not found.

Do you have a wifi only .deb?

Linuxium said...

What wifi chip does it use? Use 'pastebinit' to post a link to a 'dmesg' immediately after booting if you are unsure.

Américo said...

Muito Obrigado, funcionou perfeitamente para mim

phoenX said...

I have a Lenovo MIIX310 and had popOS live boot and the wifi worked so I decided to install popOS on reboot the wifi was gone and I cannot for the life of me get windows reinstalled (no matter ventoy, rufus, balena or even which Windows version everything crashes now). Linux bricked my device. And the further I try to get the stupid wifi working for 2 weeks now. But MX Linux only shows the Bluetooth part happily alive and no trace of a f.ing wifi chip nowhere to be found? Wth is going wrong with Linux? It's my first conversion to Linux from Windows since 1992 and I am about to throw the device away now. Is there any known way without internet connectivity to get that stupid chipset to work on any distro? I tried pop, arch, mx, l/x/ubuntu. NONE work ootb.

Linuxium said...

@phoenX: If WiFi worked with popOS, try going into the UEFI (BIOS) and disable "Fast Boot" or if you still have Windows installed, you can disable it through the Power Options in the Control Panel.

phoenX said...

Thank you. The BIOS only offers "secure boot" on/off - exactly nothing more. I didn't find any hidden keys for the MIIX310 bios also. I overwrote Windows since popOS didn't offer dual boot as Linux mint f.i. I believe reinstalling Windows would reenable the Wifi, because it worked on the live boot and then not any more. I found another case that reported this. But unfortunately after popOS install any install ISO for Windows reporting an UEFI error that I never saw before in over 30y. I believe somehow Linux f.cked the UEFI up which maybe a feature but bricked my device. Is there some necessary things to do to the PC before trying to reinstall Windows? Never had to do that before though.

Linuxium said...

@phoenX: Boot from a Linux LiveUSB (i.e. LiveCD) and then nuke your MIIX310's internal drive by running "sudo wipefs -fa /dev/..." at least three times. You could then run a "sudo sgdisk -Z /dev/..." for good measure and then try reinstalling Windows.

phoenX said...

I did so and it still BSOD with ACPI_BIOS_Error when trying a Windows install.
The rufus boot says before
LenovoUEFI:NTFS 2.5 (x64)
https://un. akeo.ie
UEFI ¥2.40 (INSYDE Corp., 0x01440000)
LENOVO THCNAAWW
LENOVO 80SG
Secure Boot status: Setup
Disconnecting potentially blocking drivers
Searching for target partition on boot disk:
PciRoo tcOx0) /Pci (0x14, Ox0) /USB(Ox3, Ox0> /USBCOx0, 0x0>[INFO) Found NIFS target parti tion:
P ciRoot(Ox0) /Pci (0x14, 0x0) /USB(Ox3, Ox0) /USB(OxO, Ox0)/HDC1, GPT, 27FD5B62-68C4-4A9C-AD8D-7C05CA87CDAO, 0>800, 0%3B90F70)
Starting NIFS driver service:
FS Driver 1.7 (ntfs-3g 69d8cbc0)
Opening target NIFS partition:
Volumne label is "CPRA_X64FRE_DE-DE_DV9
This systemn uses 64-bit x86 UEFI => searching for x64 EFI bootloader
Launching "efi\boot\bootmgr
Starting Microsoft Windows bootmgr. 
and then BSOD

Linuxium said...

Only thing I can think of is it is picking up the wrong EFI variable so I suggest booting from a Linux LiveUSB again and entering:
for BOOTENTRY in 0 1 2 3 4 5 6 7 8 9
do
sudo efibootmgr -b ${BOOTENTRY} -B
done
If it fails as 'efibootmgr' is not installed then enter:
sudo apt-get update && sudo apt-get install -y efibootmgr
and repeat the above.

phoenX said...

According to this link I really did brick the device via installing Linux. I never heard before you wouldn't be able to BOOT Windows anymore on a formatted machine. Seems I really need to find an image somewhere. I will try your tip but I don't expect success acc to this post. This is f.ing hilarious, who could've known. And of course I didn't back up anything as I didn't need anything off that machine.

phoenX said...

https://www.reddit.com/r/Lenovo/s/AynQzHZs0W

phoenX said...

The device has acrappy EMMC and its weird that it shows as 3 devices in Linux. I think that is part of the problem. I think they distributed the bootmgr in some separate blocks. How all this manages to break wifi and bricks windows is really amazing. Lenovo has a sccm package that I never dealt with. Maybe this must be integrated into the install iso but why is it bsodIng - doesn't make sense but some weird cheap corporate way to save 10cent on a ssd. https://pcsupport.lenovo.com/de/de/products/tablets/miix-series/miix-310-10icr/downloads/ds113240

Linuxium said...

@phoenX: eMMC drives ordinarily have extra partitions like boot for the bootloader and rpmb for storing keys.

A few things that could be affecting the install are
1. Is there sufficient storage for Windows (i.e. is it at least 64 GB)
2. Is there sufficient memory (i.e. 8 GB is preferred - running out of memory can result in BSOD)
3. Does the Windows image include the eMMC driver.

If using a standard Windows ISO you may be missing the eMMC driver (that understands the three partitions) so you might have to "inject" them during the initial installation part. Are they available from the Lenovo website?

phoenX said...

Lenovo doesn't offer recovery medias for this device. There is only a SCCM package that I don't know what to do with. I will try to build an iso with drivers onboard.
https://pcsupport.lenovo.com/de/de/products/tablets/miix-series/miix-310-10icr/downloads/driver-list
I found a reddit post on the 300 that said there is a recovery option when u press vol up and power. Indeed it shows another recovery option then. This option only boots Windows Sticks though. It rejects Linux. It results in the same ACPI error though. I even tried Win8.1 now. He said you need to boot via the microSD port...fortunately I found an OTG adapter but the same ACPI boot loop.
I just left the device on without media after a failed recovery boot and suddenly something like GRUB came up on itself and found a "stack overflow". I never had that before and wonder...if I wiped the drive as u said how the f.ck is there still some hidden bootloader on it? It found nothing and went blank...
I am loading Win10 from Feb 2016 - the date the device came out as a last try. Will try to slipstream the drivers aftewards and then I am finally out of ideas . I didn't find anyone uploaded a recovery image. I hope someone will post one. Sorry for wasting ur time as this problem seems deeper than the missing Wifi drivers that I expected.

phoenX said...

I meant micoUSB not SD. I slipstreamed the drivers to the stick, once every single driver and once the SCCM package - still the same issue with both versions. No BSOD but boot loop with probably the same course. Last chance is the old W10 build, but it is loading since 10h already. Since Linux runs fine and it ran W11 before I formatted it, I don't expect anything broken. I hope someone finds an image and uploads it.

phoenX said...

Nothin worked out for me. Linuxium could I ask a last favor of you: under
https://forums.linuxmint.com/viewtopic.php?t=327578&start=20
the very last post the guy says he solved the problem. But he had to recompile the kernel. "TLDR:The driver that ships with the kernel is missing a device id, and you need to patch + recompile the module." He also says the SDIO card "is in MMC1" - thats the weird stuff I also found. Coming from windows I have no clou what to do. But the question for you is: the post is from 2020 - do you think the issue he solved in current mint kernel (it is not as it doesn't work obviously) is still relevant or is it a waste of time to learn to recompile the kernel with his information? Do you see an easier fix with the information he gave?

Post a Comment

All comments now moderated so that spam can be deleted.