Ubuntu 20.04 蓝牙无法正常工作

Ubuntu 20.04 蓝牙无法正常工作

我已经安装了 Ubuntu 20.04,但蓝牙无法使用。但如果我从 USB 启动,蓝牙可以在实时会话中工作。有人能帮我吗?

systemctl | grep -i blue输出:

  sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d14-1\x2d14:1.0-bluetooth-hci0.device        loaded active     plugged   /sys/devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14:1.0/bluetooth/hci0     
  sys-subsystem-bluetooth-devices-hci0.device                                               loaded active     plugged   /sys/subsystem/bluetooth/devices/hci0                                      
  bluetooth.service                                                                         loaded active     running   Bluetooth service                                                          
  bluetooth.target                                                                          loaded active     active    Bluetooth    

dmesg | grep -i blue输出:

[    2.309059] Bluetooth: Core ver 2.22
[    2.309071] Bluetooth: HCI device and connection manager initialized
[    2.309073] Bluetooth: HCI socket layer initialized
[    2.309074] Bluetooth: L2CAP socket layer initialized
[    2.309076] Bluetooth: SCO socket layer initialized
[    3.413708] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.413710] Bluetooth: BNEP filters: protocol multicast
[    3.413713] Bluetooth: BNEP socket layer initialized
[    4.342171] Bluetooth: hci0: command 0xfc05 tx timeout
[    4.342173] Bluetooth: hci0: Reading Intel version information failed (-110)
[  193.048690] Bluetooth: hci0: command 0xfc05 tx timeout
[  193.048749] Bluetooth: hci0: Reading Intel version information failed (-110)

lspci输出:

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak] (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0 (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 10)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1d.5 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #14 (rev f0)
00:1d.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #15 (rev f0)
00:1f.0 ISA bridge: Intel Corporation HM470 Chipset LPC/eSPI Controller (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
02:00.0 Non-Volatile memory controller: Phison Electronics Corporation Device 5008 (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 16)
04:00.0 Unassigned class [ff00]: Alcor Micro AU6625 PCI-E Flash card reader controller

lspci -k -s 00:14.3输出:

00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak] (rev 10)
    DeviceName: WLAN
    Subsystem: Intel Corporation Wireless-AC 9560 [Jefferson Peak]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

蓝牙控制:

[bluetooth]# list
[bluetooth]# power on
No default controller available

rfkill list all输出:

0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

lsusb输出:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 04f2:b627 Chicony Electronics Co., Ltd HP Wide Vision HD Camera
Bus 001 Device 003: ID 8087:0aaa Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

答案1

我遇到了同样的问题,在从 Windows 热启动切换到 Ubuntu 后,蓝牙无法工作。我按照 Ubuntu 错误报告这里,并且蓝牙功能齐全。使用以下命令:

  1. sudo rmmod btusb
  2. sudo modprobe btusb

答案2

我在 Ubuntu 20.04 上遇到了同样的蓝牙问题,并通过这种方式修复

sudo apt install blueman

sudo add-apt-repository ppa:blaze/rtbth-dkms
sudo apt-get update
sudo apt-get install rtbth-dkms
sudo vim /etc/modules

注释掉所有并添加此行

rtbth

重启并打开

sudo blueman-manager

如果仍然不起作用,请尝试此操作

sudo rmmod btusb
sleep 1
sudo modprobe btusb

如果仍然不起作用,请尝试此操作

/etc/default/grub用此值更新

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nommconf pcie_aspm=off"

更新 grub

sudo update-grub

然后reboot享受你的音乐。

蓝牙 v5 更新

蓝牙v5固件解决方案源

如果您从命令获取信息:sudo dmesg | grep Bluetooth

... firmware file rtl_bt/rtl8761b_fw.bin not found

尝试下载固件并安装

wget https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_config
wget https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_fw

sudo mv rtl8761b_config /usr/lib/firmware/rtl_bt/rtl8761b_config.bin
sudo mv rtl8761b_fw /usr/lib/firmware/rtl_bt/rtl8761b_fw.bin
sudo ln -s /usr/lib/firmware/rtl_bt/rtl8761b_fw.bin /usr/lib/firmware/rtl_bt/rtl8761bu_fw.bin

答案3

我也遇到了这个问题。对我来说,错误与 python 有关。问题出在 3.7 版本上。对我来说,以下方法有效:

我卸载了蓝牙:

sudo apt remove blueman

sudo apt autoremove

然后将你的 Python 版本更改为 3.6 或 3.8:

sudo update-alternatives --config python3

如果此命令不起作用,您将需要运行:

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2

然后重新运行命令,更改python版本。

要安装蓝牙,需要有 python-gi,为此,请执行以下命令:

sudo apt install python3-gi

之后,再次安装蓝牙:

sudo apt install blueman -y && blueman-manager

这些是我遵循的步骤,并且成功了,但也许只需更改 python 版本即可。当我尝试返回到 python 3.7 时,蓝牙再次停止工作。我不知道如何解决这个问题,我只是停止使用 3.7 版本。

希望这可以帮助。

答案4

我在配对 XBOX ONE 控制器时遇到了麻烦(在 19.10 中没有任何问题)。解决方案是禁用蓝牙 ERTM(https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1750146

sudo su
echo 1 > /sys/module/bluetooth/parameters/disable_ertm 

相关内容