After waking up Zorin 18.1, bluetooth mouse works only after a delay of 20-30 seconds

I have Zorin 18.1 installed on my Lenovo T495 laptop computer. After suspending Zorin, when I wake it back up, it takes 20-30 seconds for the Bluetooth mouse to be recognized and start working. After that, it works fine. However, it is a bit disconcerting to have to sit there and wait for the mouse pointer to operate. Is this something only I experience, or do others experience it? Is there a way to get the mouse recognized immediately? Thank you for any help.

Open a terminal and create a new systemd service file:

sudo nano /etc/systemd/system-sleep/bluetooth-reset.sh

Paste this content:

case $1 in
  post)
    systemctl restart bluetooth
    ;;
esac

Save (Ctrl+O, Enter, Ctrl+X), then make it executable:

sudo chmod +x /etc/systemd/system-sleep/bluetooth-reset.sh

Reload systemd:

sudo systemctl daemon-reload

This forces bluetooth restart right after waking, which can speeds up reconnection.

2 Likes

Thank you.

If @Nourpon 's post fixed the problem, can you please mark their post as :white_check_mark: Solution.