Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to enable btqca linux kernel driver module #105720

Closed
mitchmindtree opened this issue Dec 2, 2020 · 2 comments
Closed

Unable to enable btqca linux kernel driver module #105720

mitchmindtree opened this issue Dec 2, 2020 · 2 comments

Comments

@mitchmindtree
Copy link
Member

Describe the bug

I am attempting to build the linux kernel with the btqca module in order to enable bluetooth on my Dell XPS 13 9310. An Ubuntu user with the same machine mentioned their bluetooth was working and kindly shared the relevant parts of their dmesg and lsmod output to confirm that this is provided via btqca. It looks like Arch also includes this by default, however it appears that NixOS does not.

Here's what I've added to my configuration in order to try to include and enable the module:

{ lib, pkgs, ... }: {

  # ...

  # Enable the `btqca` module in the linux kernel.
  boot.kernelPatches = [
    {
      name = "enable-qca6390-bluetooth";
      patch = null;
      extraConfig = ''
        BT_QCA m
      '';
    }
  ];

  # Enable the bluetooth driver for the QCA6390.
  boot.kernelModules = [ "btqca" ];
}

However, when running sudo nixos-rebuild build, I run into the following error early in the kernel build process:

error: unused option: BT_QCA

This is with linuxPackages_testing. I also tried building a local clone of the 5.10-rc4, as well as 5.4 and observed the same error.

I'm sure I must be missing something or doing something wrong, but I've been struggling to find any info on the issue.

To Reproduce

Add the patch above to your nix configuration and run sudo nixos-rebuild build.

Expected behavior

The linux kernel would build successfully with the added btqca module included.

Additional context

I have also opened a forum post here in case the issue is better discussed there.

The work is a part of this NixOS/nixos-hardware#207 - an attempt to write a nixos-hardware expr for the Dell XPS 13 9310.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.10.0-rc5, NixOS, 21.03pre255513.8ee7c2505f9 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.9
  • channels(root): "nixos-21.03pre255513.8ee7c2505f9, home-manager-20.09"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@mitchmindtree
Copy link
Member Author

Ahh, updating the extraConfig field to the following seems to be progressing a lot further!

      extraConfig = ''
        BT_QCA m
        BT_HCIUART m
        BT_HCIUART_QCA y
      '';

The reason I tried this is that I noticed that this user's dmesg output also mentioned HCI UART. After scrolling through the bluetooth sections of the Arch and Debian kernel config files, I also noticed the CONFIG_BT_HCIUART fields.

This leads me to assume that BT_QCA goes unused unless BT_HCIUART_QCA is also enabled, and this is what the kernel build error meant by error: unused option: BT_QCA.

I haven't finished the build yet, but I'll re-open and report back if it fails again in a related manner. All seems smooth so far though.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/trouble-enabling-the-btqca-driver-module-in-the-linux-kernel-using-kernelpatches/10316/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants