控制中心的蓝牙图标经常消失
Tofloor
poster avatar
duanyao
deepin
2018-04-24 18:41
Author
如图,blueman 里可以看到周围的蓝牙设备,但控制中心里却没有蓝牙图标。这个问题不定期出现,杀死并重启控制中心不能解决,注销或重启系统往往有效。



命令行运行控制中心的输出:

$ dde-control-center
load translate "/usr/share/dtkwidget/translations/dtkwidget2_zh_CN"
load translate "/usr/share/dde-control-center/translations/dde-control-center_zh_CN"
2018-04-24, 10:21:14.213 [Warning] [                                                         0] QObject::connect: signal not found in QPropertyAnimation
/usr/bin/redshift 2018-04-24, 10:21:15.371 [Debug  ] [weatherrequest.cpp   WeatherRequest::refreshData         295] refreshing data
2018-04-24, 10:21:15.371 [Debug  ] [weatherrequest.cpp   WeatherRequest::requestWeatherForecast 327] request weather forecast  39.9025 116.427
2018-04-24, 10:21:15.501 [Debug  ] [pluginscontroller.cpp PluginsController::loadPlugins      72] get plugin interface:  0x55a7dafa98b0 2018-04-24, 10:21:15.524 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::removeDevice 315] remove device:  "/org/bluez/hci0/dev_24_FD_52_8B_62_72"
2018-04-24, 10:21:15.525 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::removeDevice 315] remove device:  "/org/bluez/hci0/dev_C8_14_51_9F_F5_2F"
2018-04-24, 10:21:15.792 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::removeDevice 315] remove device:  "/org/bluez/hci0/dev_E4_C4_83_75_59_EA"
2018-04-24, 10:21:15.792 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::removeDevice 315] remove device:  "/org/bluez/hci0/dev_6C_5C_14_B5_34_E5"
2018-04-24, 10:21:15.792 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::removeDevice 315] remove device:  "/org/bluez/hci0/dev_F0_1B_6C_88_84_E7"
2018-04-24, 10:21:15.829 [Warning] [                                                         0] QString::arg: Argument missing: 无法解析res_nclose中的符号“res_nclose”:libresolv.so.2, (/lib/x86_64-linux-gnu/libresolv.so.2: undefined symbol: res_nclose)
2018-04-24, 10:21:20.961 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_24_FD_52_8B_62_72"
2018-04-24, 10:21:21.203 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_C8_14_51_9F_F5_2F"
2018-04-24, 10:21:22.055 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_E4_C4_83_75_59_EA"
2018-04-24, 10:21:22.549 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_F0_1B_6C_88_84_E7"
2018-04-24, 10:21:35.736 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_6C_5C_14_B5_34_E5"
2018-04-24, 10:22:13.240 [Debug  ] [mainwidget.cpp       MainWidget::updateMPRISEnable       256] void MainWidget::updateMPRISEnable() is_768:  true update_visible:  false
2018-04-24, 10:22:13.240 [Debug  ] [basicsettingspage.cpp dcc::BasicSettingsPage:nMPRISChanged 274] void dcc::BasicSettingsPage:nMPRISChanged() mprisEnable:  true mprisWorking:  false
2018-04-24, 10:22:13.546 [Debug  ] [settingswidget.cpp   SettingsWidget::SettingsWidget      72] SettingsWidget::SettingsWidget(Frame*) I'm born!!!!
2018-04-24, 10:22:13.580 [Warning] [                                                         0] QPixmap::scaled: Pixmap is a null pixmap
2018-04-24, 10:22:13.599 [Warning] [                                                         0] QPixmap::scaled: Pixmap is a null pixmap
/usr/bin/redshift
2018-04-24, 10:22:14.213 [Debug  ] [datetime.cpp         dcc::datetime:atetime::addTimezones 183] add user timezones:  ()
2018-04-24, 10:24:06.492 [Debug  ] [settingswidget.cpp   SettingsWidget::~SettingsWidget     468] virtual SettingsWidget::~SettingsWidget() I'm gone!!!
2018-04-24, 10:30:42.760 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_B0_E2_35_49_74_4A"
2018-04-24, 10:36:29.049 [Debug  ] [bluetoothworker.cpp  dcc::bluetooth::BluetoothWorker::addDevice 295] add device:  "/org/bluez/hci0/dev_F8_2F_A8_E2_E6_4F"

蓝牙服务的状态:

$ sudo systemctl status bluetooth
[sudo] duanyao 的密码:
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-19 12:19:41 CST; 4 days ago
     Docs: man:bluetoothd(8)
Main PID: 1082 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 2.2M
      CPU: 47.617s
   CGroup: /system.slice/bluetooth.service
           └─1082 /usr/lib/bluetooth/bluetoothd

