pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.44k stars 87 forks source link

Bluetooth gets stuck off, and can't be turned on without a restart. #1153

Open connervieira opened 4 years ago

connervieira commented 4 years ago

Distribution (run cat /etc/os-release): Pop!_OS 20.4 LTS

Related Application and/or Package Version (run apt policy $PACKAGE NAME): N/A

Issue/Bug Description: Bluetooth Toggle occasionally stops functioning, causing Bluetooth to get stuck off, and requires restart to fix Screenshot from 2020-07-18 14-37-30 Note that the menu says "Bluetooth off", but the button says still "Turn off". After clicking "Turn off", it switches to "Turn on", but the menu still doesn't change the status of Bluetooth. Screenshot from 2020-07-18 14-37-56 Note that the toggle is in the on position, but Bluetooth is still turned off.

Steps to reproduce (if you know): Seems to happen when unlocking the system, when my Bluetooth mouse attempts to reconnect.

Expected behavior: When the switch to enable/disable Bluetooth in the Settings menu or in the task bar menu is flipped, the menu should update, showing Bluetooth devices, and the updated status.

Other Notes: I tried running 'sudo /etc/init.d/bluetooth restart', which didn't change anything. Also, my Bluetooth headphones refuse to connect, despite connecting to all other devices. I'm not sure if this is related, but I thought I'd mention it since it involves Bluetooth as well. I'm on a MacBookPro9,2 (Mid 2012 MacBook Pro)

akashrajum7 commented 4 years ago

Installing Blueman kinda fixed the problem for me.

Instructions here: https://support.system76.com/articles/bluetooth/

jeedaiian commented 3 years ago

I had a similar issue. When you run,

systemctl status bluetooth

it shows something like this.

pop-os bluetoothd[18756]: src/main.c:parse_controller_config() Key file does not have group “Controller”

Tried:

sudo apt install --reinstall bluez gnome-bluetooth indicator-bluetooth pulseaudio-module-bluetooth

No luck.

My fix: go boot into Windows>Device Manager>Wifi card>uncheck "allow windows to turn off this device to save power" I THINK you can set this in the terminal in Linux, but i dont know how to.

Something to add: i also installed pulseaudio-modules-bt https://github.com/EHfive/pulseaudio-modules-bt OR https://github.com/EHfive/pulseaudio-modules-bt/wiki/Packages#ppaberglhpulseaudio-a2dp

ACodingGenie commented 3 years ago

+1 experiencing the same issue Pop!_OS 20.10. Along with #1423, #1311. Brand new Install.

jeedaiian commented 3 years ago

can you try this: wlan0 being the wireless adapter in use.

sudo iwconfig wlan0 power off

And see if bluetooth can be turned on.

If it works(report back, as i cant recreate this issue and cannot test my theory), refer here: https://unix.stackexchange.com/questions/269661/how-to-turn-off-wireless-power-management-permanently for the permanent solution.

EDIT: The >sudo iwconfig wlan0 power off may not work. You want to try the permanent solution

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Change:

wifi.powersave = 3

To:

wifi.powersave = 2

And reboot

THIS IS A TEMPORARY FIX, if it works The thing that needs to be fixed is wireless power management/saving. See #1167

ACodingGenie commented 3 years ago

No luck. I get no error messages in terminal now for some reason which is good by running command "sudo service bluetooth status" image image Bluetooth is "On" but shows off here image Nothing is shown in settings (I turned the toggle here on manually, shows off even if turned on via drop-down menu above): image All of this seems to be triggered when computer goes to sleep by itself and you resume again. I restarted, stopped, started, force-reloaded bluetooth service with no luck after I saw that the command you provided made no change. I also reloaded "networking" service which did nothing as well. It does show that power management is off when I do "sudo iwconfig [card name]": image

Should I reboot after I run your command (rebooting seems to fix the issue regardless, so we might not know)? Thanks for the help!

ACodingGenie commented 3 years ago

The problem is still there even after the 'permanent fix', although I can get bluetooth to turn on again if I suspend the system manually and wake it up again. Also, whenever I'm playing some form of audio, whether its Spotify or Youtube or anything related, and I pause the audio just to resume it shortly afterwards, it doesn't play through my headphones but rather though the laptop's speakers. I believe my headphones are still connected, although I don't know for sure. I did the command "sudo service bluetooth status" and got these errors: image I have to turn bluetooth off and on again but this time around when this bug happens, it won't turn on no matter what you do. You have the suspend the system and wake it up again to resolve the issue and even then this whole spiel happens again.

