Kubuntu 18.04 Asus Rog Strix z370-I Gaming 蓝牙无法使用

Kubuntu 18.04 Asus Rog Strix z370-I Gaming 蓝牙无法使用

我在安装有集成无线功能的 Z370-I 游戏主板上安装了 Fresh Kubuntu 18.04 时遇到了蓝牙问题,因为无线功能开箱即用,而蓝牙似乎无法找到适配器。

systemctl status bluetooth

bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-05-25 10:08:40 CEST; 2h 23min ago
     Docs: man:bluetoothd(8)
 Main PID: 852 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bluetooth.service
           └─852 /usr/lib/bluetooth/bluetoothd

lspci

00:00.0 Host bridge: Intel Corporation Device 3ec2 (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 3e92
00:14.0 USB controller: Intel Corporation 200 Series PCH USB 3.0 xHCI Controller
00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode]
00:1b.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #17 (rev f0)
00:1b.3 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #20 (rev f0)
00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #1 (rev f0)
00:1c.4 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #5 (rev f0)
00:1d.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #9 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a2c9
00:1f.2 Memory controller: Intel Corporation 200 Series PCH PMC
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
00:1f.4 SMBus: Intel Corporation 200 Series PCH SMBus Controller
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b822
04:00.0 USB controller: ASMedia Technology Inc. Device 2142

lsusb

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
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 003: ID 413c:2113 Dell Computer Corp. 
Bus 001 Device 002: ID 2516:002b  
Bus 001 Device 005: ID 0b05:185c ASUSTek Computer, Inc. 
Bus 001 Device 004: ID 0b05:1872 ASUSTek Computer, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

当我尝试通过以下方式手动启动它时,bluetoothctl我得到以下信息:

Agent registered
[bluetooth]# power on
No default controller available
[bluetooth]# 

输出也是rfkill

ID TYPE      DEVICE      SOFT      HARD
 0 wlan      phy0   unblocked unblocked
 1 bluetooth hci0   unblocked unblocked

任何帮助都将受到欢迎。

答案1

新安装的 Kubuntu 18.04 和 Asus Rog Strix Z370-E 也遇到了同样的问题。事实证明,bionic 中的 4.15 内核已附带所有必要的驱动程序和固件,但尚未将设备 (0b05:185c) 识别为 r8822be 蓝牙适配器(内核 4.17 可以识别)。导致无法加载所需的固件文件。

我做了什么来解决这个问题:

  • 下载内核源代码

     apt-get source linux-source-4.15.0
    
  • 将“linux-4.15.0/drivers/bluetooth/”的内容复制到“~/btusb-custom/”(我想保留原始代码以供参考,以防我做错了什么。)

  • 编辑 ~/btusb-custom/btusb.c 并在第 376 行左右添加 rtl8822be 硬件 ID。更改如下:

        /* Additional Realtek 8821AE Bluetooth devices */
        { USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3458), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3461), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3462), .driver_info = BTUSB_REALTEK },
    
        /* Silicon Wave based devices */
        { USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
    
        { } /* Terminating entry */
    

    到:

        /* Additional Realtek 8821AE Bluetooth devices */
        { USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3458), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3461), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x13d3, 0x3462), .driver_info = BTUSB_REALTEK },
    
        /* Additional Realtek 8822BE Bluetooth devices */
        { USB_DEVICE(0x13d3, 0x3526), .driver_info = BTUSB_REALTEK },
        { USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK },
    
        /* Silicon Wave based devices */
        { USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
    
        { } /* Terminating entry */
    

(代码取自https://github.com/torvalds/linux/blob/master/drivers/bluetooth/btusb.c

  • 另外,将 btusb.c 中的第 41 行从:

    #define VERSION "0.8"
    

    到:

    #define VERSION "0.8-custom"
    

    (否则您必须强制安装 dkms。)

  • 创建“~/btusb-custom/dkms.conf”,内容如下:

        PACKAGE_NAME="btusb-custom"
        PACKAGE_VERSION=0.1
        CLEAN="make clean"
        BUILT_MODULE_NAME[0]="btusb"
        DEST_MODULE_NAME[0]="btusb"
        DEST_MODULE_LOCATION[0]="/updates"
        REMAKE_INITRD=yes
        AUTOINSTALL=yes
    
  • 之后,我使用 DKMS 安装了我的定制模块:

    sudo dkms add ~/btusb_custom
    sudo dkms install btusb-custom/0.1
    
  • 并进行了测试

    sudo modprobe -r btusb
    sudo modprobe btusb
    

瞧!KDE 中的蓝牙托盘图标立即弹出。

    dmesg | grep 8822

结果是

    ...
    [    3.629464] Bluetooth: hci0: rtl: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8822
    [    3.629465] Bluetooth: hci0: rtl: loading rtl_bt/rtl8822b_config.bin
    [    3.630645] Bluetooth: hci0: rtl: loading rtl_bt/rtl8822b_fw.bin
    ...

当你的内核升级到> = 4.17时,不要忘记立即删除该模块,从那时起你就不再需要它了。

注意:我的内核开发知识几乎为零,以上所有代码都是从各种搜索结果中复制粘贴并结合一些常识的 - 如果我写的东西是坏建议,请纠正我!!

答案2

作为更新(因为我也遇到了这个问题),你可以从 Canonicals PPA 下载 4.17 预构建软件包这里。下载generic模块、图像和标题的变体,然后下载dpkg -i它们三个并重新启动。这样做解决了我的 BT 问题 :)

相关内容