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

bluez-5.77 broke logiops #468

Open
domryba opened this issue Jul 13, 2024 · 22 comments
Open

bluez-5.77 broke logiops #468

domryba opened this issue Jul 13, 2024 · 22 comments

Comments

@domryba
Copy link

domryba commented Jul 13, 2024

Hello, after update bluez to version 5.77 logiops works well, only after a fresh system boot.
But when I, eg resume my machine from sleep, or simply reconnect my mouse, logiops stops working, and I got this:

[DEBUG] Failed to add device /dev/hidraw4 on try 1, backing off for 500ms
[DEBUG] Failed to add device /dev/hidraw4 on try 2, backing off for 1000ms
[DEBUG] Failed to add device /dev/hidraw4 on try 3, backing off for 2000ms
[DEBUG] Failed to add device /dev/hidraw4 on try 4, backing off for 4000ms
[DEBUG] Failed to add device /dev/hidraw4 on try 5, backing off for 8000ms
[WARN] Failed to add device /dev/hidraw4 after 5 tries. Treating as failure.

Everything works pretty good, when I downgrade bluez to 5.76.

  • Arch Linux,
  • MX Master 3S via bluetooth.

EDIT: After woke up, when I restart bluetooth.service logiops works correctly.

@c-kr
Copy link

c-kr commented Jul 14, 2024

Can confirm. Same problem here with MX Master 3S on Arch with bluez 5.77. Downgrading to 5.76 resolved the issue.

@im-calvin
Copy link

+1 can confirm that downgrading to 5.76 resolved the issue. I'm on Arch so I followed these instructions: https://wiki.archlinux.org/title/Downgrading_packages

@MrTomRod
Copy link

MrTomRod commented Jul 16, 2024

On my system (Fedora 40, GNOME), logid has to be restarted whenever I log in. With bluez 5.77, the driver stops working if I lock my screen. Then, even restarting the service does not help:

$ journalctl -f -u logid.service
logid[19347]: [WARN] Failed to add device /dev/hidraw7 after 5 tries. Treating as failure.

Downgrading bluez-5.77-1.fc40 to bluez-5.73-3.fc40 helped, but I still have to restart the service after login.

Happy to help debugging the issue!

#Edit: Fedora only has logiops-0.3.3-4 in its repos. I compiled logiops from source (0.3.4, commit 237fa5f) and the problem persists. logid --verbose debug didn't show anything useful.

@rogsme
Copy link

rogsme commented Jul 18, 2024

I'm having this same issue, can confirm that sudo systemctl restart bluetooth.service makes logiops work again.

@lazarosgogos
Copy link

On my system (Fedora 40, GNOME), logid has to be restarted whenever I log in. With bluez 5.77, the driver stops working if I lock my screen. Then, even restarting the service does not help:

$ journalctl -f -u logid.service
logid[19347]: [WARN] Failed to add device /dev/hidraw7 after 5 tries. Treating as failure.

Downgrading bluez-5.77-1.fc40 to bluez-5.73-3.fc40 helped, but I still have to restart the service after login.

Happy to help debugging the issue!

#Edit: Fedora only has logiops-0.3.3-4 in its repos. I compiled logiops from source (0.3.4, commit 237fa5f) and the problem persists. logid --verbose debug didn't show anything useful.

Having the exact same issue.
Should anyone have any insights we can look into this together to find a solution :)

I believe it's a combination of the latest bluez updates (I had bluez-5.69 installed and logiops worked flawlessly) and something logiops does in a sequence that doesn't allow it to function properly.

Any ideas welcome. How could we tackle this?

@spoutn1k
Copy link

spoutn1k commented Aug 4, 2024

Have you tried #460 ? It fixed a bunch of people's issues, I'm running the patch and my setup is working as usual after the update to 5.77

@c-kr
Copy link

c-kr commented Aug 4, 2024

Thanks @spoutn1k for your suggestion but isnt this fix only for the bolt receiver and not for bluetooth connected devices?

@MrTomRod
Copy link

MrTomRod commented Aug 4, 2024

@spoutn1k
It also fixes the issue for me! Thanks for the heads up!

@spoutn1k
Copy link

