蓝牙关闭,即使“打开”

ebo*_*osi 6 fedora bluetooth

我有一台 Thinkpad X1 Carbon 7th Gen,运行 Fedora 30。我的问题是我无法让蓝牙工作。我尝试了多种方法来解决这个问题,但都没有效果。

  • 通过设置 GUI

当我转到“设置/蓝牙”时,我可以打开蓝牙(右上角的拨动开关)。但是,文本不会改变并告诉我蓝牙已关闭。

在此处输入图片说明

  • iwlwifi.conf

当然,我已经在BIOS中检查了蓝牙是否已激活。此外,我创建/etc/modprobe.d/iwlwifi.conf如下:

options iwlwifi bt_coex_active=0
Run Code Online (Sandbox Code Playgroud)
  • 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=""
Run Code Online (Sandbox Code Playgroud)
  • 人机交互配置

我还尝试禁用蓝牙的电源优化,但在我想切换时powertop尝试运行>> /usr/sbin/hciconfig hci0 up &> /dev/null &

options iwlwifi bt_coex_active=0
Run Code Online (Sandbox Code Playgroud)

当我运行 Fedora (?) 时,我有bin而不是sbin,所以我sudo /usr/bin/hciconfig hci0 up &> /dev/null手动运行。

  • 通过 CLI 打开蓝牙
[…]

# 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=""
Run Code Online (Sandbox Code Playgroud)
  • 检查rfkill状态

似乎不是这里的问题。

>> Good          Bluetooth device interface status
Run Code Online (Sandbox Code Playgroud)
  • 通过调查dmesg 我已经使用# comments. 请注意,当我打开计算机并进入左上角菜单时,我可以“关闭”蓝牙……哪个状态是“关闭”!

在此处输入图片说明

$ 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
Run Code Online (Sandbox Code Playgroud)

所有这一切都没有效果。

? 如何让蓝牙真正工作?

ebo*_*osi 2

好吧,我觉得有点愚蠢,但是\xe2\x80\xa6蓝牙守护程序根本没有运行

\n\n

所以我通过以下方式解决了这个问题:

\n\n
systemctl enable bluetooth\n
Run Code Online (Sandbox Code Playgroud)\n\n

瞧\xc3\xa0!

\n