[Solved] cross-posted from: https://lemmy.world/post/41957406

Exact problem as this archwiki forum post

I have also tried everything and at last here I am asking for any help, otherwise I don't think I would be able to continue using Linux on this laptop. I've tried everything from changing the kernel package to enabling all firmwares to using every kernel parameter I can find everything, nothing says any error or something anywhere. Only error i can find is hci device capabilities -22

Edit: The patch i needed was to add the driver info in btusb.c file. In nixos this is how you do it

  boot = {
    kernelPatches = [
      {
        name = "add-realtek-8852ce-btusb";
        patch = ./btusb.patch;
      }
    ];
}

first what you should do is git clone the linux kernel version you are using check using uname -r for me it was 6.12.(whatever, doesn't matter)

git clone --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git v6.12

then find the btusb.c file in drivers/bluetooth/ and add the line

{ USB_DEVICE(0x13d3, 0x3612), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },

after these lines

static const struct usb_device_id quirks_table[] = {
 						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x0cb8, 0xc558), .driver_info = BTUSB_REALTEK |
 						     BTUSB_WIDEBAND_SPEECH },

now we have made chages to this file right? it will be shows in git diff, so now you should be able to do git diff > btusb.patch this will create a .patch file, now copy this file to wherever folder you put the nixos configuration in, most likely /etc/nixos if not using custom config. Thats it!, now rebuild the configuration and DONE. props to @Maiq.

Author of patch: vedantsg123

I will try to get this patch upstream to not having to do this manually.

all 23 comments

sorted by: hot top controversial new old
[–] 3 points 9 months ago (18 children)

