[PR #98] [MERGED] [Linux] Improve connection stability #283

Closed
opened 2026-03-02 12:40:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kavishdevar/librepods/pull/98
Author: @tim-gromeyer
Created: 4/16/2025
Status: Merged
Merged: 4/17/2025
Merged by: @tim-gromeyer

Base: mainHead: linux-disconnect-behaviour


📝 Commits (1)

  • abfbe5e [Linux] Improve connection stability

📊 Changes

4 files changed (+204 additions, -150 deletions)

View changed files

📝 linux/BluetoothMonitor.cpp (+99 -31)
📝 linux/BluetoothMonitor.h (+10 -2)
📝 linux/Main.qml (+1 -0)
📝 linux/main.cpp (+94 -117)

📄 Description

For me the old method with QBluetoothDeviceDiscoveryAgent the connecting was pretty unstable.
It was disconnecting after a short amount of time, always. Since we already rely on BlueZ (only supported backend in Qt for Linux), I use the bluez dbus api to check for connected/disconnected devices.

Our Qt code than only connects to the service, not the device itself.

With this change I noticed a improvement in the time it takes for the app to connect to the airpods.

It's a pretty big change, and I wanna know what you think about it (@kavishdevar). I only noticed improvements.

Upsides I know of:

  • Improved connection speed
  • Improved connection reliability
  • Reduced resource usage (for my debug build, CPU usage not even measurable, RAM 102.4 MiB)

Possible downsides:

  • App doesn't auto-connect to airpods (since the system decides it). We could implement it

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kavishdevar/librepods/pull/98 **Author:** [@tim-gromeyer](https://github.com/tim-gromeyer) **Created:** 4/16/2025 **Status:** ✅ Merged **Merged:** 4/17/2025 **Merged by:** [@tim-gromeyer](https://github.com/tim-gromeyer) **Base:** `main` ← **Head:** `linux-disconnect-behaviour` --- ### 📝 Commits (1) - [`abfbe5e`](https://github.com/kavishdevar/librepods/commit/abfbe5e3446e807aec50a24a3308ce0f162e41b2) [Linux] Improve connection stability ### 📊 Changes **4 files changed** (+204 additions, -150 deletions) <details> <summary>View changed files</summary> 📝 `linux/BluetoothMonitor.cpp` (+99 -31) 📝 `linux/BluetoothMonitor.h` (+10 -2) 📝 `linux/Main.qml` (+1 -0) 📝 `linux/main.cpp` (+94 -117) </details> ### 📄 Description For me the old method with QBluetoothDeviceDiscoveryAgent the connecting was pretty unstable. It was disconnecting after a short amount of time, always. Since we already rely on BlueZ (only supported backend in Qt for Linux), I use the bluez dbus api to check for connected/disconnected devices. Our Qt code than only connects to the service, not the device itself. With this change I noticed a improvement in the time it takes for the app to connect to the airpods. It's a pretty big change, and I wanna know what you think about it (@kavishdevar). I only noticed improvements. Upsides I know of: - Improved connection speed - Improved connection reliability - Reduced resource usage (for my debug build, CPU usage not even measurable, RAM 102.4 MiB) Possible downsides: - App doesn't auto-connect to airpods (since the system decides it). We could implement it --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 12:40:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librepods#283
No description provided.