You are not logged in.

#1 2022-06-21 06:48:43

balthamaisteri
Member
Registered: 2014-09-02
Posts: 20

Bluetooth keyboard doesn't connect after suspend.

This has started happening after updating to kernel 5.18.

When waking up from suspend my keychron keyboard doesn't connect via bluetooth, i need to plug it in with USB, login and restart bluetooth service to get it connected again.

I am using MX Master 2s at the same time, and it still does work the same.

thanks.

Offline

#2 2022-06-29 01:53:54

featherfurl
Member
Registered: 2022-06-29
Posts: 1

Re: Bluetooth keyboard doesn't connect after suspend.

Following the bluetooth related steps on This Guide solved the issue for me.

Offline

#3 2022-06-29 06:20:01

balthamaisteri
Member
Registered: 2014-09-02
Posts: 20

Re: Bluetooth keyboard doesn't connect after suspend.

Thanks.

I just created service that restarts bluetooth after wakeup. But this one seems way more elegant way to do it.

Offline

#4 2022-06-29 08:06:01

JoeyCorleone
Member
Registered: 2022-01-22
Posts: 88

Re: Bluetooth keyboard doesn't connect after suspend.

Glad you found a way to solve your problem.

Nevertheless, this seems to be a kernel regression if it worked consistently on previous kernels. If you want to invest some time in digging up the root cause of this, try debugging the kernel which consists of:
- installing linux-mainline to see if the issue is already fixed (easy)
- bisecting the kernel to find the commit causing the issue (difficult)
- reporting the issue to the kernel bug tracker (easy, but should be done after identifying the offending commit).

Offline

#5 2022-06-29 18:25:04

balthamaisteri
Member
Registered: 2014-09-02
Posts: 20

Re: Bluetooth keyboard doesn't connect after suspend.

JoeyCorleone wrote:

Glad you found a way to solve your problem.

Nevertheless, this seems to be a kernel regression if it worked consistently on previous kernels. If you want to invest some time in digging up the root cause of this, try debugging the kernel which consists of:
- installing linux-mainline to see if the issue is already fixed (easy)
- bisecting the kernel to find the commit causing the issue (difficult)
- reporting the issue to the kernel bug tracker (easy, but should be done after identifying the offending commit).

It truly seems to be a (kernel) regression. I will wait a while and see if it will be fixed in later versions. I am running arch linux on 3 machines, and only my main pc is affected by this.

Offline

#6 2022-07-02 11:28:54

jiesamb
Member
Registered: 2022-05-12
Posts: 5

Re: Bluetooth keyboard doesn't connect after suspend.

I have the same problem on my laptop. But it seems that it only happens in gnome.

When using KDE plasma, my mouse and keyboard can reconnect to my laptop without any problem after resume from suspend.

I've tried fedora 36 gnome and it has the same problem.

It seems strange, but after login from suspend, the gnome control center says the bluetooth is running and is searching and listing the new devices. But my mouse and keyboard cannot reconnect automatically...

Does anyone have any idea of this?

Offline

#7 2022-07-02 11:59:21

zonotope
Member
Registered: 2018-07-30
Posts: 8

Re: Bluetooth keyboard doesn't connect after suspend.

balthamaisteri wrote:
JoeyCorleone wrote:

Glad you found a way to solve your problem.

Nevertheless, this seems to be a kernel regression if it worked consistently on previous kernels. If you want to invest some time in digging up the root cause of this, try debugging the kernel which consists of:
- installing linux-mainline to see if the issue is already fixed (easy)
- bisecting the kernel to find the commit causing the issue (difficult)
- reporting the issue to the kernel bug tracker (easy, but should be done after identifying the offending commit).

It truly seems to be a (kernel) regression. I will wait a while and see if it will be fixed in later versions. I am running arch linux on 3 machines, and only my main pc is affected by this.

