I have a script that resets bluetooth every hour. I have a bunch of devices being read on bluetooth (3 1kwh+ batteries with connections and 10+ environmental sensors) and it gets screwed up at about an hour and stops working.
The original script worked until I got more devices and just had the top and bottom power off/power on parts. And the 5 identical rmmods are because some modules depend on others and I did not want to sort out what depends on what and I wanted to get them all removed so I could reload. Basically this reboots/resets the bluetooth modules/hardware and makes mine work again. My graphical environment is running during this time and this causes no issues. It has to be run as root. I call it restart_bluetooth.sh and it will give you a bunch of rmmod error messages, the messages are there because of my shotgun approach to removing the modules. # turn off bluetooth /usr/bin/bluetoothctl power off # remove all of the modules rmmod btrtl btintel btbcm btusb rfcomm sleep 1 rmmod btrtl btintel btbcm btusb rfcomm sleep 1 rmmod btrtl btintel btbcm btusb rfcomm sleep 1 rmmod btrtl btintel btbcm btusb rfcomm rmmod btrtl btintel btbcm btusb rfcomm sleep 1 # put the modules back modprobe btintel modprobe btbcm modprobe btusb modprobe rfcomm sleep 1 # turn it back on /usr/bin/bluetoothctl power on On Sun, Mar 15, 2026 at 5:49 AM Patrick O'Callaghan <[email protected]> wrote: > > My trusty Logitech mouse died after 10 years of use and I replaced it > with an HP 480 Comfort mouse, this time on Bluetooth (the Logitech had > used a dongle so I was keen to recover a USB port). Generally the HP > works fine, but unfortunately it has a built-in sleep timer which is > not accessible. > > This doesn't usually cause any problems, though it takes a second or > two to wake up, but occasionally after doing so Fedora doesn't see it. > Running bluetoothctl shows: > > Device FA:55:76:E0:6D:11 (random) > Name: HP 480 Comfort Bluetooth Mouse > Alias: HP 480 Comfort Bluetooth Mouse > Appearance: 0x03c2 (962) > Icon: input-mouse > Paired: yes > Bonded: yes > Trusted: yes > Blocked: no > Connected: yes > WakeAllowed: yes > LegacyPairing: no > CablePairing: no > > i.e. Fedora thinks it's connected, but doesn't react to it. If I > disconnect and reconnect from the command line, I get: > > Attempting to connect to FA:55:76:E0:6D:11 > [CHG] Controller 00:1A:7D:DA:71:13 Discovering: no > [CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes > Failed to connect: org.bluez.Error.Failed le-connection-abort-by-local > > Power-cycling the mouse makes no difference. The only way I've found to > get it back is by rebooting. Logging out doesn't do the trick. > > Thoughts? > > poc > > -- > _______________________________________________ > users mailing list -- [email protected] > To unsubscribe send an email to [email protected] > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/[email protected] > Do not reply to spam, report it: > https://forge.fedoraproject.org/infra/tickets/issues/new -- _______________________________________________ users mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