Edit [12/06/20]:

Edit [12/09/20]: (A FIX)

Now to fix the whole routing issue when bluetooth headphones are connected but audio plays through laptop's speakers instead:

This is apparently a known bug in Pulse-Audio that creates a routing issue. I've tried it and for the few minutes I've used it, the issue seems to have disappeared. I will update this as time goes on for reliability sake. Both of these bugs exist in the Ubuntu 20.04 system as well so it must've carried over to Pop!_OS and I don't think its an issue with Pop!_OS itself. It might be beneficial to file these issues with Ubuntu themselves. With that said, my bluetooth still disconnects for no reason sometimes and when I turn it off, it won't turn on again. Running those commands turns it on without requiring a sleep cycle. Thanks.

allout58 commented 2 years ago

FYI still seeing this in 21.10 (kernel 5.15.8). As mentioned above, suspending and resuming (not restarting) seems to temporarily resolve the issue for me.

nozzlegear commented 2 years ago

I'm having the same bluetooth issue in 21.10, however neither suspending/restarting or the suggested rmmod btusb && modprobe btusb solutions work on my end. I'm unable to get bluetooth to work at all. I've played around with different versions of pop and some other distros, and found that using 20.04 has functioning bluetooth but 21.10 does not.

efloehr commented 2 years ago

21.10 here, and had issue with bluetooth not turned on and not able to be turned on after a reboot. Thelio Major with built-in Intel Dual Band 802.11a/b/g/n/ac/ax + Bluetooth 5.0. '''rmmod btusb && modprobe btusb''' also solved the problem for me, however I had to manually reconnect my bluetooth mouse.

jcursiolf commented 2 years ago

20.04 LTS (NVIDIA drivers) on an HP Zbook 15 G5, no dual boot whatsoever. None of the workarounds presented here work, sadly.

nozzlegear commented 2 years ago

I just updated packages, restarted my pc and bluetooth is working again. I'm now on Pop OS 21.10 with kernel version 5.15.15. Will edit this if bluetooth stops working again after another restart.

dbworku commented 2 years ago

Also repro'd this morning on Pop_OS 21.10 with Linux kernel 5.15.15. Suspending and restarting didn't solve Bluetooth being stuck in off. Also, it appears that the kernel can't even find the btusb module. Very weird.

dbworku@pop-os:~$ rmmod btusb && modprobe btusb
rmmod: ERROR: Module btusb is not currently loaded
chriotte commented 2 years ago

Hi, I'm having the same issue with Pop_OS 21.10 (I had it once a few months ago with 21.04 as well). I tried a few different things like cold booting, simply restarting, suspending and logging back in, locking the machine and logging back in. Starting and stopping Bluetooth from the Terminal etc. The thing that finally worked for me was to suspend the machine, wake it up, and press the power button to turn it off before logging back in. So almost seems a bit random what sorts out the issue both for me and others.

I'm on a Thinkpad X1 Extreme 3rd Gen.

EDIT: I've been using Bluetooth successfully every day for months with my keyboard and mouse. This problem happened when I.. 1 - closed the lid (the computer was still running) 2 - turned off the power socket (this normally puts the computer to sleep, and I don't like having the computer on mains all night) 3 - The fans stopped spinning, so I thought the machine was sleeping 4 - went to bed... 5 - The morning after the computer had turned off and the battery was drained. 6 - I had already turned on the power 40 mins before trying to wake, I got distracted and didn't have time to sit down on my desk as planned 7 - the computer was abnormally slow to boot, and when finally logged in I didn't have Bluetooth. Note that I had something like 40% battery at this stage since the computer had been charging for a while.

Typing this on the machine from my Bluetooth keyboard, so all is back to normal now.

chriotte commented 2 years ago

Hi all! Same problem today. Put the computer to sleep on Friday, the battery was drained this morning, and when booting up the Bluetooth can no longer be turned 'on'. Going to sleep and draining the battery seems to be the root cause in my instances.

imnirfn commented 2 years ago

Hi i have the same problem today after updates. Tried everything above including in https://support.system76.com/articles/bluetooth/ but none of it works. The bluetooth button cannot be toggle and cannot connect to my devices. this issue also cannot be resolve with restart neither power off.

