Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686758 - =sys-kernel/gentoo-sources-4.19.44 - upstream regression - bluetooth devices input/output error
Summary: =sys-kernel/gentoo-sources-4.19.44 - upstream regression - bluetooth devices ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: gentoo-sources-4.19.50
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2019-05-25 20:10 UTC by Fab
Modified: 2019-06-30 06:18 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fab 2019-05-25 20:10:55 UTC
Hi,

Recently I upgraded sys-kernel/gentoo-sources from 4.19.37 to 4.19.44 on several stable systems.

Today I discovered that the Sony DualShock 3 gamepad is unable to connect via bluetooth when running 4.19.44 kernel. It constantly connect/disconnect with input/output errors.
Some other devices (headset) works fine.

After some research I found that it seems to be an upstream bug¹ impacting several devices.

If I reboot on old 4.19.37 kernel, the gamepad works fine.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=203643

Reproducible: Always
Comment 1 Fab 2019-05-27 07:57:23 UTC
This patch¹ applied against gentoo-sources-4.19.44 fixed it for me.

1. https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@holtmann.org/T/#u
Comment 2 josef.95 2019-05-31 21:29:27 UTC
(In reply to Fab from comment #1)
> This patch¹ applied against gentoo-sources-4.19.44 fixed it for me.
> 
> 1.
> https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-
> marcel@holtmann.org/T/#u

Yes, this Patch fixed here gentoo-sources:4.19.47 for a USB
046d:0b04 Logitech, Inc. Logitech BT Mini-Receiver
(for a Logitech diNovo Edge Keyboard)

Thank you
Comment 3 Mike Pagano gentoo-dev 2019-06-10 19:44:15 UTC
Queued for 4.19.50. Thanks for reporting.

commit 7918237fb06dafdefd25924598ff1ea91f6dc34a (HEAD -> 4.19, origin/4.19)
Author: Mike Pagano <mpagano@gentoo.org>
Date:   Mon Jun 10 15:41:47 2019 -0400

    Bluetooth: Check key sizes only when Secure Simple Pairing is enabled.
    
    See bug #686758.
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Comment 4 Mike Pagano gentoo-dev 2019-06-11 14:47:14 UTC
Released in gentoo-sources-4.19.50

commit 904c16d687359930aecda99df450b05dea839997 (HEAD -> master, origin/master, origin/HEAD)
Author: Mike Pagano <mpagano@gentoo.org>
Date:   Tue Jun 11 10:37:16 2019 -0400

    sys-kernel/gentoo-sources: Linux patch 4.19.50 and bluetooth patch
    
    Bluetooth: Check key sizes only when Secure Simple Pairing is enabled.
    See bug #686758.
Comment 5 Robert G. Siebeck 2019-06-11 16:06:04 UTC
This bug is also present in newer versions, e.g. gentoo-sources-5.1.7. It should be fixed there as well.
Comment 6 Fab 2019-06-11 16:19:34 UTC
In fact, if you search on kernel.org all branchs which contains the guilty commit d5bb334a8e171b262e48f378bd2096c0ea458265, you will find that the bug is present in following vanilla-sources versions (thus in corresponding gentoo-sources and later versions) :

>= 5.1.1
>= 5.0.15
>= 4.19.42
>= 4.14.118
>= 4.9.175
>= 4.4.180

I don't know why the fixed patch take so long to hit the main kernel tree. Is this the usual timelapse between patch proposal and integration in kernel development ?
Comment 7 Fab 2019-06-13 10:00:42 UTC
It seems that the original patch which causes the issue will be reverted in all next longterm/stable releases (from 4.4.x to 5.1.x) :

> This reverts commit 38f092c41cebaff589e88cc22686b289a6840559 which is
> commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream.
> 
> Lots of people have reported issues with this patch, and as there does
> not seem to be a fix going into Linus's kernel tree any time soon,
> revert the commit in the stable trees so as to get people's machines
> working properly again.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.19/revert-bluetooth-align-minimum-encryption-key-size-for-le-and-br-edr-connections.patch
Comment 8 Michael 'veremitz' Everitt 2019-06-17 20:38:58 UTC
Do you have the lkml message for this? I notice the git commit has vanished from the upstream repo. Thanks!
Comment 9 Fab 2019-06-18 07:30:55 UTC
(In reply to Michael 'veremitz' Everitt from comment #8)
> Do you have the lkml message for this? I notice the git commit has vanished
> from the upstream repo. Thanks!

Not vanished from the repo, but from the queue.
The revert commit was released into :
> 5.1.10
> 4.19.51 ⁽¹⁾
> 4.14.126

I don't know why it is reverted in some longtem kernels, but not reverted in some others. Very strange.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.19.52&id=8e5483aeae0df86346f975a06c5a381bc4dd97e7
Comment 10 Fab 2019-06-18 07:53:15 UTC
(In reply to Fab from comment #9)
> I don't know why it is reverted in some longtem kernels, but not reverted in
> some others. Very strange.
> 
I found the answer : because the revert patch is not yet released for 4.4.x and 4.9.x branchs. For these branchs the revert patch is still in queue-4.4 and queue-4.9 directories⁽¹⁾. So I guess it will be also be released soon. 

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/
Comment 11 Fab 2019-06-30 06:18:10 UTC
So, to sum up :

The original patch d5bb334a8e171b262e48f378bd2096c0ea458265 which cause the issue was merged into folowing stables/longterms kernels :

>= 5.1.1
>= 5.0.15 (EOL)
>= 4.19.42
>= 4.14.118
>= 4.9.175
>= 4.4.180

Then, it was reverted a few weeks later into :
>= 5.1.10
>= 4.19.51
>= 4.14.126
>= 4.9.183
>= 4.4.183


On the main kernel tree, the original patch was not reverted but an other fix⁽¹⁾ was commited and released into 5.2-rc6. I guess that everything will be backported in stables/longterms trees soon.

1. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.2-rc7&id=693cd8ce3f882524a5d06f7800dd8492411877b3