-
-
Save luismisanchez/575baa20558c34434d433cbaad18650d to your computer and use it in GitHub Desktop.
Bluetooth restart after sleep/wake on Ubuntu 24.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Put this on /lib/systemd/system-sleep/bt | |
# chmod +x /lib/systemd/system-sleep/bt | |
case $1 in | |
post) | |
modprobe -r btusb | |
sleep 1 | |
service bluetooth restart | |
sleep 1 | |
modprobe btusb | |
sleep 1 | |
systemctl restart systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working on Lenovo ThinkPad E16 Gen 1 (core i7). After sleep Logitech devices (MX series) were detected and apparently connected but didn't work until this fix applied. Source: https://askubuntu.com/a/1146734/1276226