i have also found this upon running sudo dmesg -k

[    7.999750] usb 1-8: Direct firmware load for ar3k/AthrBT_0x31010100.dfu failed with error -2
[    7.999757] Bluetooth: Patch file not found ar3k/AthrBT_0x31010100.dfu
[    7.999761] Bluetooth: Loading patch file failed
[    7.999765] ath3k: probe of 1-8:1.0 failed with error -2
hammeronthenet commented 2 years ago

@imnirfn the same for me here:

[ 804.265166] usb 1-1.1: Product: Bluetooth USB Host Controller [ 804.265168] usb 1-1.1: Manufacturer: Atheros Communications [ 804.265169] usb 1-1.1: SerialNumber: Alaska Day 2006 [ 804.266546] usb 1-1.1: Direct firmware load for ar3k/AthrBT_0x01020200.dfu failed with error -2 [ 804.266550] Bluetooth: Patch file not found ar3k/AthrBT_0x01020200.dfu [ 804.266553] Bluetooth: Loading patch file failed [ 804.266555] ath3k: probe of 1-1.1:1.0 failed with error -2 [ 842.367729] r8169 0000:04:00.2 enp4s0f2: Link is Down [ 844.317889] usb 1-1.1: USB disconnect, device number 5 [ 873.874548] r8169 0000:04:00.2 enp4s0f2: Link is Down

Any solution?

hammeronthenet commented 2 years ago

@imnirfn and for all the others: I solved installing a previous linux firmware.

From : http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/

I downloaded:

linux-firmware_1.201.5_all.deb

Then I run downgrade forcing the rewrite:

sudo dpkg -i --force-overwrite linux-firmware_1.201.5_all.deb

Then reboot. Please note, could be a great idea to hold update of linux firmware with a sudo apt-mark hold linux-firmware.

chriotte commented 2 years ago

Hi, I'm having the same issue with Pop_OS 21.10 (I had it once a few months ago with 21.04 as well). I tried a few different things like cold booting, simply restarting, suspending and logging back in, locking the machine and logging back in. Starting and stopping Bluetooth from the Terminal etc. The thing that finally worked for me was to suspend the machine, wake it up, and press the power button to turn it off before logging back in. So almost seems a bit random what sorts out the issue both for me and others.

I'm on a Thinkpad X1 Extreme 3rd Gen.

EDIT: I've been using Bluetooth successfully every day for months with my keyboard and mouse. This problem happened when I.. 1 - closed the lid (the computer was still running) 2 - turned off the power socket (this normally puts the computer to sleep, and I don't like having the computer on mains all night) 3 - The fans stopped spinning, so I thought the machine was sleeping 4 - went to bed... 5 - The morning after the computer had turned off and the battery was drained. 6 - I had already turned on the power 40 mins before trying to wake, I got distracted and didn't have time to sit down on my desk as planned 7 - the computer was abnormally slow to boot, and when finally logged in I didn't have Bluetooth. Note that I had something like 40% battery at this stage since the computer had been charging for a while.

Typing this on the machine from my Bluetooth keyboard, so all is back to normal now.

Hi all,

For me this turned out to be a hardware problem. Lenovo replaced the motherboard of my machine, and the issue is no longer present in either popos or windows.

0p3r4t0r commented 2 years ago

I am getting this issue on the System76 Pangolin.

What happened

So just to be clear I'm not advocating that anybody do this, but rfkill was showing no bluetooth device as below. Which lead me to believe it was a hardware problem. Probably a loose connection. I pinched both sides of my laptop casing together by squeezing them lightly between my thumb and forefinger (just the lower chassis, not the screen ), and my bluetooth turned on.

BEFORE

rfkill list             
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

AFTER

rfkill list               
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

More Details (A possible solution)

I carry my laptop around a lot and was thinking that the jostling could have caused a loose connection. A more practical solution would be to try opening up your computer and disconnecting/reconnecting the bluetooth card.

My issue was that sometimes the bluetooth would cut out after sleeping and a number of restarts would make it work. Every time it wasn't working rfkill list would not show bluetooth. If you are in a similar situation check rfkill list every time you can't turn bluetooth on, if the card is not shown try reconnecting it.

NOVATechnocrat commented 2 years ago

