Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Hi, after installing ChimeraOS, I was unable to connect my Xbox Series controller until I navigated to the bluetooth settings. It was very similar to this issue
Investigation
After searching the cause of this problem, it seems that a Bluetooth scan was triggered while navigating to the Gnome Bluetooth Settings, and disabled when leaving that page.
Later, I was able to reconnect my controller by using the command
bluetoothctl -t -1 scan on
without navigating to the bluetooth settingsSolution
This PR add a simple systemd service that periodically scan for previously connected Bluetooth devices
I am now able to automatically reconnect my controller in the following cases :
Mention
It seems that Bluez allow for periodic scans in the config via
ScanIntervalAutoConnect
&ScanWindowAutoConnect
parameters (link).This could be a way cleaner solution, but I was unable to make them work.
Hardware & Software
Note
This is my first PR for Chimera so I may not have respected some design & architectural choice