Bluetooth Sometimes Dies after leaving computer for a length of time

Ubuntu Version

Ubuntu 26.04 LTS Flavors

Desktop Environment (if applicable)

KDE Plasma

Problem Description

Recently, an intermittent problem has developed when I leave my computer running for a length of time. When I come back to it, I find Bluetooth is not working. This is a major annoyance for me as my preferred mode of usage is to use an external monitor and a Bluetooth-enabled mouse and keyboard. System Settings is not able to revive Bluetooth. In the past, with Kubuntu 24.04.4, System Settings was my go-to solution but it doesn’t help now.

My only reliable means of getting Bluetooth back is rebooting.

I am looking for a series of command line steps that will enable me to get to the bottom of the problem. None of the web resources I have found are close to authoritative and do not tell me anything useful. Commands such as hciconfig, btmgmt, rfkill have not told me anything useful.

I am trying to be systematic here in diagnosing where the problem lies; once I know that, I can go about solving it.

Relevant System Information

Lenovo Thinkpad P16 Gen2 laptop
Kubuntu 26.04 LTS
Logitech MX Master 3S mouse
Logitech MX Mechanical Keyboard

What I’ve Tried

Just the meager offerings available on the Internet. Nothing systematic there.

1 Like

To bring Bluetooth back without rebooting do it:

sudo modprobe -r btusb btintel

sudo modprobe btintel

sudo modprobe btusb

To fix it permanently so it stops dying when left idle, disable USB autosuspend for the Bluetooth module:

echo "options btusb enable_autosuspend=n" | sudo tee /etc/modprobe.d/btusb.conf

sudo update-initramfs -u

Reboot one time and you are good to go.

If it works and you want to know why this happens, let me know and I will write up the details when I have more free time :wink:

3 Likes

Thank you!

Well, I don’t know if it works or not. I returned to my computer this morning and there was no problem; I said in the original post that the problem was intermittent.

But I did apply your permanent fix and everything is working after rebooting.

I would like your explanation of what was happening and why this fix works. It sounds like there is a default “autosuspend” “feature” setting of “off” and we just changed it. I’m sure there must be a reason why this is the default but I can’t imagine it.

Glad to hear everything applied cleanly and rebooted without issues!

Definitely keep an eye on it over the next couple of days to make sure the intermittent drops are gone for good. I’m a bit tied up tonight, but I’ll write up a detailed breakdown of how USB autosuspend works and why it breaks Bluetooth tomorrow :wink:

If it happens again, get results from terminal for lsusb; sudo dmesg|grep -E -i 'blue|firm'

1 Like

OK, it’s happened again:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 27c6:6582 Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC
Bus 001 Device 003: ID 174f:181f Syntek Integrated Camera
Bus 001 Device 004: ID 2ce3:9563 Generic EMV Smartcard Reader
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0781:55af SanDisk Corp. Extreme Pro 55AF
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[sudo: authenticate] Password:        
[414146.997511] audit: type=1400 audit(1790619375.959:15468198): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414146.997516] audit: type=1400 audit(1790619375.959:15468199): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414296.998477] audit: type=1400 audit(1790619525.961:15474724): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414296.998483] audit: type=1400 audit(1790619525.961:15474725): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414341.999996] audit: type=1400 audit(1790619570.962:15476674): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414342.000003] audit: type=1400 audit(1790619570.962:15476675): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414377.000652] audit: type=1400 audit(1790619605.963:15478293): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414377.000657] audit: type=1400 audit(1790619605.963:15478294): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414637.007391] audit: type=1400 audit(1790619865.968:15489717): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414637.007397] audit: type=1400 audit(1790619865.968:15489718): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414682.013564] audit: type=1400 audit(1790619910.970:15491843): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414682.013569] audit: type=1400 audit(1790619910.970:15491844): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414687.014883] audit: type=1400 audit(1790619915.970:15492067): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[414687.014891] audit: type=1400 audit(1790619915.970:15492068): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4565 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"

Yeap, Look at your lsusb - the Intel Bluetooth controller is completely gone from the bus.

That is why the btusb module setting did not help - the device is dropping off the internal USB bus entirely at the xHCI controller or hardware level.

and that grep command caught AppArmor spam from Discord instead of the kernel logs.

To see what the USB subsystem did when the chip disconnected, run it:

sudo dmesg -T | grep -i -E "usb|xhci" | tail -n 40

And check if rfkill sees it:

rfkill list all
1 Like

Thank you!

OK, I see that. That is an indication of the problem.

OK, about the AppArmor spam from Discord.

  1. I HATE those notifications that constantly pop up about Discord updates. I am quite content to let Discord run the previous version and the damned thing seemingly gets several updates a day. Do you know how I might turn this off?

  2. I’m not sure if you’re implying that AppArmor spam from Discord is responsible for my not seeing the kernel logs in grep or something else. Is this issue related or not related to my Bluetooth problem?

