Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827706 - net-wireless/bluez-5.62-r1: wireless mouse fails to automatically connect on first try
Summary: net-wireless/bluez-5.62-r1: wireless mouse fails to automatically connect on ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on: 828018
Blocks:
  Show dependency tree
 
Reported: 2021-11-28 02:16 UTC by FlyingWaffle
Modified: 2022-03-26 19:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to revert the commit that caused this issue (bluez-5.62-revert-broken-commit.patch,4.29 KB, patch)
2021-11-28 02:17 UTC, FlyingWaffle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description FlyingWaffle 2021-11-28 02:16:19 UTC
Bug as described in this Reddit post, pretty much exactly: https://old.reddit.com/r/linuxquestions/comments/qcb9cl/bluez_562_fails_to_connect_mouse_on_first_try/

Patch to temporarily resolve issue (by reverting the suspect commit) is attached.

Reproducible: Always

Steps to Reproduce:
1. Have existing paired logitech bluetooth mouse
2. Boot or attempt to connect
3. first connection will fail, but disconnecting and reattempting succeeds
Actual Results:  
mouse fails to connect via bluetooth; journalctl shows
profiles/input/hog-lib.c:set_report_cb() Error setting Report value: Unexpected error code

Expected Results:  
mouse connects on first attempt
Comment 1 FlyingWaffle 2021-11-28 02:17:08 UTC
Created attachment 756774 [details, diff]
patch to revert the commit that caused this issue
Comment 2 Mike Gilbert gentoo-dev 2021-11-28 20:50:25 UTC
The relevant commit.

https://github.com/bluez/bluez/commit/ac2c2e10b3adb432a572b618c6f53cabb6b3c80b
Comment 3 Mike Gilbert gentoo-dev 2021-11-28 20:51:15 UTC
I would suggest reporting this issue upstream.
Comment 4 FlyingWaffle 2021-11-29 13:09:42 UTC
(In reply to Mike Gilbert from comment #3)
> I would suggest reporting this issue upstream.

Someone else has already done so, here is the link: https://github.com/bluez/bluez/issues/220
Comment 5 wbrana 2021-11-30 16:51:08 UTC
First occurrence in log: November 21 when Bluetooth mouse was connected after long time
Comment 6 wbrana 2021-11-30 16:52:03 UTC
(In reply to wbrana from comment #5)
> First occurrence in log: November 21 when Bluetooth mouse was connected
> after long time
ignore, wrong bug
Comment 7 Larry the Git Cow gentoo-dev 2021-12-02 13:31:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c56c92516c1f7faa80cf76c5df2938edf50b538f

commit c56c92516c1f7faa80cf76c5df2938edf50b538f
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2021-12-02 13:31:03 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2021-12-02 13:31:03 +0000

    net-wireless/bluez: Important bugfixes
    
    This solves disconnecting due to GattCharacteristic1.MTU and reverts a
    commit introducing a regression when connecting some mouse models
    
    Bug: https://bugs.gentoo.org/827706
    Bug: https://bugs.gentoo.org/827911
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 net-wireless/bluez/bluez-5.62-r3.ebuild            | 294 +++++++++++++++++++++
 ...1-Revert-attrib-Make-use-of-bt_att_resend.patch | 188 +++++++++++++
 .../bluez/files/bluez-5.62-fix-disconnecting.patch |  54 ++++
 3 files changed, 536 insertions(+)
Comment 8 Pacho Ramos gentoo-dev 2021-12-02 13:33:36 UTC
please retry with latest revision
Comment 9 FlyingWaffle 2021-12-03 22:18:43 UTC
Yep, r3 is functioning as expected.
Comment 10 Florian Schmaus gentoo-dev 2021-12-15 07:40:06 UTC
I can also confirm that with bluez-5.62-r3 my MX Master 3 mouse is not automatically connected, as it should be, after every boot. With -r2 I had to
1. systemctl restart bluetooth
2. power-cycle the *mouse*
after each graphical login to make the mouse work.
Note that I had to re-pair the mouse to have this effect.
Comment 11 Pacho Ramos gentoo-dev 2021-12-16 08:22:45 UTC
It is better that you comment that in upstream report:
https://github.com/bluez/bluez/issues/220

For now we cannot do much more than reverting the offending change... I wonder if maybe you issue is a bit different... 

I will track upstream bug anyway :/
Comment 12 Larry the Git Cow gentoo-dev 2022-01-09 19:52:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1880ed05a890b2029d038e33eac7f021de787f6

commit e1880ed05a890b2029d038e33eac7f021de787f6
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2022-01-09 19:52:32 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2022-01-09 19:52:32 +0000

    net-wireless/bluez: Bump to 5.63
    
    Also try a less invasive fix for bug #827706. Skip for now test-hog as it
    fails (#829091) with all the fixes for previous bug.
    
    More kernel config options are needed to run the tests.
    
    Also fix building with musl
    
    Closes: https://bugs.gentoo.org/829091
    Thanks-to: Paolo Pedroni
    Bug: https://bugs.gentoo.org/827706
    Thanks-to: Florian Schmaus
    Closes: https://bugs.gentoo.org/812797
    Thanks-to: Jory A. Pratt
    Closes: https://bugs.gentoo.org/827825
    Thanks-to: Agostino Sarubbo
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 net-wireless/bluez/Manifest                        |   1 +
 net-wireless/bluez/bluez-5.63.ebuild               | 302 +++++++++++++++++++++
 .../bluez/files/bluez-5.63-musl-limits.patch       |  24 ++
 .../files/bluez-5.63-use-queue_push_tail.patch     |  27 ++
 4 files changed, 354 insertions(+)
Comment 13 Larry the Git Cow gentoo-dev 2022-01-16 09:38:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=277ef13c7bb383657ee4628b45a37b62f66eb20e

commit 277ef13c7bb383657ee4628b45a37b62f66eb20e
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2022-01-16 09:37:57 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2022-01-16 09:38:06 +0000

    net-wireless/bluez: Sync with upstream fixes
    
    For bug #827706
    
    Bug: https://bugs.gentoo.org/827706
    Bug: https://bugs.gentoo.org/829091
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 net-wireless/bluez/bluez-5.63-r1.ebuild            | 295 +++++++++++
 ...hog-Fix-read-order-of-attributes-rediffed.patch | 542 +++++++++++++++++++++
 ...while-uhid-device-has-not-been-c-rediffed.patch |  90 ++++
 3 files changed, 927 insertions(+)
Comment 14 Florian Schmaus gentoo-dev 2022-01-21 13:27:34 UTC
I hate to be that guy, but my Logitech MX Master 3 mouse still doesn't connection automatically, despite running net-wireless/bluez-5.63-r1. I've already reported this upstream as https://github.com/bluez/bluez/issues/275. Could someone please confirm that bluez-5.63-r1 fixes the issue, of confirm my observation?
Comment 15 Larry the Git Cow gentoo-dev 2022-03-26 19:24:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa6fc98d5349d89969b3d4707e0884cd71652964

commit aa6fc98d5349d89969b3d4707e0884cd71652964
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2022-03-26 19:23:39 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2022-03-26 19:24:43 +0000

    net-wireless/bluez: Bump to 5.64
    
    Closes: https://bugs.gentoo.org/835627
    Closes: https://bugs.gentoo.org/827706
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 net-wireless/bluez/Manifest          |   1 +
 net-wireless/bluez/bluez-5.64.ebuild | 291 +++++++++++++++++++++++++++++++++++
 2 files changed, 292 insertions(+)