tomaspinho / rtl8821ce

Other
1.58k stars 412 forks source link

Bluetooth only working after hibernation #276

Open jurgen-74 opened 2 years ago

jurgen-74 commented 2 years ago

Hi all,

Thanks for this driver. Wi-Fi is working just fine, but I never got my Bluetooth working. I never manage to get it to work (not in Kubuntu 20.04, 20.10 nor in 22.04)... At least, this is what I thought. This week, I activated the hibernation option on my laptop. To my surprise, after staring the system from hibernation, my Bluetooth device was visible and working! This does not work with suspend or reboot or any other option, only after hibernation.

Do you have any idea what might be the solution? Also, please tell me if you need more info (with the commands).

This is lsusb when the Bluetooth is switched on (after hibernation): Bus 001 Device 004: ID 0bda:b00a Realtek Semiconductor Corp. Realtek Bluetooth 4.2 Adapter My system: Kubuntu 22.04, plasma 5.24.4; kernel 5.15.0-35

Blessings, Jurgen

ystefaniuk commented 2 years ago

Same issue. Did you find solution?

jurgen-74 commented 2 years ago

Same issue. Did you find solution?

Nope! I am clueless (not that I'm any good when it comes to these things). Did you find it out by coincident?

ystefaniuk commented 2 years ago

@jurgen-74 I spent 2 days to fix issue that Ubuntu doesn't recognize bluetooth adapter but today I found your post and tried reproduce your flow and bluetooth has started to work after hibernation. I will research some info about that issue. Will chat you once find smth

ystefaniuk commented 2 years ago

@tomaspinho do you have any ideas?

NBoumakis commented 2 years ago

This is exactly what happened to me too. I must say I was dumbfounded. I have a basic question. Does hibernation enable Bluetooth in the latest kernel, or it "works" on other versions too? I cannot answer this, I never had hibernation enabled before.

System info:

jurgen-74 commented 2 years ago

For some reason it stopped working after my latest update. So, I said Bluetooth worked after hibernation but after my latest update that is no longer the case :( Kernel: 5.15.0-40 Kubuntu 22.04 nvidia-driver-510

NBoumakis commented 2 years ago

For some reason it stopped working after my latest update. So, I said Bluetooth worked after hibernation but after my latest update that is no longer the case :( Kernel: 5.15.0-40 Kubuntu 22.04 nvidia-driver-510

No idea what is the case here, my kernel just got updated to 5.15.50-1-MANJARO, everything works the same as before (i.e. only after hibernation). Someone told me there could be some problem in the way the driver initializes registers in the device.

jurgen-74 commented 1 year ago

Whatta you know! I've updated to Kubuntu 22.10 and now Bluetooth is back after restoring from hibernation. I can still not use it normally. No devices detected. But after hibernation the modules seems to load.

rafetefe commented 1 year ago

Thanks for sharing. Finally got a way to use bt in linux

jurgen-74 commented 1 year ago

Thanks for sharing. Finally got a way to use bt in linux

Good to hear! I only wish that I could use bt with having to hibernate first. It is a weird problem.

NBoumakis commented 1 year ago

So, I went through the logs and it seems that hibernation resets the USB devices or something similar. It was a few days ago so I will have to check again to be sure. Perhaps we can cause this manually through xhci_hcd, as a workaround?

jurgen-74 commented 1 year ago

Whatta you know! I have updated my Kubuntu 22.10 to 23.04 with kernel 6.2.0-20. Now the Bluetooth is just working without any hacks.