我有一台 Thinkpad X1 Carbon 第 7 代,运行 Fedora 30。我的问题是我无法使蓝牙工作。我尝试了多种方法来解决这个问题,但都没有效果。
- 通过设置 GUI
当我进入“设置/蓝牙”时,我可以打开蓝牙(右上角切换开关)。但是,文本没有改变并告诉我蓝牙已关闭。
iwlwifi.conf
当然,我已经在BIOS中检查过蓝牙是否被激活。此外,我创建/etc/modprobe.d/iwlwifi.conf
如下:
options iwlwifi bt_coex_active=0
- TLP
最后,我设置/etc/default/tlp
为(仅相关摘录):
[…]
# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
# on system startup: 0=disable, 1=enable.
# Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
# are ignored when this is enabled.
# Default: 0
RESTORE_DEVICE_STATE_ON_STARTUP=0
# Radio devices to disable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
# Default: <none>
#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
# Radio devices to enable on startup: bluetooth, wifi, wwan.
# Separate multiple devices with spaces.
# Default: <none>
DEVICES_TO_ENABLE_ON_STARTUP="wifi bluetooth"
# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
# (workaround for devices that are blocking shutdown).
# Default: <none>
DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
# (to prevent other operating systems from missing radios).
# Default: <none>
#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
# Radio devices to enable on AC: bluetooth, wifi, wwan.
# Default: <none>
#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
# Radio devices to disable on battery: bluetooth, wifi, wwan.
# Default: <none>
#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
# Radio devices to disable on battery when not in use (not connected):
# bluetooth, wifi, wwan.
# Default: <none>
#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
[…]
# ------------------------------------------------------------------------------
# tlp-rdw - Parameters for the radio device wizard
# Possible devices: bluetooth, wifi, wwan.
# Notes:
# - Parameters are disabled by default, remove the leading # to enable them
# - Separate multiple radio devices with spaces
# Default: <none> (for all parameters below)
# Radio devices to disable on connect.
DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
# Radio devices to enable on disconnect.
DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi "
#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
# Radio devices to enable/disable when docked.
#DEVICES_TO_ENABLE_ON_DOCK=""
#DEVICES_TO_DISABLE_ON_DOCK=""
# Radio devices to enable/disable when undocked.
#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
#DEVICES_TO_DISABLE_ON_UNDOCK=""
- 人机交互配置
我还尝试禁用蓝牙的电源优化,但在我想切换时powertop
尝试运行>> /usr/sbin/hciconfig hci0 up &> /dev/null &
>> Good Bluetooth device interface status
当我运行 Fedora (?)时,我有bin
而不是sbin
,所以我sudo /usr/bin/hciconfig hci0 up &> /dev/null
手动运行。
- 通过 CLI 打开蓝牙
$ sudo hciconfig up
hci0: Type: Primary Bus: USB
BD Address: DC:71:96:99:3F:A8 ACL MTU: 1021:4 SCO MTU: 96:6
DOWN
RX bytes:16660 acl:0 sco:0 events:2700 errors:0
TX bytes:666973 acl:0 sco:0 commands:2698 errors:0
- 检查
rfkill
状态
这似乎不是这里的问题。
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth tpacpi_bluetooth_sw unblocked unblocked
1 bluetooth hci0 unblocked unblocked
2 wlan phy0 unblocked unblocked
- 调查通过
dmesg
我已经使用添加了手动事件# comments
。请注意,当我打开计算机并进入左上角菜单时,我可以“关闭”蓝牙……其状态为“关闭”!
$ sudo dmesg | grep -E 'Bluetooth|hci0|intel/ibt|iwl|usb 1-10'
[ 3.038389] usb 1-10: new full-speed USB device number 5 using xhci_hcd
[ 3.166272] usb 1-10: New USB device found, idVendor=8087, idProduct=0aaa, bcdDevice= 0.02
[ 3.166273] usb 1-10: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 12.560006] Bluetooth: Core ver 2.22
[ 12.560023] Bluetooth: HCI device and connection manager initialized
[ 12.560025] Bluetooth: HCI socket layer initialized
[ 12.560027] Bluetooth: L2CAP socket layer initialized
[ 12.560031] Bluetooth: SCO socket layer initialized
[ 12.591904] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[ 12.614868] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[ 12.615864] Bluetooth: hci0: Device revision is 2
[ 12.615865] Bluetooth: hci0: Secure boot is enabled
[ 12.615865] Bluetooth: hci0: OTP lock is enabled
[ 12.615865] Bluetooth: hci0: API lock is enabled
[ 12.615866] Bluetooth: hci0: Debug lock is disabled
[ 12.615866] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[ 12.617782] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[ 12.624703] iwlwifi 0000:00:14.3: Found debug destination: EXTERNAL_DRAM
[ 12.624704] iwlwifi 0000:00:14.3: Found debug configuration: 0
[ 12.624901] iwlwifi 0000:00:14.3: loaded firmware version 46.93e59cf4.0 op_mode iwlmvm
[ 12.750348] iwlwifi 0000:00:14.3: Detected Intel(R) Wireless-AC 9560 160MHz, REV=0x318
[ 12.756808] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 12.756956] iwlwifi 0000:00:14.3: Allocated 0x00400000 bytes for firmware monitor.
[ 12.803914] iwlwifi 0000:00:14.3: base HW address: dc:71:96:99:3f:a4
[ 12.888770] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[ 12.892885] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
[ 14.288430] Bluetooth: hci0: Waiting for firmware download to complete
[ 14.288852] Bluetooth: hci0: Firmware loaded in 1635914 usecs
[ 14.288894] Bluetooth: hci0: Waiting for device to boot
[ 14.301955] Bluetooth: hci0: Device booted in 12769 usecs
[ 14.302307] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[ 14.305022] Bluetooth: hci0: Applying Intel DDC parameters completed
[ 30.630541] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 30.745533] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 30.810557] iwlwifi 0000:00:14.3: FW already configured (0) - re-configuring
[ 30.843148] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 30.957796] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 31.022390] iwlwifi 0000:00:14.3: FW already configured (0) - re-configuring
[ 34.449002] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 34.566179] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 34.633419] iwlwifi 0000:00:14.3: FW already configured (0) - re-configuring
# In the top-left menu, I "Turn off" the Bluetooth… that is already off (see picture)
[ 136.308722] usb 1-10: USB disconnect, device number 5
# In "Settings/Bluetooth", I click on the toggle button to switch it on.
[ 157.642145] usb 1-10: new full-speed USB device number 6 using xhci_hcd
[ 157.771145] usb 1-10: New USB device found, idVendor=8087, idProduct=0aaa, bcdDevice= 0.02
[ 157.771151] usb 1-10: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 157.775067] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[ 157.776096] Bluetooth: hci0: Device revision is 2
[ 157.776098] Bluetooth: hci0: Secure boot is enabled
[ 157.776100] Bluetooth: hci0: OTP lock is enabled
[ 157.776103] Bluetooth: hci0: API lock is enabled
[ 157.776104] Bluetooth: hci0: Debug lock is disabled
[ 157.776107] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[ 157.776872] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[ 159.727328] Bluetooth: hci0: Waiting for firmware download to complete
[ 159.727931] Bluetooth: hci0: Firmware loaded in 1907957 usecs
[ 159.728175] Bluetooth: hci0: Waiting for device to boot
[ 159.740907] Bluetooth: hci0: Device booted in 12575 usecs
[ 159.741009] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[ 159.743971] Bluetooth: hci0: Applying Intel DDC parameters completed
这一切仍然没有效果。
➥如何让蓝牙真正发挥作用?
答案1
嗯,我觉得有点傻,但是……蓝牙守护程序根本没有运行!
所以我通过以下方式解决了这个问题:
systemctl enable bluetooth
瞧!
答案2
该iwlwifi
驱动程序表明您的笔记本电脑中可能有英特尔 WiFi+蓝牙模块。为了正常工作,它需要固件:模块的 WiFi 和蓝牙部分都有自己的固件。
sudo dmesg
尝试激活蓝牙功能后运行。如果出现类似 的消息Direct firmware load for intel/ibt-<something> failed with error ...
,则表明您缺少英特尔蓝牙的固件文件。该错误消息将识别/lib/firmware
内核期望固件文件所在的确切路径名。
例如,如果错误消息中的路径名为intel/ibt-20-1-4.sfi
,则固件文件必须放置在/lib/firmware/intel/ibt-20-1-4.sfi
。
您将找到大多数英特尔 WiFi+蓝牙模块(以及其他一些英特尔系统组件)的固件在 Linux 固件 git 存储库中。plain
在该页面上找到您的系统请求的固件文件,然后单击最右侧列上标记的链接以下载固件文件。然后使用以下命令将其复制到系统上的相应目录:
sudo cp <wherever you downloaded the file to> /lib/firmware/intel/
请注意,您可能需要多个文件。如果存在一个*.ddc
文件和一个*.sfi
同名文件,请同时下载这两个文件:一旦驱动程序加载第一个文件,它也会尝试加载另一个文件。您可能必须进行多次尝试才能确保满足所有固件文件请求。