Skip to contentSkip to conversation

Problem with Acer Bluetooth Optical Rechargeable Mouse

DISCUSSION Lamarque Vieira Souza 2 participants 17 messages Aug 7, 2009 – Jan 4, 2010 HID

lore
Share & tools
lore
#0 lore raw
	Hi,

	As requested by Marcel Holtmann I am sending this e-mail to the linux-input 

mailing list so we can sort out one problem I have with my bluetooth mouse. Since kernel 2.6.28 my bluetooth mouse (0458:0058) makes Xorg cursor to get stucked at upper left corner of the screen. Even if I use the touchpad of my notebook (Acer Ferrari 4005) the cursor still gets trapped at upper left corner. One workaround I have found for this problem is change session type from hid to input in linux/net/bluetooth/hidp/core.c. Marcel does not like this idea so I need help to find a better way to solve this problem.

One think I have discovered is that when using hid session the mouse send
several 9-bytes frames with this content: 0x05 0xff 0x6e 0x6f 0x54 0xc6 0x10 0x00 0x02 (or 0x03 instead of 0x02). If I filter those frames in hidp_recv_intr_frame (linux/net/bluetooth/hidp/core.c) before calling hid_input_report, the cursor does not get stucked but the overhead of doing that is too high, the cursor gets sluggish. Using input session instead of hid session gets muth better results and is not as uggly as filtering frames. Can someone help me to find a better solution?

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
#1 lore raw
Quoted 9 lines · Lamarque Vieira Souza

One think I have discovered is that when using hid session the
mouse send several 9-bytes frames with this content: 0x05 0xff 0x6e 0x6f 0x54 0xc6 0x10 0x00 0x02 (or 0x03 instead of 0x02). If I filter those frames in hidp_recv_intr_frame (linux/net/bluetooth/hidp/core.c) before calling hid_input_report, the cursor does not get stucked but the overhead of doing that is too high, the cursor gets sluggish. Using input session instead of hid session gets muth better results and is not as uggly as filtering frames. Can someone help me to find a better solution?

Hi,

we'd need to know a little bit more to be able to interpret that data packet. Could you please

- compile the kernel with CONFIG_HID_DEBUG option set
- modprobe the 'hid' module with 'debug=2' option

and provide the dmesg output that appears when the device is connected (so that we have contents of the HID report descriptor and kernel interpretation of it) and also after the data packet containing the mentioned sequence has been received?

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 5 lines

Hi,

we'd need to know a little bit more to be able to interpret that data packet. Could you please

Quoted 7 lines

- compile the kernel with CONFIG_HID_DEBUG option set
- modprobe the 'hid' module with 'debug=2' option

and provide the dmesg output that appears when the device is connected (so that we have contents of the HID report descriptor and kernel interpretation of it) and also after the data packet containing the mentioned sequence has been received?

	Hi, 

	Here is the dmesg output. The mouse constantly emmits those 9-bytes frames 

even if I do not touch it, which probably is why it also affects my notebook's touchpad.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
#3 lore raw
Quoted 11 lines · Lamarque Vieira Souza
Quoted 8 lines

- compile the kernel with CONFIG_HID_DEBUG option set
- modprobe the 'hid' module with 'debug=2' option

and provide the dmesg output that appears when the device is connected (so that we have contents of the HID report descriptor and kernel interpretation of it) and also after the data packet containing the mentioned sequence has been received?

Here is the dmesg output. The mouse constantly emmits those 9-bytes frames
even if I do not touch it, which probably is why it also affects my notebook's touchpad.

Hi,

what kernel is this? The log seems to be very incomplete. What I am missing the most is

- report descriptor dump and interpretation (we can see that the report descriptor has been successfully parsed at 408673.371808, but we don't see the descriptor dump before -- maybe it scrolled away already?)
- The interpretation of input data is missing (no "hid-input" line as result of hid_dump_input() being called through hid_input_field()->hid_process_event()). Are you sure you have modprobe the hid module with 'debug=2' parameter?

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#4 lore raw
Quoted 1 line

Hi,

	Hi,
Quoted 2 lines

what kernel is this? The log seems to be very incomplete. What I am missing the most is

I use kernel 2.6.30.4. hid is built-in here, the dmesg output was created
using 'echo 1 > /sys/module/hid/parameters/debug', sorry. This new dmesg output was created using 'echo 2> /sys/module/hid/parameters/debug' and 64k buffer.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
#5 lore raw
In reply to Jiri Kosina

I think I have found a good solution for my problem, see the attached patch.
I just need to find a better name for the define USB_DEVICE_ID_KYE_58.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
drivers/hid/hid-core.c +1 -0
diff -Nru --show-c-function a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
@@ -1636,6 +1636,7 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_58) },
 	{ }
 };
 