Just a thought but have you tried a live usb of another distro? If it works there it's probably not hardware and at least that would be ruled out.

  • source
  • hideshow 18 child comments
  • [–] [S] 2 points 9 months ago (16 children)

    So I tried that and bluetooth also didn't work there. I even went ahead and tried multiple distros to see if it was specific to nixos with same results.

  • source
  • parent
  • hideshow 16 child comments
  • [–] 3 points 9 months ago (15 children)

    On the crosspoast there was a comment that suggested flushing the power from the machine. I had an asus laptop that bluetooth would fail after switching to linux from windows (dualboot). The only fix was to boot to windows and shut bluetooth off. I never thought about flushing the charge from the motherboard which might have been a solution to that issue.

    I would search for your motherboard make model and see if their is an option to reset your chips. On my asus laptop you unplug the power and hold the power for 30 seconds.

    Another option might be to try a windows live usb. If the bluetooth works there try disabling it in windows.

    If all the above fails it is likely the hardware. Might take it to a computer tech to see if they can fix it?

  • source
  • parent
  • hideshow 15 child comments
  • [–] [S] 2 points 9 months ago* (14 children)

    First of all thank you. So yes I have a dual boot system, with windows and nixos.

    I tried turning the bluetooth off in windows and booting into nixos, but it didn't work. And I am sure it's not a hardware issue because bluetooth works in windows.

    I tried cold booting as well with same results.

    There are no proper logs as well that suggest anything, in lsmod, lsusb, hciconfig, dmesg (hci capabilities -22 was only one, which I think is just cosmetic).

    The scan on in bluetoothctl only shows the laptop's mac address which means bluetooth does work but somehow it's not finding the devices to connect to.

  • source
  • parent
  • hideshow 14 child comments
  • [–] 4 points 9 months ago (11 children)
  • [–] [S] 2 points 9 months ago (10 children)

    So fast. Wow I couldn't even find that resource in all my searching. So Nows the tough part, I hoped I was an expert nixos user. I will try to implement this somehow (cough vibe code), but any more hints would be appreciated. One thing I know the direction to go is patching kernel, which I have seen a repo do, so I will try to copy that.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 2 points 9 months ago (9 children)

    I have no nixos experience so I would not be the best person to ask. You could try asking a new question on lemmy with the updated info asking for nixos specific help on the best way to translate the github gist to something a bit more familiar to you.

    You might be able to ask the author of the github gist for advice?

    Glad I could at least hopefully point you in the right direction.

  • source
  • parent
  • hideshow 9 child comments
  • [–] [S] 1 point 9 months ago (8 children)

    I'll do that. Thank you so much 🤗

  • source
  • parent
  • hideshow 8 child comments
  • [–] 2 points 9 months ago (3 children)

    I recommend if/when you do, add the link in this post for posterity!

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 9 months ago (3 children)
  • [–] [S] 3 points 9 months ago (2 children)

    Brother guess what? It actually fixed it. OMG I am soo happy, at last it got fixed, i was trying it for the last week and didn't work, but you swoop and in an instant fixed it. I just can't thank you enough really. I am really greatful to you.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 9 months ago (1 child)

    I just pointed you in the right direction. You did all the work. Glad to hear you got it going. This is the only drawback to buying niche laptops. They often require a bit of tinkering for a year or two while kernels get patched.

    Nice write up by the way, might help the next person.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 9 months ago (1 child)

    It's good news at least that your hardware is working.

    I'm unfamiliar with nixos, you might try using different kernels. Try the latest one and maybe a few kernels behind the one your using now.

    Does your bt card need firmware?

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 3 points 9 months ago

    Thank you everyone for your valuable time. Cheers!

  • source
  • [–] [S] 2 points 9 months ago (2 children)

    This is my exact model: FX608JH ASUS TUF Gaming F16 (2025)

  • source
  • hideshow 2 child comments
  • [–] 2 points 9 months ago (1 child)

    I have the same model and now realise this is likely the cause of my BT issues too. Is it safe to assume that if I wait long enough this will be fixed in the kernel? I'm a little reluctant to get in the weeds to the extent the fix requires. I'm on Bazzite, so I think that means I'll be waiting a while given it's an immutable distro, is that right?

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 2 points 9 months ago

    So turns out making this patch upstream so it gets into the Linux kernel is not as easy as to open to pull request. There's this setting up of git email and what not, but with my searches it seems this patch is already made by someone and should be implemented in the kernel 6.19, but take this with a grain of salt. I will update this post if I find the patch file but for now I am assuming this fixed in 6.19. And yes I was hesitant to to try this but the desperation got over me, as I just can't have anything "not work" it irks me the wrong way, so I just went ahead with it.

  • source
  • parent
  • 4 comments in c/nix@programming.dev view that post
    [–] 5 points 9 months ago (3 children)

    Encountered an odd Bluetooth issue last week with a motherboard that had a combined Bluetooth and Wi-Fi radio chip set. Wi-Fi worked, but the Bluetooth hardware wasn't even detected. This was after migrating from a Windows install with known working Bluetooth drivers on the same motherboard.

    Found a solved thread for the same motherboard SKU where power cycling after disconnecting the desktop power supply from AC for 30 sec resolved it. Didn't believe it, but tried it anyway and it worked. Guessing the Windows driver must have put the Bluetooth transceiver in a funny state that the mainline Linux kernel couldn't recover, but resting the chipset with a through power cycle with internal voltage supplies zeroed made the difference in re-initializing the hardware.

    Just a wild suggestion...

  • source
  • hideshow 3 child comments
  • [–] [S] 2 points 9 months ago (2 children)

    Yes I've tried cold booting too, pressed the power button for 60sec even in hope to fix it but same results, disconnecting the ac first ofc.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 9 months ago (1 child)

    Congrats on solving your issue, and thanks for updated the post with the solution! It's really slick how NixOS makes adding a kernel patch to your config no more complex than it would take patching any dot file. Hope the up streaming of your device info goes smoothly.

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 2 points 9 months ago

    Thank you 😊. This is so true, this is definitely the charm of nixos, like having to do this once and then not having to worry about it again gives me a peace of mind. Still this should be natively in the kernel itself, and when I said I will try to get this upstream i had no idea it would be this tiresome. It seems a patch is already put up by someone (source - cough.. cough.. ai), but I still have to find the specific patch on their mailing lists.

  • source
  • parent