2 min read
Easy support for UGREEN Bluetooth 5.4 USB adapter on Linux

The UGREEN USB Bluetooth adapter1 I bought doesn’t support Linux. Proposed solutions online involve easy steps, such as patching and recompiling the entire kernel. Which has to be redone every time you update. Not exactly what I was hoping for.

When looking for alternatives, I found this article on patching kernel modules using DKMS, which is exactly what I needed. The article even uses Bluetooth as an example! DKMS is great for this. Here’s Wikipedia to describe it nicely:

Dynamic Kernel Module Support (DKMS) is a program/framework that enables generating Linux kernel modules whose sources generally reside outside the kernel source tree. The concept is to have DKMS modules automatically rebuilt when a new kernel is installed.

This way you can compile just a single module rather than the entire kernel.

I found a GitHub repo for a DKMS module for fixing sound on HP laptops. It had a lot of the plumbing required to create/build a DKMS module already in place, so I made a fork, and modified it to patch the relevant kernel file to support the bluetooth USB adapter.

You can find the repository here if you’d like to use it yourself — I left some instructions in the README.

After building, installing the module, and rebooting, I was able to finally pair my bluetooth speaker again. Hope this helps for anyone with the same problem!

Footnotes

  1. ID 33fa:0010 UGREEN BT5.4 Adapter