min*_*ree 5 firmware bluetooth linux-kernel nixos
我很难让内核为我的 XPS 9310 加载必要的蓝牙固件。我的型号有 AX500 连接芯片,它使用 QCA6390。
Ubuntu和Arch 的用户都报告说蓝牙可以与这个模型一起工作,但是,我很难找到在 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
'';
}
Run Code Online (Sandbox Code Playgroud)
我正在加载相关模块,如下所示:
boot.kernelModules = [ "bluetooth" "btqca" "btusb" "hci_qca" "hci_uart" ];
Run Code Online (Sandbox Code Playgroud)
不用说,我有:
hardware.bluetooth.enable = true;
Run Code Online (Sandbox Code Playgroud)
我也有:
hardware.enableRedistributableFirmware = true;
Run Code Online (Sandbox Code Playgroud)
它启用了firmwareLinuxNonfree包,它又从linux-firmware 存储库中添加了固件,而后者又包含了必要的 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
Run Code Online (Sandbox Code Playgroud)
这是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
Run Code Online (Sandbox Code Playgroud)
如您所见,我的蓝牙设置从未执行此步骤或以下任何hci0步骤:
[ 2.416321] Bluetooth: hci0: setting up ROME/QCA6390
Run Code Online (Sandbox Code Playgroud)
不出所料,结果,我无法在 GNOME 设置 GUI 中启用蓝牙,并且bluetoothctl什么也没显示:
$ bluetoothctl list
$ bluetoothctl devices
No default controller available
Run Code Online (Sandbox Code Playgroud)
根据我的理解,固件应该在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`
Run Code Online (Sandbox Code Playgroud)
$ 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
Run Code Online (Sandbox Code Playgroud)
$ 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)
Run Code Online (Sandbox Code Playgroud)
$ 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
Run Code Online (Sandbox Code Playgroud)
如果它们有助于作为参考,这里是NixOS、Debian和Arch的默认内核配置的链接。
这是我的 WIP PR,旨在为 NixOS 添加对 XPS 9310 的支持,其中将包括这项工作。
这是我之前在 NixOS 话语论坛上寻求帮助解决此问题的帖子,但在撰写本文时尚未收到回复。
看一下 BIOS。在主菜单中单击Connection。有一个部分称为Wireless Device Enable. 确保Bluetooth选中该复选框。有时这是显而易见的事情\xc2\xaf\\_(\xe3\x83\x84)_/\xc2\xaf。
我有一台具有相同蓝牙硬件 (Qualcomm QCA6390 / AX500-DBS) 的 Dell XPS 15 9500。
\n我的症状与您描述的完全相同,并且“确定”我没有通过 BIOS 禁用 BT。直到我查看,验证。令我惊讶的是我确实禁用了它。
\n在 BIOS 中禁用 BT 后,我发现dmesg | grep -i blue输出与您的相符(完全正确!)。例如,我缺少这两个关键日志行:
Bluetooth: hci0: QCA Downloading qca/htbtfw20.tlv\nBluetooth: hci0: QCA Downloading qca/htnv20.bin\nRun Code Online (Sandbox Code Playgroud)\nbluetoothctl devices正在显示No default controller available。这就是我在这里找到你的问题的方式。