drivers/hid/hid-ids.h +1 -0
diff -Nru --show-c-function a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
@@ -434,6 +434,7 @@
 #define USB_VENDOR_ID_KYE		0x0458
 #define USB_DEVICE_ID_KYE_ERGO_525V	0x0087
 #define USB_DEVICE_ID_KYE_GPEN_560	0x5003
+#define USB_DEVICE_ID_KYE_58		0x0058
 
 
 #endif
#6 lore raw

Actually there is an error in the patch I sent in my last e-mail, this one
works (just one line change patch :-)). It was more simpler fix than I have thought.

Em Quinta-feira 13 Agosto 2009, Lamarque Vieira Souza escreveu:

Quoted 3 lines

I think I have found a good solution for my problem, see the attached
patch. I just need to find a better name for the define USB_DEVICE_ID_KYE_58.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
drivers/hid/hid-core.c +1 -0
diff -Nru --show-c-function a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
@@ -1636,6 +1636,7 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
 	{ }
 };
 
#7 lore raw
Quoted 3 lines · Lamarque Vieira Souza

Actually there is an error in the patch I sent in my last e-mail, this one
works (just one line change patch :-)). It was more simpler fix than I have thought.

The debugging output was better, still it didn't contain enough information for me to find out what exactly is happening (probably too small buffer still?).

Quoted 1 line

From your patch I guess that there is a separate HID device in the system

which only produces the confusing usages and nothing else, and is completely separate from the "normal" system mouse, right? I'd need this described in the patch changelog.

Signature · 2 lines
Jiri Kosina
SUSE Labs
#8 lore raw

Em Sexta-feira 14 Agosto 2009, Jiri Kosina escreveu:

Quoted 3 lines

The debugging output was better, still it didn't contain enough information for me to find out what exactly is happening (probably too small buffer still?).

I do not think so, the last debugging output also covers some seconds before
I switch the bluetooth mouse on. This mouse is problematic, in Windows XP installed on my notebook it is sluggish, in Windows 7 installed in my brother's notebook it is over accelerated (?!). Only when using input session in Linux it works as expected, or almost as expected, sometimes the cursor moves to the upper-left corner, but that is not often and I can live with that.

Quoted 4 lines

From your patch I guess that there is a separate HID device in the system which only produces the confusing usages and nothing else, and is completely separate from the "normal" system mouse, right? I'd need this described in the patch changelog.

Well, I think my USB hub has confused you. I have this USB hub, which has
three USB 1.1 ports and two PS/2 ports, each PS/2 port is mapped to a HID device in Linux. I also have a PS/2 keyboard attached to one of those PS/2 ports and it is it that is sending the keyboards events in the dmesg output. Even disconnecting the USB does not help, actually I bought this USB this year and I have this problem in Linux for more than two years (since hid session was made default instead of input session in kernel 2.6.22). I have this notebook for almost four years and since the begining input session has always worked as expected, better than in Windows too.

To make things clearer to see I restarted my notebook, disconnected the USB
hub, see the attached dmesg output. Lines 2660.752077 until 2666.779123 shows the bluetooth controller being activated. Even though there is a timeout here it works after 10 to 15 seconds after pressing bluetooth switch on button. After controller was turned on I switched on the mouse, line 2711.077714 is the first one that shows something about the mouse.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
#9 lore raw

Hi all,

Any news about my last patch? It is just one line only, could you add it to
the mainline kernel?

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
#10 lore raw
Quoted 2 lines · Lamarque Vieira Souza

Any news about my last patch? It is just one line only, could you
add it to the mainline kernel?

Hi,

could you please resend your patch? It has either been lost somewhere on the way, or in the dark depths of my inbox, so I am not really sure which one you are referring to, sorry.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.
#11 lore raw

Em Terça-feira 22 Setembro 2009, Jiri Kosina escreveu:

Quoted 5 lines

Hi,

could you please resend your patch? It has either been lost somewhere on the way, or in the dark depths of my inbox, so I am not really sure which one you are referring to, sorry.

