Bluetooth keyboard not working after going into "sleep" mode

I've had problems with my keyboard bugging out before, but I did a fresh reinstall of zorin a while back and now my problems are different, but similar. Here are some behaviors I've noticed:

  1. Bluetooth automatically gets enabled on boot. However, my keyboard has to be off and then turned on after boot in order to work. If, for example, my keyboard was already on before my laptop/bluetooth turned on, it wouldn't work.

  2. Keyboard stops working when it goes into timeout/sleep mode. If I press a key to "wake it up", the keyboard's light indicator blinks to signify that it did "wake up", but it still doesn't work. When this happens, I have tried the following:

  3. Turning the keyboard off, then on again. Leads to "failed to reconnect: input/output error" on blueman.

  4. Turning bluetooth and keyboard off, then turning bluetooth on, then turning keyboard on. Like recreating what I know works during boot. This usually works. However,

  5. I've noticed recently that if I leave my laptop idle, as in both bluetooth and keyboard are on for a long time, the fix in #4 doesn't work. I get the "failed to reconnect: resource not ready" error. In this case I'm forced to reboot the whole thing once or twice to fix it.

Any suggestions?

Some info:
My keyboard is this offbrand, mini folding thing I bought online with a built-in touch pad. I don't think that's an issue though, because it worked perfectly on this laptop when I was on Windows 11.

uname -a

Linux kal-VivoBook 5.15.0-67-generic #74~20.04.1-Ubuntu SMP Wed Feb 22 14:52:34 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

sudo lshw -C network

*-network
description: Wireless interface
product: RTL8821CE 802.11ac PCIe Wireless Network Adapter
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: wlp1s0
version: 00
serial: d8:c0:a6:34:ff:27
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rtw_8821ce driverversion=5.15.0-67-generic firmware=N/A ip=192.168.254.110 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:73 ioport:f000(size=256) memory:fea00000-fea0ffff

At any point, did you disable powersave on bluetooth?

1 Like

Nope, it's still set to like 30 minutes now that I checked. I kind of was hoping to keep the sleep function.

1 Like

Gday @kal , Are you using a usb bluetooth receiver for the external keyboard?.

If so please show the results for this:

grep . /sys/bus/usb/devices/*/power/wakeup

3 Likes

Powersave and sleep function are not the same, nor dependent on each other.
But the system may powerdown the wireless in order to conserve power during sleep.
What is the output of

cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

2 Likes

I am not, but just in case?

grep . /sys/bus/usb/devices/*/power/wakeup

/sys/bus/usb/devices/1-2/power/wakeup:enabled
/sys/bus/usb/devices/3-2/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled

1 Like

Oh, gotcha.

cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

[connection]
wifi.powersave = 3

1 Like

Changing this to

[connection]
wifi.powersave = 2

will disable powersave from inhibiting radio.

4 Likes

Thank you very much! Things are working the way they should now.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.