lwfinger / rtw89-BT

Out-of-kernel driver for Realtek BT devices found in rtw89 devides.
67 stars 9 forks source link

BT unreliable and breaking WIFI with 8852be #22

Closed stefanofornari closed 8 months ago

stefanofornari commented 8 months ago

Hello, I was excited when I ran into this project after so much researching about by BT not working on Ubuntu 22.04. Therefore thanks so much for the effort.

I do not bring good news, however, on getting it to work. The starting point is that I followed the instructions here to install the driver for my RealTek WIFI device. This worked like a charm for WIFI, but then I was not able to detect any BT device.

I then installed rtw98-BT and I was able to discover and pair my handset, but the connection is unreliable and sound not good (only left speaker).

If I can be of any assistance in troubleshooting I am happy to help.

lwfinger commented 8 months ago

As you have learned, the BT driver is separate from that of the wifi device.

Please run the command "lsusb" and post the line that corresponds to your BT device. The BT drivers can work even if the device is not in the tables as it uses the characteristics of the interface; however, the special firmware will not be loaded, and the performance will be poor.

stefanofornari commented 8 months ago

Here you go:

Bus 003 Device 005: ID 0bda:b85b Realtek Semiconductor Corp. Bluetooth Radio

lwfinger commented 8 months ago

Thanks. That device was added to kernel 6.7. It was not in this repo either. That means you have been using the generic code.

I just pushed the fixes. Because of time, I was only agle to check builds for kernel 5.17 and newer. If yours is older let me know.

stefanofornari commented 8 months ago

it looks like something is broken:

[ste Downloads] =)o git clone git@github.com:lwfinger/rtw89-BT.git
Cloning into 'rtw89-BT'...
remote: Enumerating objects: 178, done.
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (126/126), done.
remote: Total 178 (delta 72), reused 144 (delta 45), pack-reused 0
Receiving objects: 100% (178/178), 463.17 KiB | 181.00 KiB/s, done.
Resolving deltas: 100% (72/72), done.
[ste Downloads] =)o cd rtw89-BT/
[ste rtw89-BT] =)o make
make -C /lib/modules/6.6.6-76060606-generic/build M=/home/ste/Downloads/rtw89-BT modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.6-76060606-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /home/ste/Downloads/rtw89-BT/btusb.o
/home/ste/Downloads/rtw89-BT/btusb.c:549:9: error: expected expression before ‘{’ token
  549 |         { USB_DEVICE(0x13d3, 0x3570), .driver_info = BTUSB_REALTEK |
      |         ^
/home/ste/Downloads/rtw89-BT/btusb.c:734:2: error: expected ‘}’ before ‘;’ token
  734 | };
      |  ^
/home/ste/Downloads/rtw89-BT/btusb.c:179:52: note: to match this ‘{’
  179 | static const struct usb_device_id quirks_table[] = {
      |                                                    ^
/home/ste/Downloads/rtw89-BT/btusb.c:39:26: warning: ‘btusb_driver’ defined but not used [-Wunused-variable]
   39 | static struct usb_driver btusb_driver;
      |                          ^~~~~~~~~~~~
/home/ste/Downloads/rtw89-BT/btusb.c:37:13: warning: ‘reset’ defined but not used [-Wunused-variable]
   37 | static bool reset = true;
      |             ^~~~~
/home/ste/Downloads/rtw89-BT/btusb.c:36:13: warning: ‘enable_poll_sync’ defined but not used [-Wunused-variable]
   36 | static bool enable_poll_sync = IS_ENABLED(CONFIG_BT_HCIBTUSB_POLL_SYNC);
      |             ^~~~~~~~~~~~~~~~
/home/ste/Downloads/rtw89-BT/btusb.c:35:13: warning: ‘enable_autosuspend’ defined but not used [-Wunused-variable]
   35 | static bool enable_autosuspend = IS_ENABLED(CONFIG_BT_HCIBTUSB_AUTOSUSPEND);
      |             ^~~~~~~~~~~~~~~~~~
/home/ste/Downloads/rtw89-BT/btusb.c:34:13: warning: ‘force_scofix’ defined but not used [-Wunused-variable]
   34 | static bool force_scofix;
      |             ^~~~~~~~~~~~
/home/ste/Downloads/rtw89-BT/btusb.c:33:13: warning: ‘disable_scofix’ defined but not used [-Wunused-variable]
   33 | static bool disable_scofix;
      |             ^~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:243: /home/ste/Downloads/rtw89-BT/btusb.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.6-76060606-generic/Makefile:1919: /home/ste/Downloads/rtw89-BT] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.6-76060606-generic'
make: *** [Makefile:32: all] Error 2
lwfinger commented 8 months ago

There was a merge error. Fixed now.

stefanofornari commented 8 months ago

It works!!! Thanks you so much!!! Let me know where I can leave a monetary contribution.

Will this be included in the mainstream distribution one day?

lwfinger commented 8 months ago

No contribution needed. If you really want to do so, make a contribution to the homeless or hungry.

This code is the one from mainline 6.7-rc5.