diff mbox

hid-logitech-dj: 046d:c52b Problems using Logitech Unifying Receiver

Message ID 51193A0E.80306@gmail.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Benjamin Tissoires Feb. 11, 2013, 6:35 p.m. UTC
Hi Bob,

adding in CC Jiri, the HID maintainer and Nestor, the author of hid-logitech-dj.

First, thanks for putting this upstream. After ~130 comments on the two bugs, you are the first to report it on the proper mailing list.

On Sun, Feb 10, 2013 at 10:18 PM, Bob Bowles <bobjohnbowles@gmail.com> wrote:
> bob@bobDell:/$ # Launchpad Short Description:
> 046d:c52b Problems using Logitech Unifying Receiver
>
>
> bob@bobDell:/$ # Launchpad Long Description:
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1072082
>
> Commit that caused the regression 534a7b8e10ec55d9f521e68c20dbb3634c25b98a.
>
> I recently purchased a new Logitech K350 keyboard (UK layout) and M505
> mouse, both of which use the Logitech Unifying Receiver. I 'paired' the
> keyboard and mouse to the receiver by using the proprietary Logitech
> 'Setpoint' software on a friend's computer running Windows XP. On their
> computer, the receiver, keyboard and mouse worked perfectly.
>
> I then moved the receiver to my own computer, a new Dell Inspiron 7520 SE
> running under Ubuntu 12.04.1. I tried with no success to get the keyboard
> and mouse to work by repeatedly unplugging and re-plugging the receiver, and
> by re-booting the machine.

According to Nestor, there are some known problems with 2.4GHz receivers and USB3.
Intel even posted a document explaining those problems:

http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb3-frequency-interference-paper.html

So the problem either comes from a bad firmware (which I doubt) or from those interferences, leading to a hardware failure.

>
> I experimented with solutions posted on the web, in particular in this
> thread on Ask Ubuntu
> (http://askubuntu.com/questions/128345/logitech-m515-does-not-work-after-upgrade-to-12-04/202627#202627).
> The accepted answer did not solve my problem.
>
> WORKAROUND:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1072082/+attachment/3415472/+files/mousefix
> running this workaround script on the command line enabled the receiver. I
> added the script to crontab as suggested. The script does not cause the
> receiver to work after a reboot, but I found that a single unplug/replug
> cycle was now sufficient to restore operation of the keyboard and mouse.

If your workaround "works", then we can maybe try something on the hid-logitech-dj module to force re-probing devices in case of a USB3 failure.
Could you please test the patch at the end of this file?


>
> Potential duplicate of
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1039143 .

This bugs was filled last August, and no one reported it upstream... I was starting getting angry, but I had a quick look at the kernel's bugzilla, and I noticed that the same kind of bug was filled last October:
https://bugzilla.kernel.org/show_bug.cgi?id=49781

Anyway, here is the patch:


From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Date: Mon, 11 Feb 2013 19:26:24 +0100
Subject: [PATCH] HID: logitech-dj: do not leave in case of -EPIPE during probe()

USB3 introduced a lot of interferences with 2.4GHz receivers [1].
This fix aims at considering error -EPIPE as non fatal, so that
if further notifications comes if the interferences are less problematic,
the receiver will still query the associated devices.

[1] http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb3-frequency-interference-paper.html

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
---
 drivers/hid/hid-logitech-dj.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Comments

Benjamin Tissoires Feb. 12, 2013, 2:28 p.m. UTC | #1
On Tue, Feb 12, 2013 at 11:22 AM, Bob Bowles <bobjohnbowles@gmail.com> wrote:
> Hi Benjamin
>
> Thanks for getting back to me. So far I have been doing upstream tests on
> published .deb packages
> (http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.8-rc6-raring/), so I
> cannot  atm apply the patch to a source. Do you have a url for the source?

here you go: https://github.com/bentiss/hid-logitech-dj
I pulled the latest up to date module, so I don't know if it's gonna
work out of the box on your kernel.

$ git clone https://github.com/bentiss/hid-logitech-dj.git
$ cd hid-logitech-dj
$ make

Remove your cron workaround.

$ sudo rmmod hid-logitech-dj && sudo insmod ./hid-logitech-dj.ko

Then look at the dmesg output and try to move your mouse.

If the module does not load, simply run:
$ sudo modprobe hid-logitech-dj

This will reload your module shipped by your distribution. And don't
forget to tell me if it did not worked (with the dmesg output).

>
> Please also see other comments below.
>
> Regards   Bob Bowles
>
>
> On 11/02/13 18:35, Benjamin Tissoires wrote:
>
> Hi Bob,
>
> adding in CC Jiri, the HID maintainer and Nestor, the author of
> hid-logitech-dj.
>
> First, thanks for putting this upstream. After ~130 comments on the two
> bugs, you are the first to report it on the proper mailing list.
>
> In spite of the work on the Launchpad bugs I think it has only recently been
> triaged as an upstream issue. I filed it upstream on the advice of one of
> the Launchpad guys, only after conducting the tests he requested in the bug
> thread. We recognize you have a lot of stuff to do, and don't want to bug
> (sic) you with non-relevant issues.

Yeah, I saw that you have been asked to fill it upstream recently. I
don't think it was your fault, but this bug is staying in various
distributions bugzillas since a while, so there has been a problem
somewhere.
This kind of problem has been diagnosed upstream since a long time
(not in your bug thread) and no one reported it correctly. Our job is
also to fix problems, thus, we should have been noticed earlier.

>
>
> According to Nestor, there are some known problems with 2.4GHz receivers and
> USB3.
> Intel even posted a document explaining those problems:
>
> http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb3-frequency-interference-paper.html
>
> So the problem either comes from a bad firmware (which I doubt) or from
> those interferences, leading to a hardware failure.
>
> Interesting further information that may (or may not) be relevant:
> I tried out using a 2m usb cable to distance the receiver from any
> interference. This had no noticeable effect on the tests.

Did you tried with a USB2 hub? It worked here:
https://bugzilla.redhat.com/show_bug.cgi?id=840391

Cheers,
Benjamin
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 3cf62be..174fcf8 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -804,9 +804,16 @@  static int logi_dj_probe(struct hid_device *hdev,
 
 	retval = logi_dj_recv_query_paired_devices(djrcv_dev);
 	if (retval < 0) {
-		dev_err(&hdev->dev, "%s:logi_dj_recv_query_paired_devices "
-			"error:%d\n", __func__, retval);
-		goto logi_dj_recv_query_paired_devices_failed;
+		if (retval != -EPIPE) {
+			dev_err(&hdev->dev, "%s:"
+				"logi_dj_recv_query_paired_devices "
+				"error:%d\n", __func__, retval);
+			goto logi_dj_recv_query_paired_devices_failed;
+		}
+		dev_err(&hdev->dev, "%s: pipe stalled when probing for "
+			"associated devices, registering them later\n",
+			__func__);
+		retval = 0;
 	}
 
 	return retval;