spoutn1k commented Aug 4, 2024

@c-kr: @lazarosgogos mentions it is something in a sequence that is fucky, and this patch changes a sequence of action. Just a shot in the dark !

@c-kr
Copy link

c-kr commented Aug 5, 2024

I tried the patch and it did not help. After the first disconnect/sleep logid is unable to reconnect

@lazarosgogos
Copy link

lazarosgogos commented Aug 5, 2024

@spoutn1k Just like @c-kr , I tried the fix and it did not work either. After disconnecting the device and reconnecting it, a service restart must be issued for the driver to work properly. Thank you for the proposal, however.

I think the solution lies in looking carefully at what changed between bluez-5.69 and bluez-5.73 or -5.77 to try and figure out what messes with HID++ inputs.

@c-kr
Copy link

c-kr commented Aug 5, 2024

bluez 5.76 works fine. If someone has a lot of time one way would be to git-bisect all changes between both versions and find the problematic commit

@dpecos
Copy link

dpecos commented Aug 7, 2024

I can also confirm that downgrading to bluez 5.76 fixes the issue.

@lazarosgogos
Copy link

@dpecos @c-kr Really good to know. What distro are you using?

@dpecos
Copy link

dpecos commented Aug 9, 2024

arch, btw

:-D

@dpecos
Copy link

dpecos commented Aug 19, 2024

Small update on this issue: running last bluez version, and restarting the blueetooth service while having the mouse connected, makes logiops works every time.

My feeling is that the trick is to have the mouse to connect ASAP to the system.

@rizaumami
Copy link

Using Debian Sid and having the [WARN] Failed to add device /dev/hidraw3 after 5 tries. error after bluez updated to 5.77.

Restarting bluetooth service only make it works one time, after that it's back to [WARN] Failed to add device /dev/hidraw3 after 5 tries. error.

Downgrade bluez to previews Bluez (5.66-1) fix the problem.

@Staindk
Copy link

Staindk commented Sep 5, 2024

I have the same issue as others in this thread - my solution was to restart logid and bluetooth via a script that I pinned to my taskbar 🤷 (it mostly works fine)

#!/bin/bash

# for convenience create a .desktop file in usr/share/applications
# with this content:
#
# [Desktop Entry]
# Type=Application
# Name=Mouse Driver Restart
# Icon=/usr/share/icons/Adwaita/symbolic/devices/input-mouse-symbolic.svg
# Exec=gnome-terminal -- bash -c "~/MouseInit.sh"

echo "Restarting logid"
sudo systemctl restart logid

echo "Going to restart bluetooth in 5 sec, CTRL-C now if needed!"
sleep 5

echo "Restarting bluetooth"
sudo systemctl restart bluetooth

sleep 1

@c-kr
Copy link

c-kr commented Sep 17, 2024

Updating to bluez 5.78 solved the issue for me

@lazarosgogos
Copy link

Updating to bluez 5.78 solved the issue for me

Same here. Fedora 40 GNOME 46

@domryba
Copy link
Author

domryba commented Sep 18, 2024

Can confirm – bluez 5.78 works pretty well with logiops.

@Andreag00
Copy link

I'm running Fedora 40 Silverblue with bluez 5.78:

andrea@thinkpad-ag:~$ cat /etc/fedora-release
Fedora release 40 (Forty)
andrea@thinkpad-ag:~$ bluetoothctl --version
bluetoothctl: 5.78 

But still get the error reported in the first post if I don't restart bluetoothctl:

ott 30 22:35:15 thinkpad-ag systemd[1]: Started logid.service - Logitech Configuration Daemon.
ott 30 22:35:39 thinkpad-ag logid[2084]: [WARN] Failed to add device /dev/hidraw7 after 5 tries. Treating as failure.
ott 30 22:35:39 thinkpad-ag logid[2084]: [WARN] Failed to add device /dev/hidraw7 after 5 tries. Treating as failure.
ott 30 22:38:45 thinkpad-ag logid[2084]: [INFO] Device found: MX Vertical Advanced Ergonomic Mouse on /dev/hidraw6:255

Does anyone have the same issue even with bluez 5.78?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests