GithubHelp home page GithubHelp logo

sscake / rtw89-bt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lwfinger/rtw89-bt

0.0 0.0 0.0 416 KB

Out-of-kernel driver for Realtek BT devices found in rtw89 devides.

C 98.95% Makefile 1.05%

rtw89-bt's Introduction

rtw89-BT

Out-of-kernel driver for Realtek BT devices found in rtw89 devides.

This driver will build for kernels 5.15+. If you get build errors, please report them in this repo as an issue. I will make every attempt to backport the code to older kernels.

The repository contains BT drivers for the known BT parts of the following:

Realtek 8852AE, RTW8852BE, and RTW8852CE.

Installation instruction

Requirements

You will need to install "make", "gcc", "kernel headers", "kernel build essentials", and "git".

For Ubuntu: You can install them with the following command

sudo apt-get update
sudo apt-get install make gcc linux-headers-$(uname -r) build-essential git

Users of Debian, Ubuntu, and similar (Mint etc) may want to scroll down and follow the DKMS instructions at the end of this document instead.

For Fedora: You can install them with the following command

sudo dnf install kernel-headers kernel-devel
sudo dnf group install "C Development Tools and Libraries"

For openSUSE: Install necessary headers with

sudo zypper install make gcc kernel-devel kernel-default-devel git libopenssl-devel

##### Installation
For all distros:
```bash
git clone [email protected]:lwfinger/rtw89-BT.git
cd rtw89-BT
make
sudo make install
Installation with module signing for SecureBoot

For all distros:

git clone [email protected]:lwfinger/rtw89-BT.git
cd rtw89-BT
make
sudo make sign-install

You will be promted a password, please keep it in mind and use it in next steps. Reboot to activate the new installed module. In the MOK managerment screen:

  1. Select "Enroll key" and enroll the key created by above sign-install step
  2. When promted, enter the password you entered when create sign key.
  3. If you enter wrong password, your computer won't not bebootable. In this case, use the BOOT menu from your BIOS, to boot into your OS then do below steps:
sudo mokutil --reset

Restart your computer Use BOOT menu from BIOS to boot into your OS In the MOK managerment screen, select reset MOK list Reboot then retry from the step make sign-install

DKMS packaging for debian and derivatives

DKMS is commonly used on debian and derivatives, like ubuntu, to streamline building extra kernel modules.
By following the instructions below and installing the resulting package, the rtw89 driver will automatically rebuild on kernel updates. Secure boot signing will happen automatically as well, as long as the dkms signing key (usually located at /var/lib/dkms/mok.key) is enrolled. See your distro's secure boot documentation for more details.

Prerequisites:

sudo apt install dh-sequence-dkms debhelper build-essential devscripts

This workflow uses devscripts, which has quite a few perl dependencies.
You may wish to build inside a chroot to avoid unnecessary clutter on your system. The debian wiki page for chroot has simple instructions for debian, which you can adapt to other distros as needed by changing the release codename and mirror url.
If you do, make sure to install the package on your host system, as it will fail if you try to install inside the chroot.

Build and installation

# If you've already built as above clean up your workspace or check one out specially (otherwise some temp files can end up in your package)
git clean -xfd

git deborig HEAD
dpkg-buildpackage -us -uc
sudo apt install ../rtw89bt-dkms_1.0.0_all.deb

This will install the package, and build the module for your currently active kernel. The new module will load automatically on boot. You can also load it right away, but because it has the same module name as the mainline bluetooth usb driver, that one needs to be unloaded first. This can be done with the following commands:

sudo modprobe -rv btusb
sudo modprobe -v btusb
A note regarding firmware

Firmware from userspace is required to use this driver. This package will attempt to pull the firmware in automatically as a Recommends. However, if your distro does not provide one of firmware-realtek >= 20230117-1 or linux-firmware >= 20220329.git681281e4-0ubuntu3.10, the driver will fail to load, and dmesg will show an error about a specific missing firmware file. In this case, you can download the firmware files directly from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtl_bt.

rtw89-bt's People

Contributors

lwfinger avatar whitty avatar sney avatar johnrtitor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.