语境
我无法让内核加载 XPS 9310 所需的蓝牙固件。我的型号具有 AX500 连接芯片,该芯片使用 QCA6390。
两者的用户乌班图和拱已经报告了蓝牙可以与该模型配合使用,但是,我很难找到在 NixOS 上工作所需的正确内核配置。
我的配置
boot.kernelPatches
我已启用以下内核配置参数,并在我的 nix 配置中添加了以下补丁:
# Extra config required for Bluetooth.
{
name = "enable-qca6390-bluetooth";
patch = null;
extraConfig = ''
BT_QCA m
BT_HCIBTUSB m
BT_HCIBTUSB_AUTOSUSPEND y
BT_HCIUART m
BT_HCIUART_QCA y
'';
}
我正在加载相关模块,如下所示:
boot.kernelModules = [ "bluetooth" "btqca" "btusb" "hci_qca" "hci_uart" ];
不言而喻,我有:
hardware.bluetooth.enable = true;
我也有:
hardware.enableRedistributableFirmware = true;
这使得firmwareLinuxNonfree
包,这反过来又添加了固件linux-固件回购协议,其中又包括必要的QCA固件。
问题
可以观察到该固件被加载到dmesg
两个独立 Ubuntu 用户的输出中这里和这里,两者都报告工作蓝牙。但是,我无法观察到它被加载到我的中。
作为参考,以下是dmesg
使用蓝牙工作的用户的输出:
[ 2.349008] Bluetooth: Core ver 2.22
[ 2.349019] Bluetooth: HCI device and connection manager initialized
[ 2.349023] Bluetooth: HCI socket layer initialized
[ 2.349024] Bluetooth: L2CAP socket layer initialized
[ 2.349028] Bluetooth: SCO socket layer initialized
[ 2.394642] Bluetooth: HCI UART driver ver 2.3
[ 2.394644] Bluetooth: HCI UART protocol H4 registered
[ 2.394645] Bluetooth: HCI UART protocol BCSP registered
[ 2.394654] Bluetooth: HCI UART protocol LL registered
[ 2.394655] Bluetooth: HCI UART protocol ATH3K registered
[ 2.394660] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 2.394702] Bluetooth: HCI UART protocol Intel registered
[ 2.394734] Bluetooth: HCI UART protocol Broadcom registered
[ 2.394742] Bluetooth: HCI UART protocol QCA registered
[ 2.394743] Bluetooth: HCI UART protocol AG6XX registered
[ 2.394748] Bluetooth: HCI UART protocol Marvell registered
[ 2.416321] Bluetooth: hci0: setting up ROME/QCA6390
[ 2.420348] Bluetooth: hci0: Frame reassembly failed (-84)
[ 2.444937] Modules linked in: snd_pcm qrtr ns snd_seq_midi snd_seq_midi_event ath11k_pci(+) mhi snd_rawmidi ath11k hci_uart qmi_helpers btqca i915(+) snd_seq btrtl uvcvideo mac80211 snd_seq_device btbcm btintel snd_timer videobuf2_vmalloc dell_wmi drm_kms_helper input_leds videobuf2_memops dell_smbios videobuf2_v4l2 cec dcdbas snd efi_pstore serio_raw rc_core videobuf2_common hid_sensor_als i2c_algo_bit hid_sensor_trigger ucsi_acpi(+) cfg80211 fb_sys_fops industrialio_triggered_buffer processor_thermal_device typec_ucsi dell_wmi_descriptor kfifo_buf hid_sensor_iio_common intel_rapl_common soundcore industrialio wmi_bmof videodev mei_me libarc4 syscopyarea cros_ec_ishtp 8250_dw mc hid_multitouch sysfillrect mei cros_ec sysimgblt intel_soc_dts_iosf typec mac_hid bluetooth ecdh_generic ecc int3403_thermal int340x_thermal_zone acpi_pad intel_hid acpi_tad int3400_thermal acpi_thermal_rel sparse_keymap sch_fq_codel parport_pc ppdev drm lp parport ip_tables x_tables autofs4 hid_sensor_hub
[ 2.756645] Bluetooth: hci0: QCA Product ID :0x00000010
[ 2.756647] Bluetooth: hci0: QCA SOC Version :0x400a0200
[ 2.756647] Bluetooth: hci0: QCA ROM Version :0x00000200
[ 2.756648] Bluetooth: hci0: QCA Patch Version:0x00000d2b
[ 2.756650] Bluetooth: hci0: QCA controller version 0x02000200
[ 2.756651] Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv
[ 3.584055] Bluetooth: hci0: QCA Downloading qca/htnv20.bin
[ 3.777754] Bluetooth: hci0: QCA setup on UART is completed
[ 3.998318] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 3.998319] Bluetooth: BNEP filters: protocol multicast
[ 3.998321] Bluetooth: BNEP socket layer initialized
[ 14.108234] Bluetooth: RFCOMM TTY layer initialized
[ 14.108238] Bluetooth: RFCOMM socket layer initialized
[ 14.108242] Bluetooth: RFCOMM ver 1.11
dmesg | grep -i blue
这是我机器上的输出:
[ 4.363188] Bluetooth: Core ver 2.22
[ 4.363199] Bluetooth: HCI device and connection manager initialized
[ 4.363201] Bluetooth: HCI socket layer initialized
[ 4.363203] Bluetooth: L2CAP socket layer initialized
[ 4.363205] Bluetooth: SCO socket layer initialized
[ 4.379230] Bluetooth: HCI UART driver ver 2.3
[ 4.379231] Bluetooth: HCI UART protocol H4 registered
[ 4.379232] Bluetooth: HCI UART protocol BCSP registered
[ 4.379238] Bluetooth: HCI UART protocol LL registered
[ 4.379256] Bluetooth: HCI UART protocol Intel registered
[ 4.379260] Bluetooth: HCI UART protocol QCA registered
[ 20.090546] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 20.090553] Bluetooth: BNEP socket layer initialized
如您所见,我的蓝牙设置从未执行此步骤或以下任何hci0
步骤:
[ 2.416321] Bluetooth: hci0: setting up ROME/QCA6390
不出所料,我无法在 GNOME 设置 GUI 中启用蓝牙,并且bluetoothctl
什么也没有显示:
$ bluetoothctl list
$ bluetoothctl devices
No default controller available
问题
根据我的理解,在启用且固件存在的情况下应该自动加载固件BT_QCA
,这两者都应该是我前面提到的 nix 配置的结果。
这个假设正确吗?
我是否缺少触发hci0
上面显示的行所需的必要步骤?
任何有关如何进步的建议或想法将不胜感激!
系统信息
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 5.10.2, NixOS, 21.03pre259798.84917aa00bf (Okapi)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.10`
- channels(root): `"nixos-21.03pre259798.84917aa00bf, home-manager-20.09"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
$ lsmod | grep -i bt
btusb 57344 0
btrtl 24576 1 btusb
btbcm 20480 1 btusb
btintel 28672 2 hci_uart,btusb
btqca 20480 1 hci_uart
bluetooth 589824 13 btrtl,btqca,btintel,hci_uart,btbcm,bnep,btusb
usbcore 270336 5 xhci_hcd,usbhid,uvcvideo,btusb,xhci_pci
$ lspci
00:00.0 Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 01)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 01)
00:04.0 Signal processing controller: Intel Corporation Device 9a03 (rev 01)
00:06.0 PCI bridge: Intel Corporation 11th Gen Core Processor PCIe Controller (rev 01)
00:07.0 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt PCI Express Root Port #0 (rev 01)
00:07.2 PCI bridge: Intel Corporation Tiger Lake-LP Thunderbolt PCI Express Root Port #2 (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Device 9a0d (rev 01)
00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt USB Controller (rev 01)
00:0d.2 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt NHI #0 (rev 01)
00:0d.3 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt NHI #1 (rev 01)
00:12.0 Serial controller: Intel Corporation Tiger Lake-LP Integrated Sensor Hub (rev 20)
00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
00:14.2 RAM memory: Intel Corporation Tiger Lake-LP Shared SRAM (rev 20)
00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #0 (rev 20)
00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #1 (rev 20)
00:16.0 Communication controller: Intel Corporation Tiger Lake-LP Management Engine Interface (rev 20)
00:19.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #4 (rev 20)
00:19.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP Serial IO I2C Controller #5 (rev 20)
00:1c.0 PCI bridge: Intel Corporation Device a0b8 (rev 20)
00:1d.0 PCI bridge: Intel Corporation Device a0b3 (rev 20)
00:1e.0 Communication controller: Intel Corporation Tiger Lake-LP Serial IO UART Controller #0 (rev 20)
00:1f.0 ISA bridge: Intel Corporation Tiger Lake-LP LPC Controller (rev 20)
00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller (rev 20)
01:00.0 Non-Volatile memory controller: Toshiba Corporation Device 011a
56:00.0 Unassigned class [ff00]: Qualcomm Device 1101
57:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader (rev 01)
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0c45:672a Microdia Integrated_Webcam_HD
Bus 003 Device 002: ID 27c6:533c Shenzhen Goodix Technology Co.,Ltd. FingerPrint
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
进一步参考
如果它们可以作为参考,这里是默认内核配置的链接尼克斯操作系统,德班和拱。
这是我的 WIP公关旨在向 NixOS 添加对 XPS 9310 的支持,其中将包括这项工作。
这是我之前的帖子向 NixOS 论坛寻求有关此问题的帮助,但在撰写本文时尚未收到回复。
解决了
我们已经在 nixos/nixos-hardware github 存储库中解决了这个问题,并将必要的内核配置补丁上传到 nixpkgs 本身。使用nixos-hardware
存储库中的模块这里在 XPS 9310 上轻松启动并运行 nixos。
答案1
看一下 BIOS。在主菜单中单击Connection
。有一个部分称为Wireless Device Enable
.确保Bluetooth
选中该复选框。有时这是显而易见的事情¯\_(ツ)_/¯
。
我有一台具有相同蓝牙硬件 (Qualcomm QCA6390 / AX500-DBS) 的 Dell XPS 15 9500。
我的症状与您描述的完全相同,并且“确定”我没有通过 BIOS 禁用 BT。直到我查看,验证。令我惊讶的是我确实禁用了它。
在 BIOS 中禁用 BT 后,我发现dmesg | grep -i blue
输出与您的相符(完全正确!)。例如,我缺少这两个关键日志行:
Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv
Bluetooth: hci0: QCA Downloading qca/htnv20.bin
bluetoothctl devices
正在显示No default controller available
。这就是我在这里找到你的问题的方式。
答案2
在过去的一年里它对我有用之后,我刚刚花了一段时间来解决同样的问题。一切看起来都很好,但就是不出现。 dmesg 中的固件下载线也丢失了。
最后解决的办法是进入BIOS,禁用蓝牙,开机,重新启动,再次进入BIOS,再次启用蓝牙。 ˙_(ツ)_/˙