4月 23 21:28:27 duanyao-laptop bluetoothd[1082]: Sap driver initialization failed.
4月 23 21:28:27 duanyao-laptop bluetoothd[1082]: sap-server: Operation not permitted (1)
4月 23 21:28:30 duanyao-laptop bluetoothd[1082]: Endpoint registered: sender=:1.1139 path=/MediaEndpoint/A2DPSource
4月 23 21:28:30 duanyao-laptop bluetoothd[1082]: Endpoint registered: sender=:1.1139 path=/MediaEndpoint/A2DPSink
4月 24 09:33:24 duanyao-laptop bluetoothd[1082]: Endpoint unregistered: sender=:1.1139 path=/MediaEndpoint/A2DPSource
4月 24 09:33:24 duanyao-laptop bluetoothd[1082]: Endpoint unregistered: sender=:1.1139 path=/MediaEndpoint/A2DPSink
4月 24 09:33:24 duanyao-laptop bluetoothd[1082]: Sap driver initialization failed.
4月 24 09:33:24 duanyao-laptop bluetoothd[1082]: sap-server: Operation not permitted (1)
4月 24 09:33:29 duanyao-laptop bluetoothd[1082]: Endpoint registered: sender=:1.1139 path=/MediaEndpoint/A2DPSource
4月 24 09:33:29 duanyao-laptop bluetoothd[1082]: Endpoint registered: sender=:1.1139 path=/MediaEndpoint/A2DPSink

https://bbs.deepin.org/user/48640 https://bbs.deepin.org/user/101846

Reply Favorite View the author
All Replies
avatar
duanyao
deepin
2018-04-24 18:45
#1
Reply View the author
avatar
aida
deepin
2018-04-24 21:42
#2
1.控制中心没有蓝牙选项

    1).执行 sudo dmesg|grub bluetooth 查看输出结果

     输出里有 timeout

            此时再用 systemctl status bluetooth.service 看下服务有没有正常启动,错误信息是什么,然后根据错误去网上搜索答案。

            如果蓝牙是由网卡提供的,此时可以试着开关一下网卡的硬件开关。因为内核在初始化网卡之前初始化蓝牙,就会导致蓝牙设备不可用,重新初始化一次就好了。 如果还是无效那就重启进入 window,再 window 里开关一次蓝牙再重启到 linux。

        输出里无 timeout

            这就表明初始化没问题,继续下一步

    2).执行 sudo hciconfig 查看设备当前的状态

        状态为 DOWN

        则执行 sudo hciconfig hci up,其中 number 为前面输出显示的。 如果命令执行失败,参照第一步。

        状态为 UP

        继续下一步

    3).执行 sudo rfkill list 查看设备是否被 block

        被 block

        则执行 sudo rfkill unblock

    如果尝试完上述步骤,蓝牙仍不可用,那就反馈吧,提供日志及 lsusb 输出,等待问题被解决。
Reply View the author
avatar
duanyao
deepin
2018-04-25 00:07
#3
本帖最后由 duanyao 于 2018-4-25 12:48 编辑

@aida
似乎我没说清楚。如上面的图片,蓝牙其实是可用的,通过 blueman 程序操作是正常的:可以搜索到周围的设备,也能接收手机发送的文件,就是控制中心里没有蓝牙的图标。
systemctl status bluetooth.service 的输出前面已经贴出。
dmesg 和 syslog 在反馈文件里有,似乎没看出什么问题。

$ lsusb
Bus 002 Device 005: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller
Bus 002 Device 004: ID 0489:e00d Foxconn / Hon Hai Broadcom Bluetooth 2.1 Device
Bus 002 Device 003: ID 1c7a:0603 LighTuning Technology Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 5986:0364 Acer, Inc
Bus 001 Device 005: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

我刚换了 ukuu 的 4.16.3 内核,目前蓝牙一切正常,也解决了不能发送文件到手机的问题 ( https://bbs.deepin.org/post/155547 ) ,控制中心也有蓝牙图标,用一段时间看看如何。

update:  ukuu 的 4.16.3 内核也有问题,控制中心没有蓝牙图标、但 blueman 正常的情况也出现了,似乎是在待机/唤醒之后出现的问题;发送文件也只成功了两三次,后来就再也不行了。

Reply View the author
avatar
duanyao
deepin
2018-04-26 03:53
#4
又出现了一次控制中心蓝牙图标消失,但是 blueman 仍然可用的情况。这发生在一次待机-恢复之后。
这时的设备状态看起来是正常的:

$ rfkill list
0: ideapad_wlan: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: ideapad_bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
10: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
duanyao@duanyao-laptop:~$ hciconfig
hci0:        Type: Primary  Bus: USB
        BD Address: C0:18:85:EB4:E4  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING PSCAN
        RX bytes:661 acl:0 sco:0 events:48 errors:0
        TX bytes:4783 acl:0 sco:0 commands:48 errors:0

duanyao@duanyao-laptop:~$ lsusb
Bus 002 Device 005: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller
Bus 002 Device 046: ID 0489:e00d Foxconn / Hon Hai Broadcom Bluetooth 2.1 Device
Bus 002 Device 003: ID 1c7a:0603 LighTuning Technology Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 5986:0364 Acer, Inc
Bus 001 Device 003: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


通过拨动两次硬件开关,控制中心的蓝牙图标又回来了。
Reply View the author
avatar
157******85
deepin
2018-05-03 23:23
#5
同样的问题,蓝牙图标消失,一样出现在睡眠状态被唤醒后。
Reply View the author
avatar
oo1605
deepin
2018-05-07 23:55
#6
同样的问题+1
Reply View the author
avatar
muzilee
deepin
2018-05-08 17:16
#7
这个问题在我的Dell XPS 9560上也存在,当睡眠的时候唤醒,就会出现蓝牙失效,蓝牙图标消失,有时候重启是不生效的,需要关机,再启动,即可检测到蓝牙。
Reply View the author