Marks Acer Bluetooth Optical Rechargeable Mouse from Ferrari 4005 notebook to be ignored by hid core. This change makes hid core to use input session instead of hid session with that mouse. With hid session the mouse cursor moves too laggy, using input session corrects this problem.

drivers/hid/hid-core.c +0 -0
diff -Nru --show-c-function a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
@@ -1636,6 +1636,7 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20) 

},
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) }, { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K)
},
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
{ }
};

drivers/hid/hid-core.c +1 -0
diff -Nru --show-c-function a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
@@ -1636,6 +1636,7 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
 	{ }
 };
 
#12 lore raw
Quoted 11 lines · Lamarque Vieira Souza

Em Terça-feira 22 Setembro 2009, Jiri Kosina escreveu:

Quoted 5 lines

Hi,

could you please resend your patch? It has either been lost somewhere on the way, or in the dark depths of my inbox, so I am not really sure which one you are referring to, sorry.

Marks Acer Bluetooth Optical Rechargeable Mouse from Ferrari 4005 notebook to be ignored by hid core. This change makes hid core to use input session instead of hid session with that mouse. With hid session the mouse cursor moves too laggy, using input session corrects this problem.

Is this wonky behavior of this mouse regression from older kernels, or has the mouse been misbehaving in HID mode all the time?

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.
#13 lore raw

Em Quinta-feira 24 Setembro 2009, Jiri Kosina escreveu:

Quoted 2 lines

Is this wonky behavior of this mouse regression from older kernels, or has the mouse been misbehaving in HID mode all the time?

It is misbehaving since hid session was made default in kernel 2.6.22. Until
kernel 2.6.21 input session was the default.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
#14 lore raw
In reply to Lamarque Vieira Souza

Any news about this patch? It has not entered kernel 2.6.32 (nor even
2.6.32.2), is there any reason why?

Em Terça-feira 22 Setembro 2009, Lamarque Vieira Souza escreveu:

Quoted 28 lines

Em Terça-feira 22 Setembro 2009, Jiri Kosina escreveu:

Quoted 5 lines

Hi,

could you please resend your patch? It has either been lost somewhere on the way, or in the dark depths of my inbox, so I am not really sure which one you are referring to, sorry.

Marks Acer Bluetooth Optical Rechargeable Mouse from Ferrari 4005 notebook
to be ignored by hid core. This change makes hid core to use input session instead of hid session with that mouse. With hid session the mouse cursor moves too laggy, using input session corrects this problem.

diff -Nru --show-c-function a/drivers/hid/hid-core.c
b/drivers/hid/hid-core.c --- a/drivers/hid/hid-core.c 2009-08-13
20:45:11.000000000 -0300
+++ b/drivers/hid/hid-core.c 2009-08-13 22:25:54.504677594 -0300

(quoted diff) +1 -0
@@ -1636,6 +1636,7 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP,
 USB_DEVICE_ID_1_PHIDGETSERVO_20) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK,
 USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
 	{ }

};

Signature · 7 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#15 lore raw
Quoted 8 lines · Lamarque Vieira Souza
Quoted 8 lines

Marks Acer Bluetooth Optical Rechargeable Mouse from Ferrari 4005 notebook
to be ignored by hid core. This change makes hid core to use input session instead of hid session with that mouse. With hid session the mouse cursor moves too laggy, using input session corrects this problem.

Quoted 15 lines
Quoted 12 lines

diff -Nru --show-c-function a/drivers/hid/hid-core.c
b/drivers/hid/hid-core.c --- a/drivers/hid/hid-core.c 2009-08-13
20:45:11.000000000 -0300
+++ b/drivers/hid/hid-core.c 2009-08-13 22:25:54.504677594 -0300

(quoted diff) +1 -0
@@ -1636,6 +1636,7 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP,
 USB_DEVICE_ID_1_PHIDGETSERVO_20) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK,
 USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
 	{ }
Quoted 1 line

};

Any news about this patch? It has not entered kernel 2.6.32 (nor even
2.6.32.2), is there any reason why?

It is in current Linus' tree as commit eb8141ccd3.

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.
#16 lore raw

Em Segunda-feira 04 Janeiro 2010, Jiri Kosina escreveu:

Quoted 2 lines

It is in current Linus' tree as commit eb8141ccd3.

Ok, thanks for answering.

Signature · 3 lines
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org/