~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 27c6:6582 Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC
Bus 001 Device 003: ID 174f:181f Syntek Integrated Camera
Bus 001 Device 004: ID 2ce3:9563 Generic EMV Smartcard Reader
Bus 001 Device 007: ID 8087:0033 Intel Corp. AX211 Bluetooth
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0781:55af SanDisk Corp. Extreme Pro 55AF
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

~$ sudo dmesg -T | grep -i -E "usb|xhci" | tail -n 40
[sudo: authenticate] Password:        
[Tue Sep 29 10:23:24 2026] usb 1-3: reset full-speed USB device number 2 using xhci_hcd

This does not appear to be information related to the problem, which occurred yesterday so it might have scrolled off. This happened ten minutes before I ran the command. And device number 2 does not appear to be related to bluetooth. There are device #2s on two buses.

UPDATE:
I tried the previous command and it had already scrolled off. And running it to capture older messages also brought back nothing.

~$ sudo dmesg -T | grep -i -E "usb|xhci" | tail -n 40
~$ sudo dmesg -T --since '2 days ago'| grep -i -E "usb|xhci" | tail -n 40
~$
$ rfkill list all
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: no
        Hard blocked: no
2: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
4: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

No problems here, but things are okay now so I wouldn’t expect there to be.

So how might I use this information or other information to fix the problem? And is it related to Discord?

OK, it happened again. This is still an issue. and this:

doesn’t fix it.

As for diagnostics:

$ lsusb; sudo dmesg|grep -E -i 'blue|firm'
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 27c6:6582 Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC
Bus 001 Device 003: ID 174f:181f Syntek Integrated Camera
Bus 001 Device 004: ID 2ce3:9563 Generic EMV Smartcard Reader
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0781:55af SanDisk Corp. Extreme Pro 55AF
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[696021.427040] audit: type=1400 audit(1791316404.680:25957121): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4250 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[696231.432376] audit: type=1400 audit(1791316614.685:25965593): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4250 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"
[696231.432390] audit: type=1400 audit(1791316614.685:25965594): apparmor="DENIED" operation="ptrace" class="ptrace" profile="snap.discord.discord" pid=4250 comm="Utils" requested_mask="read" denied_mask="read" peer="snap.firmware-updater.firmware-notifier"

From lsusb I learn that the Bluetooth device is gone.
From grep I learn that something about the snap firmware updater and discord has bothered the system.

I still don’t know if the firmware updater thing is related to the bluetooth disappearance or not. Nor do I understand what its relation to discord might be.

Can someone please explain this.

And can someone suggest another temporary fix that will solve this without rebooting?

A new clue:

After all else failed, I rebooted.

Bluetooth came up enabled and IS WORKING. But I immediately saw this message in System Settings:

Failed to download metadata for lvfs: network is unreachable: Error resolving “cdn.fwupd.org”: Temporary failure in name resolution

This seems related to the previously reported symptom about firmware, but I haven’t previously seen this message.

Does this suggest an answer?

Digging down a bit deeper, I googled “Ubuntu update lenovo firmware”. An AI thingy directed me to run, as a first step

fwupdmgr refresh --force

This command never returned. All this seems to indicate that my firmware update process is hosed. What to do about it?

And why do I see a message that this Discourse topic will close in five hours? I want it kept open as I recently disclosed new information!

Is Ubuntu on that SSD on the USB bus or listed in /etc/fstab? That might be using enough power to cause the bluetooth not to show in lsusb results

No. It indicates possible problems with network connectivity.

You may be right. My internet connectivity is not ideal. Intermittent connection failures do occur from time to time on my system. That might explain the entries in dmesg. On the other hand, at the time when I issued the fwupd command there were no network problems, so why wouldn’t the command return?

My next question is whether this has anything at all to do with my Bluetooth problem. The only reason it came up was because of the

dmesg grep

command that someone suggested I run. It may be totally unrelated.

By “is Ubuntu on that SSD” do you mean the OS, the boot partition, etc.? If so, no, the OS is not loaded on that SSD. It is loaded on an internal NVME SSD. The SSD is NOT listed in /etc/fstab.

Try booting without that external drive connected and see if the Bluetooth issue vanishes

Thanks for the idea, but I’m not sure that’s a viable testing strategy, unless you can explain it. The disappearing bluetooth may happen days or even weeks since the last boot, and I need the SSD.

It may involve power consumption on the USB bus. The last time I had a bluetooth device just vanish is when I used an external drive

What @Jeremy31 describes is a known issue with the USB 3.0 bus and 2.4Ghz (Bluetooth and WiFi) devices where, for some reason, certain USB 3.0 drives are known to, when plugged-in, interfere with the 2.4Ghz band and cause either WiFi, Bluetooth, or both to disappear. So, his hypothesis is sound. I’d follow the recommended test.