Yes, it's a regression. My bluetooth devices have reconnected automatically after suspend for years. I think it's related to this issue about bluetooth cancelling suspend. I think that problem has been fixed in recent 5.18 kernels, but just after suspend was fixed for me, I noticed that neither my bluetooth mouse or keyboard auto connected after suspend. I have to open the bluetooth manager and reconnect each device by hand.

Offline

#8 2022-07-02 15:05:03

jehf
Member
Registered: 2022-07-02
Posts: 1

Re: Bluetooth keyboard doesn't connect after suspend.

Hi,

Same issue here, with a laptop Lenovo Thinkpad L15 Gen 2a running Gnome, a bluetooth/wifi adapter MEDIATEK MT7921 and a bluetooth mouse, which is not reconnected after suspend.
I've checked with the bluetoothctl command and the device seems ok, the controller is powered, but just have to explicitly reconnect the device, either thru bluetoothctl or gnome bluetooth manager.

$ bluetoothctl
Agent registered
[CHG] Controller F8:89:D2:C8:B7:B6 Pairable: yes
[bluetooth]# devices
Device DE:E5:76:87:B2:BA BluetoothMouse3600

[bluetooth]# info DE:E5:76:87:B2:BA
Device DE:E5:76:87:B2:BA (random)
    Name: BluetoothMouse3600
    Alias: BluetoothMouse3600
    Appearance: 0x03c2
    Icon: input-mouse
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: no
    WakeAllowed: no
    LegacyPairing: no
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
    UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
    UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v045Ep0916d0100

[bluetooth]# connect DE:E5:76:87:B2:BA
Attempting to connect to DE:E5:76:87:B2:BA
[CHG] Device DE:E5:76:87:B2:BA Connected: yes
Connection successful
[CHG] Device DE:E5:76:87:B2:BA ServicesResolved: yes

Also I've checked that AutoEnable is true in /etc/bluetooth/main.conf.

Right now, it appears to work by using arch LTS kernel. Also, by playing with the bios configuration, especially the sleep states, it seems to work for me:
some time ago, in Lenovo bios, I've switched parameter "sleep state" from "linux" to "window 10", because of some resume issues due to the MT7921 chip. I believe that in this configuration, the windows sleep style (S2idle) is used instead of the legacy sleep states S0, ..., S3. After falling back to the "linux" value, it now works.   

You can check if you're using S2Idle or S3 states by inspecting journalctl:

sudo journalctl -b -k -g s2idle
juil. 02 16:10:49 goupil kernel: PM: suspend entry (s2idle)

vs

sudo journalctl -b -k -g S3
juil. 02 16:19:55 goupil kernel: ACPI: PM: (supports S0 S3 S4 S5)
juil. 02 16:21:14 goupil kernel: ACPI: PM: Preparing to enter system sleep state S3
juil. 02 16:21:14 goupil kernel: ACPI: PM: Waking up from system sleep state S3

Last edited by jehf (2022-07-02 15:06:56)

Offline

#9 2022-08-14 08:49:51

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: Bluetooth keyboard doesn't connect after suspend.

This is still a problem in 5.19.1.

Any known solutions than having to do thing manually?

Offline

#10 2022-08-15 22:10:28

DrIgnatioMobius
Member
Registered: 2020-09-10
Posts: 7

Re: Bluetooth keyboard doesn't connect after suspend.

This kernel patch fixes the issue, hopefully it will get upstreamed soon.

https://git.kernel.org/pub/scm/linux/ke … 234e259d56

Offline

#11 2022-08-18 18:35:44

DrIgnatioMobius
Member
Registered: 2020-09-10
Posts: 7

Re: Bluetooth keyboard doesn't connect after suspend.

Looks like this has been patched in kernel 5.19.2 smile

Offline

#12 2022-08-19 07:58:05

hematinik
Member
Registered: 2022-03-23
Posts: 34

Re: Bluetooth keyboard doesn't connect after suspend.

do you have similar symptoms as mine? https://bbs.archlinux.org/viewtopic.php?id=278996

Offline

Board footer

Powered by FluxBB