-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Issue #1289 ds4|5 disconnect #1484
base: main
Are you sure you want to change the base?
Conversation
…ding Systemd service This is a workaround for ublue-os#1289 and should be removed if there comes a native solution from ValveSoftware/steam-for-linux#8678 - Added `bazzite-bluetooth-ds4-ds5-workaround` script to monitor PS4 and PS5 controllers - Script checks for connected gamepads, extracts their MAC addresses, and starts a monitoring process - The monitoring process listens for specific button combinations (Home + Triangle) to disconnect the gamepad - Includes cleanup functionality to stop monitoring processes for disconnected gamepads - Created Systemd service `bazzite-bluetooth-ds4-ds5-workaround.service` - Service description and dependencies defined in `[Unit]` section - `[Service]` section specifies script execution, restart policy, user, and group - `[Install]` section enables the service to start on boot - Added instructions to load, start, and enable the service - Included commands for reloading Systemd, starting the service, and enabling it on boot - Provided guidance on checking the service status and logs for troubleshooting Author: thekk1 Version: 1.0
Because I messed up the original PR (#1416), I created a new clean one. |
Would suggest checking #1476 to see if is better suited. Not saying that this wouldn't work, but in my opinion is far easier to maintain a python script than an AWK one. |
I choosed this way because of the performance not because of the maintainability. The task to check for the key combo will run all the time in backgroup while a DS4|5 Controller is connected so this is a very important point. udev could might be a good point but I remember that starting an infinite prozess with udev should be a nono!? |
Same here with the python version, the udev rule will will start the service using
It starts a systemd service with Also must ask for the reason of your version running as a user service ( If user service is a must by your rationale, might suggest moving the service to # /usr/lib/systemd/user/bazzite-bluetooth-ds4-ds5-workaround.service
[Unit]
Description=Disconnect DS4 and DS5 controller on shortcut HOME + triangle
After=bluetooth.target
ConditionFileIsExecutable=/usr/libexec/bazzite-bluetooth-ds4-ds5-workaround
ConditionUser=!@system And change the [Install]
WantedBy=default.target |
Add script to monitor and disconnect Bluetooth gamepads and corresponding Systemd service.
This is a workaround for #1289 and should be removed if there comes a native solution from
ValveSoftware/steam-for-linux#8678