Same/similar issue. After a recent update, I could not "turn on" bluetooth via Gnome.

For some reason -unknown to me- when I suspended and resumed it, it seems to work again. For reference, I never use suspend, so I'm unsure why this would have an effect.

Give that a try. ¯_(ツ)_/¯

sarunmrzn commented 2 years ago

Same problem, for me, I had to unpair and pair the device again to work.

pcfields commented 1 year ago

I am experiencing this issue as well with logitech bluetooth keyboard and mouse

shivamkainth commented 1 year ago

You can try running following commands in terminal to fix this problem:

sudo rmmod btusb sudo modprobe btusb It works flawlessly everytime

Grievous-Spinout commented 1 year ago

I am also affected by this mainboard MSI b450i ac plus but I suspect that it isn't only the Bluetooth that is the problem. I have tried deactivating Bluetooth on my main board and plugging in an external adapter. Problem persists but if I plug the adapter into my external hub and then turn it off and on again, when the problem occurs I get my Bluetooth back. I suspect it has something to do with power saving. Since if I don't use my keyboard and mouse for a while, it's parented to happen. Unfortunately I cannot find anywhere I can turn off the power saving since pop isn't using grub anymore (as far as I can see).. but maybe it will put someone else on the right track.

could be due to mainboard failure.. but dono

jacobgkau commented 1 year ago

I am getting this issue on the System76 Pangolin.

If you're having the issue with a System76 computer, please open a support ticket. It may not be possible to manage every single motherboard/wireless card combo under the sun, but this kind of issue would generally be tested for before release (and/or investigated if it's found to occur later) on System76 hardware.

(I know that report was a while ago, but I'm leaving this mostly for future commenters, as most of the reports in this issue are for non-System76 configurations.)

rwjack commented 1 year ago

Still an issue.

It's like the WiFi adapter forgets to wake up. (Asus Z270E mobo with the external WiFi that comes with it)

Worth mentioning that I'm dual-booting Windows, could be related?

leviport commented 1 year ago

Actually that's not the first time I've heard of Windows dual boot affecting wifi. Someone opened a documentation PR mentioning it recently: https://github.com/system76/docs/pull/1143

If that fixes it for you, could you let me know?

rwjack commented 1 year ago

I disabled the "Allow windows to turn off this device in order to save power" - (something like that), in Device Manager. Not sure if that's what fixed it, but I did a quick sleep, and my magic trackpad works normally now after waking up.

I'll keep you updated here if the results change during the longer overnight sleep.

rwjack commented 1 year ago

@leviport nope, still broken, let me try disabling Fast Startup.

Edit: Bad news, fast startup is already disabled.

This is quite breaking. I didn't have the bug since 2020 (or just didn't seem to notice), but can anyone bump this up?

anusreen14 commented 1 year ago

Hi, I'm having the same issue with Pop_OS 21.10 (I had it once a few months ago with 21.04 as well). I tried a few different things like cold booting, simply restarting, suspending and logging back in, locking the machine and logging back in. Starting and stopping Bluetooth from the Terminal etc. The thing that finally worked for me was to suspend the machine, wake it up, and press the power button to turn it off before logging back in. So almost seems a bit random what sorts out the issue both for me and others.

I'm on a Thinkpad X1 Extreme 3rd Gen.

EDIT: I've been using Bluetooth successfully every day for months with my keyboard and mouse. This problem happened when I.. 1 - closed the lid (the computer was still running) 2 - turned off the power socket (this normally puts the computer to sleep, and I don't like having the computer on mains all night) 3 - The fans stopped spinning, so I thought the machine was sleeping 4 - went to bed... 5 - The morning after the computer had turned off and the battery was drained. 6 - I had already turned on the power 40 mins before trying to wake, I got distracted and didn't have time to sit down on my desk as planned 7 - the computer was abnormally slow to boot, and when finally logged in I didn't have Bluetooth. Note that I had something like 40% battery at this stage since the computer had been charging for a while.

Typing this on the machine from my Bluetooth keyboard, so all is back to normal now.

Ahhhh...this worked!!!

kachapman commented 4 months ago

You can try running following commands in terminal to fix this problem:

sudo rmmod btusb sudo modprobe btusb It works flawlessly everytime

This fixed it for me. Im on a Beelink mini computer with built in bluetooth. It had hard shutdown in a power outage right before this issue happened.