Bluetooth adapter disappears after suspend", only shutdown can fix

“Bluetooth adapter disappears after suspend”, only shutdown can fix

Hello, I’m having trouble with my Bluetooth adapter on my Manjaro Linux system with a lenovo laptop, kernel version 6.6.16.
After suspending the system, the Bluetooth adapter disappears and I’m unable to reconnect. Below is the lsusb output:

➜  ~ lsusb               
Bus 001 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 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 003 Device 002: ID 30c9:00a8 Luxvisions Innotech Limited Integrated RGB Camera  
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

I must shutdown and start the laptop, the bluetooth can go back, if only reboot, the bluetooth cant go back.
After the bluethooth adapter goes back, the lsusb output:

➜  ~ lsusb | grep Blue
Bus 001 Device 002: ID 0489:e0d8 Foxconn / Hon Hai Bluetooth Adapter

My system version:

➜  ~ uname -a 
Linux lj-82y8 6.6.16-2-MANJARO #1 SMP PREEMPT_DYNAMIC Sat Feb 10 09:40:02 UTC 2024 x86_64 GNU/Linux

➜  ~ inxi -Eazy
Bluetooth:
  Device-1: Foxconn / Hon Hai Bluetooth Adapter driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-5:2 chip-ID: 0489:e0d8
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 5.2
    lmp-v: 11 status: discoverable: no pairing: no class-ID: 6c010c

Btw, I have already added the btusb.enable_autosuspend=0 kernel parameter:

➜  ~  systool -v -m btusb 
Module = "btusb"

  Attributes:
    coresize            = "86016"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "0"
    srcversion          = "5889BCB445ACD2BE60E76CB"
    taint               = ""
    uevent              = <store method only>
    version             = "0.8"

  Parameters:
    disable_scofix      = "N"
    enable_autosuspend  = "N"
    force_scofix        = "N"
    reset               = "Y"

issue summary:

  • after suspend, the bluetooth adapter disappears RANDOMLY, especially discharge the AC adapter
  • only shutdown laptop can make bluethooth adapter go back, restart service, reboot system can’t
  • tried btusb.enable_autosuspend=0 , not working
  • no windows installed, only manjaro

Thank you in advance for any help you can provide. I appreciate your time and expertise.

Hi @llj098,

Had you check the Arch wiki, which should have been your first stop in troubleshooting this, you’d have come across this:

https://wiki.archlinux.org/title/Bluetooth#Adapter_disappears_after_suspend/resume

So maybe that, or something on the page helps!

1 Like

Hi, @Mirdarthos Thanks for the reply, as I wrote, the bluetooth adapter is totally gone from lsusb output.

So it seems that I can’t call (from arch wiki )

usb_modeswitch -R -v *vendor_ID* -p *product_ID*

anyway, I’ll try that when it occurs again, Thanks!

Just get the product and vendor ID while it’s there, before the suspend. That way it’s easy to run and test on wakeup.

If that works, as workaround, we can create a systemd unit that runs that on wakeup for you.

It happens again, tried this method, no luck,

➜  ~ sudo usb_modeswitch -R -v  0489 -p e0d8
Look for default devices ...
 No devices in default mode found. Nothing to do. Bye!

Thanks

Then it sounds like it’s perhaps not waking from sleep. So the best is to disable power saving only for that adapter. If it’s enabled. So please provide the output of:

cat /etc/bluetooth/input.conf

Below is the output:

➜  ~ cat /etc/bluetooth/input.conf


# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface
[General]

# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
#IdleTimeout=30

# Enable HID protocol handling in userspace input profile
# Defaults to false (HIDP handled in HIDP kernel module)
#UserspaceHID=true

# Limit HID connections to bonded devices
# The HID Profile does not specify that devices must be bonded, however some
# platforms may want to make sure that input connections only come from bonded
# device connections. Several older mice have been known for not supporting
# pairing/encryption.
# Defaults to true for security.
#ClassicBondedOnly=true

# LE upgrade security
# Enables upgrades of security automatically if required.
# Defaults to true to maximize device compatibility.
#LEAutoSecurity=true

BTW, how can I disable the power save for the bluetooth adapter when the system suspends?

Thanks!

That is exactly what I was about to suggest. But first, my last question:

Please provide the output of:

grep AutoEnable /etc/bluetooth/main.conf
➜  ~ grep AutoEnable /etc/bluetooth/main.conf


# AutoEnable defines option to enable all controllers when they are found.
AutoEnable=true

OK, so that doesn’t seem to be it. So let’s try this:

Run the following in the terminal to disable bluetooth power saving:

sudo sed -i 's/#IdleTimeout=30/IdleTimeout=0/g' /etc/bluetooth/input.conf

And reboot afterwards. If this doesn’t work, unfortunately I have no idea what else to try.

Hope it helps!

1 Like

OK, I’ll try that, Thanks a lot!

BTW, AFAIK, the solution you supply seems set the connection timeout for bluetooth idle?

# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)

Anyway to keep the bluetooth adapter awake when the system suspends?

Thanks,
LJ

From that I could see it disables it turning off, yes.

OK, Let me try if it works, thanks!

@Mirdarthos Hi, I tried this, today, the issues happens again…

Hi again @llj098.

We can try and see if there is anything about this in the logs. Please provide the output of:

journalctl --priority=warning..err --no-pager --boot=-1 --grep='bluetooth'

Where:

  • The --priority=warning..err argument limits the output to warnings and errors only;
  • and the --no-pager formats the output nicely for use here, on the forum;
  • the --boot=-1 argument limits the output to log messages from the previous boot. This can be adjusted to -2 for the boot before that, -3 to the boot before that, and so on and so forth; and
  • the --grep='bluetooth' argument searches for any mention of the term “bluetooth”.

But other than this, I have absolutely no idea…

Hi, Thanks for the reply! I’ll try that when the issue happens…

Really appreciate your help!

1 Like