Skip to content
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

feat: Add script to disconnect dualshock/sense with HOME + TRIANGLE #1476

Closed
wants to merge 34 commits into from

Conversation

Zeglius
Copy link
Contributor

@Zeglius Zeglius commented Aug 8, 2024

thekk1 and others added 25 commits July 28, 2024 06:35
…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
…kages, fixes python errors when layering some packages."

This reverts commit 5ec9e55.
Add device handling with device mac address as argument
This way, bazziye-bluetooth-ds4-ds5-workaround wont use exit code 1
whenever we dont receive MAC address of the controller
@Zeglius Zeglius changed the base branch from main to testing August 8, 2024 14:59
@Zeglius Zeglius changed the base branch from testing to main August 10, 2024 19:54
@Zeglius Zeglius marked this pull request as ready for review August 11, 2024 12:28
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Aug 11, 2024
@Zeglius
Copy link
Contributor Author

Zeglius commented Aug 11, 2024

NOTE: This PR enters in conflict with #1484. Apply one or other.

Copy link
Member

@HikariKnight HikariKnight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having thought long and hard about this i think this one will be the easiest one to maintain

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 21, 2024
@Zeglius
Copy link
Contributor Author

Zeglius commented Oct 7, 2024

Forgot this PR existed 😅. Will have to do a rewrite sadly, given:

  1. Workaround spans 3 files, too many:

    • script that tracks button press.
    • udev rule that detects DualShock/sense connected, then starts scripts passing it's MAC address as argument.
    • empty udev rule that nullifies the previous one.
  2. Lack of reactivation mechanism
    This is due the udev rule that starts the script only triggers once per session, requiring the script to keep running all the time, even when no DualShock/sense is not connected anymore.

  3. Script is poorly written

@Zeglius Zeglius closed this Oct 7, 2024
auto-merge was automatically disabled October 7, 2024 13:22

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants